2024-01-17 10:01:53 +01:00
|
|
|
{ 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" &
|
2024-01-20 06:23:50 +01:00
|
|
|
themechange "$chosen"
|
2024-02-18 04:25:16 +01:00
|
|
|
${pkgs.libnotify}/bin/notify-send "Theme: $chosen has been applied." &
|
2024-01-17 10:01:53 +01:00
|
|
|
fi
|
|
|
|
''
|