fix themechanging scripts

This commit is contained in:
Tyler Kelley 2024-01-17 03:09:45 -06:00
parent 7b4a275fc0
commit 678afeb440
4 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@ pkgs.writeShellScriptBin "theme-selector" ''
if [ -n "$1" ]; then if [ -n "$1" ]; then
themechange "$chosen" themechange "$chosen"
else else
themechange "$chosen"
${pkgs.libnotify}/bin/notify-send "'$chosen' theme is building this will take a second" & ${pkgs.libnotify}/bin/notify-send "'$chosen' theme is building this will take a second" &
themechange "$chosen"
fi fi
'' ''

View File

@ -7,8 +7,7 @@ pkgs.writeShellScriptBin "themechange" ''
replacement="$1" replacement="$1"
sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" ${flakeDir}/flake.nix sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" ${flakeDir}/flake.nix
sudo nixos-rebuild switch --flake ${flakeDir}/#workstation sudo nixos-rebuild switch --flake ${flakeDir}/#workstation
${pkgs.toybox}/bin/pkill ${pkgs.swaynotificationcenter}/bin/swaync swaync-client -R
${pkgs.toybox}/bin/nohup ${pkgs.swaynotificationcenter}/bin/swaync & swaync-client -rs
rm nohup.out
fi fi
'' ''

View File

@ -20,7 +20,7 @@
gitEmail = "tylerzanekelley@gmail.com"; gitEmail = "tylerzanekelley@gmail.com";
theLocale = "en_US.UTF-8"; theLocale = "en_US.UTF-8";
theTimezone = "America/Chicago"; theTimezone = "America/Chicago";
theme = "gigavolt"; theme = "atelier-cave-light";
browser = "firefox"; browser = "firefox";
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git"; wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
wallpaperDir = "/home/${username}/Pictures/Wallpapers"; wallpaperDir = "/home/${username}/Pictures/Wallpapers";

View File

@ -70,6 +70,7 @@
(import ./config/scripts/squirtle.nix { inherit pkgs; }) (import ./config/scripts/squirtle.nix { inherit pkgs; })
(import ./config/scripts/wallsetter.nix { inherit pkgs; inherit wallpaperDir; }) (import ./config/scripts/wallsetter.nix { inherit pkgs; inherit wallpaperDir; })
(import ./config/scripts/themechange.nix { inherit pkgs; inherit flakeDir; }) (import ./config/scripts/themechange.nix { inherit pkgs; inherit flakeDir; })
(import ./config/scripts/theme-selector.nix { inherit pkgs; })
]; ];