Merge remote-tracking branch 'upstream/main' into upstream-custom

This commit is contained in:
wyj
2024-04-03 14:22:56 -04:00
29 changed files with 396 additions and 1082 deletions
+7
View File
@@ -18,6 +18,7 @@ themes_path="$HOME/dotfiles/waybar/themes"
# -----------------------------------------------------
listThemes=""
listNames=""
listNames2=""
# -----------------------------------------------------
# Read theme folder
@@ -35,8 +36,10 @@ do
if [ -f $themes_path$result/config.sh ]; then
source $themes_path$result/config.sh
listNames+="$theme_name\n"
listNames2+="$theme_name~"
else
listNames+="/${arrThemes[1]};$result\n"
listNames2+="/${arrThemes[1]};$result~"
fi
fi
fi
@@ -48,6 +51,9 @@ done
# -----------------------------------------------------
listNames=${listNames::-2}
choice=$(echo -e "$listNames" | rofi -dmenu -replace -i -config ~/dotfiles/rofi/config-themes.rasi -no-show-icons -width 30 -p "Themes" -format i)
IFS="~"
input=$listNames2
read -ra array <<< "$input"
# -----------------------------------------------------
# Set new theme by writing the theme information to ~/.cache/.themestyle.sh
@@ -56,4 +62,5 @@ if [ "$choice" ]; then
echo "Loading waybar theme..."
echo "${listThemes[$choice+1]}" > ~/.cache/.themestyle.sh
~/dotfiles/waybar/launch.sh
notify-send "Waybar Theme changed" "to ${array[$choice]}"
fi