mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-11-29 01:53:10 +01:00
14 lines
415 B
Nix
14 lines
415 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
|
|
sudo nixos-rebuild switch --flake ${flakeDir}
|
|
${pkgs.toybox}/bin/pkill swaync
|
|
${pkgs.swaynotificationcenter}/bin/swaync &
|
|
fi
|
|
''
|