mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-11-26 16:43:09 +01:00
12 lines
373 B
Nix
12 lines
373 B
Nix
{ pkgs, flakeDir, }:
|
|
|
|
pkgs.writeShellScriptBin "themechange" ''
|
|
if [[ ! $@ ]];then
|
|
echo "No Theme Given"
|
|
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
|
|
fi
|
|
''
|