2024-02-07 02:08:34 +01:00
|
|
|
{ pkgs, ... }:
|
2024-01-17 09:17:12 +01:00
|
|
|
|
2024-02-07 02:08:34 +01:00
|
|
|
let
|
|
|
|
inherit (import ../../options.nix) flakeDir;
|
|
|
|
in
|
2024-01-17 09:17:12 +01:00
|
|
|
pkgs.writeShellScriptBin "themechange" ''
|
2024-01-20 05:46:12 +01:00
|
|
|
if [[ ! $@ ]];then
|
|
|
|
echo "No Theme Given"
|
|
|
|
else
|
|
|
|
replacement="$1"
|
2024-02-07 02:08:34 +01:00
|
|
|
sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" ${flakeDir}/options.nix
|
2024-01-20 05:46:12 +01:00
|
|
|
pkexec nixos-rebuild switch --flake ${flakeDir}
|
2024-01-20 06:23:50 +01:00
|
|
|
hyprctl dispatch -- exec swaync-client -R
|
|
|
|
hyprctl dispatch -- exec swaync-client -rs
|
2024-01-20 05:46:12 +01:00
|
|
|
fi
|
2024-01-17 09:17:12 +01:00
|
|
|
''
|