dotfiles/symlinks/bin/settings/theme-selector

19 lines
386 B
Bash
Executable File

#!/bin/bash
function get_themes()
{
ls -l --time-style="long-iso" $MY_THEMES_DIR | egrep '^d' | awk '{print $8}'
}
THEME=$( (echo empty; get_themes) | rofi -dmenu -only-match -p "Select theme:")
if [ x"empty" = x"${THEME}" ]
then
echo "No operation."
elif [ -n "${THEME}" ]
then
echo $THEME > $MY_THEMES_DIR/current-theme
~/bin/settings/reload-configurations
i3-msg restart
fi