mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-12-14 01:10:39 +01:00
17 lines
447 B
Nix
17 lines
447 B
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
inherit (import ../../options.nix) flakeDir;
|
|
in
|
|
pkgs.writeShellScriptBin "themechange" ''
|
|
if [[ ! $@ ]];then
|
|
echo "No Theme Given"
|
|
else
|
|
replacement="$1"
|
|
sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" ${flakeDir}/options.nix
|
|
pkexec nixos-rebuild switch --flake ${flakeDir}
|
|
hyprctl dispatch -- exec swaync-client -R
|
|
hyprctl dispatch -- exec swaync-client -rs
|
|
fi
|
|
''
|