Add new autorun nix file that has scripts that run on rebuild

This commit is contained in:
Tyler Kelley
2024-01-18 02:09:11 -06:00
parent 1bef8f5608
commit a86e0ea0ea
5 changed files with 14 additions and 3 deletions

View File

@ -11,6 +11,6 @@ pkgs.writeShellScriptBin "theme-selector" ''
themechange "$chosen"
else
${pkgs.libnotify}/bin/notify-send "$chosen is building please wait" &
themechange "$chosen"
kitty -e themechange "$chosen"
fi
''

View File

@ -6,6 +6,6 @@ pkgs.writeShellScriptBin "themechange" ''
else
replacement="$1"
sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" ${flakeDir}/flake.nix
kitty -e sudo nixos-rebuild switch --flake ${flakeDir} && swaync-client -R && swaync-client -rs
sudo nixos-rebuild switch --flake ${flakeDir}
fi
''