diff --git a/.config/autostart/Dconf.desktop b/.config/autostart/Dconf.desktop deleted file mode 100644 index 022880b..0000000 --- a/.config/autostart/Dconf.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=DconfLoad -GenericName=Load Gnome settings -Comment=Load Gnome settings -Exec=bash -c "export path_dconf=${HOME}/.config/linux/Gnome.dconf ; sed -i -e s/voronind/$(whoami)/g ${path_dconf} ; dconf load / < ${path_dconf} ; git checkout ${path_dconf}" -Terminal=false -Type=Application -X-GNOME-Autostart-enabled=true diff --git a/.config/linux/Gnome.dconf b/.config/linux/Gnome.dconf index 1215e3c..f85783d 100644 --- a/.config/linux/Gnome.dconf +++ b/.config/linux/Gnome.dconf @@ -139,7 +139,7 @@ unmaximize=@as [] action-middle-click-titlebar='minimize' action-right-click-titlebar='menu' button-layout='appmenu:close' -focus-mode='click' +focus-mode='sloppy' titlebar-font='SF Pro Display 11' [org/gnome/desktop/session] diff --git a/.config/linux/system/module/Gnome.nix b/.config/linux/system/module/Gnome.nix index f4d9dca..75e4d2e 100644 --- a/.config/linux/system/module/Gnome.nix +++ b/.config/linux/system/module/Gnome.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: - -{ +{ pkgs, ... }: let + dconfConfig = "~/.config/linux/Gnome.dconf"; +in { # GUI. services.xserver.enable = true; services.xserver.displayManager.gdm.enable = true; @@ -51,4 +51,16 @@ alsa.support32Bit = true; pulse.enable = true; }; + + # Auto-load config on start. + systemd.user.services.dconfload = { + description = "Load Gnome dconf settings in startup."; + wantedBy = [ "graphical-session-pre.target" ]; + serviceConfig.Type = "oneshot"; + script = '' + sed -i -e "s/voronind/$(whoami)/g" ${dconfConfig} + ${pkgs.dconf}/bin/dconf load / < ${dconfConfig} + ${pkgs.git}/bin/git checkout ${dconfConfig} + ''; + }; }