From 447faf813ef38a73d7cee43fe56c62dc7cd2dadf Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Tue, 24 May 2022 15:11:32 +0800 Subject: [PATCH] system/gnome: sync config to 'A happy GNOME' theme from my NixOS config --- .../gnome/files/dconf/applications.conf | 13 ++++++ roles/system/gnome/files/dconf/desktop.conf | 44 +++++++++++++++---- .../system/gnome/files/dconf/keybindings.conf | 21 +-------- .../gnome/files/dconf/shell-extensions.conf | 43 ++++++++++++++++++ roles/system/gnome/tasks/main.yml | 9 +--- 5 files changed, 94 insertions(+), 36 deletions(-) create mode 100644 roles/system/gnome/files/dconf/applications.conf create mode 100644 roles/system/gnome/files/dconf/shell-extensions.conf diff --git a/roles/system/gnome/files/dconf/applications.conf b/roles/system/gnome/files/dconf/applications.conf new file mode 100644 index 0000000..41c918f --- /dev/null +++ b/roles/system/gnome/files/dconf/applications.conf @@ -0,0 +1,13 @@ +# Nautilus-related preferences. +[org/gnome/nautilus/list-view] +use-tree-view=true + +[org/gnome/nautilus/preferences] +show-create-link=true + +[org/gtk/settings/file-chooser] +sort-directories-first=true +show-hidden=true + +[re/sonny/Junction] +show-app-names=true diff --git a/roles/system/gnome/files/dconf/desktop.conf b/roles/system/gnome/files/dconf/desktop.conf index 1252cfc..345101a 100644 --- a/roles/system/gnome/files/dconf/desktop.conf +++ b/roles/system/gnome/files/dconf/desktop.conf @@ -1,19 +1,36 @@ [org/gnome/desktop/interface] -enable-animations=true +locate-pointer=true +enable-animations=false enable-hot-corners=false -gtk-im-module='gtk-im-context-simple' show-battery-percentage=true +color-scheme='prefer-dark' [org/gnome/desktop/notifications] show-banners=true +[org/gtk/settings/file-chooser] +clock-format='24h' + [org/gnome/desktop/privacy] disable-microphone=false [org/gnome/shell] disable-user-extensions=false -enabled-extensions=['arcmenu@arcmenu.com', 'just-perfection-desktop@just-perfection', 'gsconnect@andyholmes.github.io', 'flypie@schneegans.github.com', 'kimpanel@kde.org', 'workspaces-bar@fthx', 'burn-my-windows@schneegans.github.com', 'sermon@rovellipaolo-gmail.com', 'runcat@kolesnikov.se', 'mprisindicatorbutton@JasonLG1979.github.io', 'appindicatorsupport@rgcjonas.gmail.com', 'screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com', 'windowsNavigator@gnome-shell-extensions.gcampax.github.com'] -favorite-apps=['brave-browser.desktop', 'emacs.desktop', 'zotero-5.0.96.3.desktop', 'org.kde.krita.desktop', 'blender.desktop', 'com.usebottles.bottles.desktop'] + +# Desktop suspension and screensaver settings. +[org/gnome/desktop/session] +idle-delay=uint32 720 + +[org/gnome/desktop/screensaver] +lock-delay=uint32 120 + +# Enable night light. +[org/gnome/settings-daemon/plugins/color] +night-light-enabled=true + +# Hardware settings. +[org/gnome/desktop/peripherals/touchpad] +tap-to-click=true [org/gnome/mutter] attach-modal-dialogs=true @@ -34,9 +51,18 @@ locations=[<(uint32 2, <('New York', 'KNYC', true, [(0.71180344078725644, -1.290 [org/gnome/system/location] enabled=false -[org/gnome/desktop/wm/preferences] -workspace-names=['Web', 'Dev', 'Notes', 'Graphics', 'Audio'] +# Disable notification pop-outs for the common messenger apps. +[/org/gnome/desktop/notifications/application/re-sonny-tangram] +show-banners=false -# Application configs. -[re/sonny/Junction] -show-app-names=true +[/org/gnome/desktop/notifications/application/org-gnome-polari] +show-banners=false + +[/org/gnome/desktop/notifications/application/thunderbird] +show-banners=false + +[/org/gnome/desktop/notifications/application/io-github-hexchat] +show-banners=false + +[/org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify] +show-banners=false diff --git a/roles/system/gnome/files/dconf/keybindings.conf b/roles/system/gnome/files/dconf/keybindings.conf index 4e51331..abd2965 100644 --- a/roles/system/gnome/files/dconf/keybindings.conf +++ b/roles/system/gnome/files/dconf/keybindings.conf @@ -26,33 +26,14 @@ switch-to-workspace-right=['l', 'Page_Down'] switch-to-workspace-down=@as [] toggle-fullscreen=['f'] toggle-maximized=['f'] +toggle-on-all-workspaces=['y'] toggle-overview=['s'] toggle-tiled-left=@as [] toggle-tiled-right=@as [] -[org/gnome/shell/extensions/pop-shell] -pop-workspace-down=['l', 'Right', 'Page_Down'] -pop-workspace-up=['h', 'Left', 'Page_Up'] -pop-monitor-up=['k', 'Up'] -pop-monitor-left=['h', 'Left'] -pop-monitor-right=['l', 'Right'] -pop-monitor-down=['j', 'Down'] - [org/gnome/shell/keybindings] toggle-message-tray=['v'] -# Bringing my old habits back when I use standalone window managers. -[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0] -binding='Return' -command='kitty' -name='Terminal' - -# The equivalent to the newspaper in the morning. -[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1] -binding='r' -command='kitty -e newsboat' -name='News aggregator' - # We don't want to restore them shortcuts. [org/gnome/mutter/wayland/keybindings] restore-shortcuts=@as [] diff --git a/roles/system/gnome/files/dconf/shell-extensions.conf b/roles/system/gnome/files/dconf/shell-extensions.conf new file mode 100644 index 0000000..9a4b655 --- /dev/null +++ b/roles/system/gnome/files/dconf/shell-extensions.conf @@ -0,0 +1,43 @@ +# arcmenu, the extensive and configurable menu +[org/gnome/shell/extensions/arcmenu] +arc-menu-icon=64 +arc-menu-placement='Panel' +disable-recently-installed-apps=false +menu-button-icon='Arc_Menu_Icon' +menu-height=550 +menu-hotkey='Super_L' +menu-layout='Runner' +enable-standlone-runner-menu=true +runner-position='Centered' +runner-menu-hotkey='Super_L' +runner-show-frequent-apps=true +search-provider-open-windows=true +show-activities-button=false +show-search-result-details=true +apps-show-extra-details=true + +# Minor tweaks ahoy! +[org/gnome/shell/extensions/just-perfection] +activities-button=false +workspace-wrap-around=false +window-demands-attention-focus=true +ripple-box=false + +# The lovely tool if you're a mouse handler. +[org/gnome/shell/extensions/flypie] +menu-configuration='[{"name":"Global palette","icon":"🐶️","shortcut":"space","centered":false,"id":0,"children":[{"name":"Close window","type":"Shortcut","icon":"window-close-symbolic","data":{"shortcut":"q"},"angle":-1},{"name":"Next workspace","icon":"go-next-symbolic","type":"Shortcut","data":{"shortcut":"l"},"angle":90},{"name":"Favorites","icon":"emblem-favorite-symbolic-#fae","type":"Favorites","data":{},"angle":-1},{"name":"Fly-Pie settings","icon":"applications-system-symbolic","type":"Command","data":"gnome-extensions prefs flypie@schneegans.github.com","angle":-1},{"name":"Previous workspace","icon":"go-previous-symbolic","type":"Shortcut","data":{"shortcut":"h"},"angle":270},{"name":"Running apps","icon":"flypie-menu-running-apps-symbolic-#74a","type":"RunningApps","data":{"activeWorkspaceOnly":false,"appGrouping":true,"hoverPeeking":true,"nameRegex":""},"angle":-1},{"name":"Maximize window","icon":"window-maximize-symbolic","type":"Shortcut","data":{"shortcut":"f"},"angle":-1}],"type":"CustomMenu","data":{},"touchButton":false,"superRMB":false}]' + +# A little novelty couldn't hurt. +[org/gnome/shell/extensions/burn-my-windows] +close-animation='tv' +destroy-animation-time=500 +destroy-dialogs=true +tv-animation-time=250 +fire-close-effect=false +fire-open-effect=false +tv-close-effect=true +tv-open-effect=true + +# Make app grid somewhat usable. +[org/gnome/shell/extensions/alphabetical-app-grid] +folder-order-position='start' diff --git a/roles/system/gnome/tasks/main.yml b/roles/system/gnome/tasks/main.yml index c4a8d3b..e426ab3 100644 --- a/roles/system/gnome/tasks/main.yml +++ b/roles/system/gnome/tasks/main.yml @@ -2,20 +2,15 @@ - name: Install dconf keyfiles copy: src: "{{ role_path }}/files/dconf/" - dest: /etc/dconf/db/a-happy-gnome.d + dest: "{{ '/etc/dconf/db/local.d' if ansible_facts['distribution'] == 'Fedora' else '/etc/dconf/db/a-happy-gnome.d' }}" - name: Set 'user' dconf profile with the custom GNOME config ansible.builtin.shell: grep "system-db:a-happy-gnome" && echo "system-db:a-happy-gnome" >> /etc/dconf/profile/user + when: ansible_facts["distribution"] != "Fedora" - name: Update dconf database ansible.builtin.shell: dconf update -- name: Enable night light in GNOME - dconf: - state: present - key: /org/gnome/settings-daemon/plugins/color/night-light-enabled - value: "true" - - name: Install GNOME extension manager flatpak: state: present