mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-11-29 10:03:09 +01:00
14 lines
396 B
Nix
14 lines
396 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
|
|
pkexec nixos-rebuild switch --flake ${flakeDir}
|
|
hyprctl dispatch -- exec swaync-client -R
|
|
hyprctl dispatch -- exec swaync-client -rs
|
|
fi
|
|
''
|