zaneyos/config/scripts/theme-selector.nix

17 lines
432 B
Nix
Raw Normal View History

{ pkgs }:
pkgs.writeShellScriptBin "theme-selector" ''
# Get user selection for new theme from base16-themes file
chosen=$(cat $HOME/.base16-themes | ${pkgs.rofi-wayland}/bin/rofi -dmenu)
# Exit if none chosen.
[ -z "$chosen" ] && exit
if [ -n "$1" ]; then
themechange "$chosen"
else
2024-01-17 11:00:40 +01:00
${pkgs.libnotify}/bin/notify-send "$chosen is building please wait" &
themechange "$chosen"
fi
''