From 429316ac467a460bcc9506de14c0b395ac5562fd Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sat, 22 Jun 2024 18:07:46 -0400 Subject: [PATCH] cinnamon/gnome: reorganized dconf settings and moved theming to theme.nix --- .../desktop/cinnamon/default.nix | 39 +++++++------------ homeManagerModules/desktop/default.nix | 2 + homeManagerModules/desktop/gnome/default.nix | 37 +++++++++++------- homeManagerModules/theme.nix | 24 +++++++++++- 4 files changed, 63 insertions(+), 39 deletions(-) diff --git a/homeManagerModules/desktop/cinnamon/default.nix b/homeManagerModules/desktop/cinnamon/default.nix index bcf4d080..139ef9ae 100644 --- a/homeManagerModules/desktop/cinnamon/default.nix +++ b/homeManagerModules/desktop/cinnamon/default.nix @@ -8,42 +8,33 @@ dconf = { enable = true; settings = { - "org/cinnamon/desktop/background".picture-uri = "file://${config.alyraffauf.theme.wallpaper}"; - "org/cinnamon/desktop/interface".cursor-size = config.alyraffauf.theme.cursorTheme.size; - "org/cinnamon/desktop/interface".cursor-theme = config.alyraffauf.theme.cursorTheme.name; - "org/cinnamon/desktop/interface".font-name = "${config.alyraffauf.theme.font.name} Regular ${toString config.alyraffauf.theme.font.size}"; - "org/cinnamon/desktop/interface".gtk-theme = config.alyraffauf.theme.gtk.name; - "org/cinnamon/desktop/interface".icon-theme = config.alyraffauf.theme.iconTheme.name; "org/cinnamon/desktop/peripherals/touchpad".click-method = "fingers"; - "org/cinnamon/desktop/wm/preferences".titlebar-font = "${config.alyraffauf.theme.font.name} ${toString config.alyraffauf.theme.font.size}"; "org/cinnamon/gestures".enabled = true; - "org/cinnamon/muffin".workspace-cycle = true; - "org/cinnamon/muffin".workspaces-only-on-primary = true; - "org/cinnamon/settings-daemon/peripherals/touchscreen".orientation-lock = false; - "org/cinnamon/theme".name = config.alyraffauf.theme.gtk.name; - "org/gnome/desktop/interface".cursor-size = config.alyraffauf.theme.cursorTheme.size; - "org/gnome/desktop/interface".cursor-theme = config.alyraffauf.theme.cursorTheme.name; - "org/gnome/desktop/interface".gtk-theme = config.alyraffauf.theme.gtk.name; - "org/gnome/desktop/interface".icon-theme = config.alyraffauf.theme.iconTheme.name; - "org/gnome/desktop/interface".monospace-font-name = "${config.alyraffauf.theme.terminalFont.name} Regular ${toString config.alyraffauf.theme.terminalFont.size}"; - "org/gnome/desktop/peripherals/touchpad".natural-scroll = true; - "org/gnome/desktop/peripherals/touchpad".tap-to-click = true; - "org/gnome/desktop/wm/preferences".titlebar-font = "${config.alyraffauf.theme.font.name} ${toString config.alyraffauf.theme.font.size}"; - "org/nemo/desktop".font = "${config.alyraffauf.theme.font.name} ${toString config.alyraffauf.theme.font.size}"; - "org/cinnamon/desktop/wm/preferences" = { - focus-mode = "mouse"; - mouse-button-modifier = ""; + + "org/cinnamon/muffin" = { + attach-modal-dialogs = true; + workspace-cycle = true; + workspaces-only-on-primary = true; }; + + "org/cinnamon/settings-daemon/peripherals/touchscreen".orientation-lock = false; + + "org/gnome/desktop/peripherals/touchpad" = { + natural-scroll = true; + tap-to-click = true; + }; + "org/gnome/desktop/wm/preferences" = { focus-mode = "mouse"; mouse-button-modifier = ""; }; - "org/cinnamon/muffin".attach-modal-dialogs = true; + "org/cinnamon/desktop/keybindings/media-keys" = { www = ["XF86WWW" "b"]; terminal = ["" "t"]; home = ["f" "XF86Explorer"]; }; + "org/cinnamon/desktop/keybindings/wm" = { # TODO: Declaratively disable conflict with panel applet. close = ["F4" "c"]; diff --git a/homeManagerModules/desktop/default.nix b/homeManagerModules/desktop/default.nix index c29039df..8d0a2022 100644 --- a/homeManagerModules/desktop/default.nix +++ b/homeManagerModules/desktop/default.nix @@ -17,6 +17,8 @@ dconf = { enable = true; settings = { + "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; + "org/gtk/settings/file-chooser".sort-directories-first = true; "org/virt-manager/virt-manager/connections" = { autoconnect = ["qemu:///system"]; uris = ["qemu:///system"]; diff --git a/homeManagerModules/desktop/gnome/default.nix b/homeManagerModules/desktop/gnome/default.nix index 4b4f1b05..9bb271e0 100644 --- a/homeManagerModules/desktop/gnome/default.nix +++ b/homeManagerModules/desktop/gnome/default.nix @@ -8,14 +8,22 @@ dconf.enable = true; dconf.settings = { "org/gnome/desktop/datetime".automatic-timezone = true; - "org/gnome/desktop/interface".clock-format = "12h"; - "org/gnome/desktop/interface".enable-hot-corners = true; + + "org/gnome/desktop/interface" = { + clock-format = "12h"; + enable-hot-corners = true; + }; + "org/gnome/desktop/peripherals/touchpad".tap-to-click = true; "org/gnome/desktop/search-providers".enabled = "['org.gnome.Calendar.desktop', 'org.gnome.Weather.desktop', 'org.gnome.Contacts.desktop', 'org.gnome.Calculator.desktop', 'org.gnome.Characters.desktop', 'org.gnome.clocks.desktop']"; "org/gnome/desktop/wm/preferences".auto-raise = true; - "org/gnome/mutter".dynamic-workspaces = true; - "org/gnome/mutter".edge-tiling = true; - "org/gnome/mutter".workspaces-only-on-primary = true; + + "org/gnome/mutter" = { + dynamic-workspaces = true; + edge-tiling = true; + workspaces-only-on-primary = true; + }; + "org/gnome/shell".enabled-extensions = [ "appindicatorsupport@rgcjonas.gmail.com" "blur-my-shell@aunetx" @@ -26,16 +34,19 @@ "tiling-assistant@leleat-on-github" "drive-menu@gnome-shell-extensions.gcampax.github.com" ]; + "org/gnome/shell/extensions/blur-my-shell/overview".style-components = 3; - "org/gnome/shell/extensions/blur-my-shell/panel".blur = false; - "org/gnome/shell/extensions/blur-my-shell/panel".customize = true; - "org/gnome/shell/extensions/blur-my-shell/panel".override-background = false; - "org/gnome/shell/extensions/blur-my-shell/panel".override-background-dynamically = false; - "org/gnome/shell/extensions/blur-my-shell/panel".style-panel = 0; - "org/gnome/shell/extensions/blur-my-shell/panel".unblur-in-overview = true; + + "org/gnome/shell/extensions/blur-my-shell/panel" = { + blur = false; + customize = true; + override-background = false; + override-background-dynamically = false; + style-panel = 0; + unblur-in-overview = true; + }; + "org/gnome/system/location".enabled = true; - "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; - "org/gtk/settings/file-chooser".sort-directories-first = true; }; }; } diff --git a/homeManagerModules/theme.nix b/homeManagerModules/theme.nix index cc4fc412..5a14b5a3 100644 --- a/homeManagerModules/theme.nix +++ b/homeManagerModules/theme.nix @@ -90,12 +90,32 @@ }; dconf.settings = { - "org/gnome/desktop/interface" = { + "org/cinnamon/desktop/background".picture-uri = "file://${config.alyraffauf.theme.wallpaper}"; + + "org/cinnamon/desktop/interface" = { + cursor-size = config.alyraffauf.theme.cursorTheme.size; + cursor-theme = config.alyraffauf.theme.cursorTheme.name; + font-name = "${config.alyraffauf.theme.font.name} Regular ${toString config.alyraffauf.theme.font.size}"; gtk-theme = config.alyraffauf.theme.gtk.name; - color-scheme = "prefer-dark"; + icon-theme = config.alyraffauf.theme.iconTheme.name; + }; + + "org/cinnamon/theme".name = config.alyraffauf.theme.gtk.name; + "org/cinnamon/desktop/wm/preferences".titlebar-font = "${config.alyraffauf.theme.font.name} ${toString config.alyraffauf.theme.font.size}"; + + "org/gnome/desktop/interface" = { + color-scheme = + if config.alyraffauf.theme.colors.preferDark + then "prefer-dark" + else "prefer-light"; cursor-theme = config.alyraffauf.theme.cursorTheme.name; cursor-size = config.alyraffauf.theme.cursorTheme.size; + gtk-theme = config.alyraffauf.theme.gtk.name; + icon-theme = config.alyraffauf.theme.iconTheme.name; + monospace-font-name = "${config.alyraffauf.theme.terminalFont.name} Regular ${toString config.alyraffauf.theme.terminalFont.size}"; }; + + "org/gnome/desktop/wm/preferences".titlebar-font = "${config.alyraffauf.theme.font.name} ${toString config.alyraffauf.theme.font.size}"; }; }; }