2024-05-15 00:53:36 +02:00
|
|
|
{ pkgs }:
|
|
|
|
|
|
|
|
pkgs.writeShellScriptBin "theme-selector" ''
|
2024-05-15 01:36:40 +02:00
|
|
|
# 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
|
2024-05-15 00:53:36 +02:00
|
|
|
|
2024-05-15 01:36:40 +02:00
|
|
|
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
|
2024-05-15 00:53:36 +02:00
|
|
|
''
|