fixed rofi check

This commit is contained in:
Tiago Sousa 2024-04-05 13:46:41 +01:00
parent 7d2e441211
commit 08dbbfa2e8
Signed by: tiago
SSH key fingerprint: SHA256:odOD9vln9U7qNe1R8o3UCbE3jkQCkr5/q5mgd5hwua0

View file

@ -11,7 +11,7 @@ theme_options=(
# rofi script to get what theme to use # rofi script to get what theme to use
chosen=$(printf '%s\n' "${theme_options[@]}" | rofi -dmenu -p "Theme" -theme-str "configuration {show-icons:false;}") chosen=$(printf '%s\n' "${theme_options[@]}" | rofi -dmenu -p "Theme" -theme-str "configuration {show-icons:false;}")
if [[ $chosen == "" ]]; then if [[ -z $chosen ]]; then
exit 0 exit 0
fi fi
theme=$(echo "${chosen}" | rev | cut -d- -f2- | rev) theme=$(echo "${chosen}" | rev | cut -d- -f2- | rev)
@ -20,8 +20,8 @@ tmux_bg=$(echo "${chosen}" | awk -F'-' '{print $NF}')
# change rofi theme # change rofi theme
rofi_conf=~/.config/rofi/config.rasi rofi_conf=~/.config/rofi/config.rasi
rofi_theme_check="${rofi_conf}"/"${chosen}".rasi rofi_theme_check=~/.config/rofi/colors/"${chosen}".rasi
if [[ -f $rofi_theme_check ]]; then if [[ ! -f $rofi_theme_check ]]; then
echo "Rofi Theme ${chosen} not found" echo "Rofi Theme ${chosen} not found"
exit 1 exit 1
fi fi