mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-11-22 22:53:07 +01:00
18 lines
524 B
Nix
18 lines
524 B
Nix
{ pkgs }:
|
|
|
|
pkgs.writeShellScriptBin "theme-selector" ''
|
|
# Get user selection for new theme from base16-themes file
|
|
chosen=$(cat $HOME/.base16-themes | ${pkgs.wofi}/bin/wofi -dmenu)
|
|
|
|
# Exit if none chosen.
|
|
[ -z "$chosen" ] && exit
|
|
|
|
if [ -n "$1" ]; then
|
|
themechange "$chosen"
|
|
else
|
|
${pkgs.libnotify}/bin/notify-send "$chosen is building please wait" &
|
|
themechange "$chosen"
|
|
${pkgs.libnotify}/bin/notify-send "Theme: $chosen has been applied." &
|
|
fi
|
|
''
|