1
0
forked from extern/zaneyos

Trying to fix swaync, but it is being difficult

This commit is contained in:
Tyler Kelley 2024-01-19 22:46:12 -06:00
parent e370d6dc9d
commit 3e61b80155
6 changed files with 18 additions and 12 deletions

View File

@ -17,5 +17,6 @@
inherit username; inherit wallpaperGit; })
(import ./../scripts/themechange.nix { inherit pkgs; inherit flakeDir; })
(import ./../scripts/theme-selector.nix { inherit pkgs; })
(import ./../scripts/swaync-reloader.nix { inherit pkgs; })
];
}

View File

@ -75,7 +75,7 @@
"custom/themeselector" = {
tooltip = false;
format = "";
on-click = "theme-selector";
on-click = "theme-selector && swaync-reloader";
};
"custom/notification" = {
tooltip = false;

View File

@ -0,0 +1,6 @@
{ pkgs, }:
pkgs.writeShellScriptBin "swaync-reloader" ''
${pkgs.swaynotificationcenter}/bin/swaync-client -R
${pkgs.swaynotificationcenter}/bin/swaync-client -rs
''

View File

@ -11,6 +11,6 @@ pkgs.writeShellScriptBin "theme-selector" ''
themechange "$chosen"
else
${pkgs.libnotify}/bin/notify-send "$chosen is building please wait" &
themechange "$chosen"
kitty -e themechange "$chosen"
fi
''

View File

@ -1,13 +1,12 @@
{ 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}
${pkgs.swaynotificationcenter}/bin/swaync-client -R &
${pkgs.swaynotificationcenter}/bin/swaync-client -rs &
fi
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}
fi
''

View File

@ -20,7 +20,7 @@
gitEmail = "tylerzanekelley@gmail.com";
theLocale = "en_US.UTF-8";
theTimezone = "America/Chicago";
theme = "catppuccin-frappe";
theme = "catppuccin-mocha";
browser = "firefox";
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
wallpaperDir = "/home/${username}/Pictures/Wallpapers";