Only run onChange for GNOME when installed 🐛

As GNOME is always enabled on the Home Manager side, the command might
try to run when GNOME is not installed.
This commit is contained in:
Daniel Thwaites 2023-02-01 12:29:56 +00:00
parent ba324393e9
commit 638f2d86c4
No known key found for this signature in database
GPG key ID: D8AFC4BF05670F9D

View file

@ -31,8 +31,10 @@ with lib;
let theme = import ./theme.nix { inherit pkgs config; };
in "${theme}/share/gnome-shell/gnome-shell.css";
onChange = ''
gnome-extensions disable user-theme@gnome-shell-extensions.gcampax.github.com
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
if [ -x "$(command -v gnome-extensions)" ]; then
gnome-extensions disable user-theme@gnome-shell-extensions.gcampax.github.com
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
fi
'';
};
};