change themeswitcher.sh
This commit is contained in:
parent
62e3563dba
commit
69f24b5363
@ -4,7 +4,7 @@
|
||||
killall waybar
|
||||
|
||||
# Default theme: /THEMEFOLDER;/VARIATION
|
||||
themestyle="/ml4w;/ml4w/light"
|
||||
themestyle="cantina;light"
|
||||
|
||||
# Get current theme information from .cache/waybar.themestyle
|
||||
if [ -f ~/.cache/waybar.themestyle ]; then
|
||||
@ -15,11 +15,11 @@ else
|
||||
fi
|
||||
|
||||
IFS=';' read -ra arrThemes <<< "$themestyle"
|
||||
echo ${arrThemes[0]}
|
||||
#echo ${arrThemes[0]}
|
||||
|
||||
if [ ! -f ~/dotfiles/waybar/themes${arrThemes[1]}/style.css ]; then
|
||||
themestyle="/ml4w;/ml4w/light"
|
||||
if [ ! -f ~/dotfiles/waybar/themes/${arrThemes[0]}/${arrThemes[1]}/style.css ]; then
|
||||
themestyle="/cantina;/cantina/light"
|
||||
fi
|
||||
|
||||
# Loading the configuration and style file based
|
||||
waybar -c ~/dotfiles/waybar/themes${arrThemes[0]}/config -s ~/dotfiles/waybar/themes${arrThemes[1]}/style.css &
|
||||
waybar -c ~/dotfiles/waybar/themes/${arrThemes[0]}/config -s ~/dotfiles/waybar/themes/${arrThemes[0]}/${arrThemes[1]}/style.css &
|
||||
|
@ -15,9 +15,9 @@ do
|
||||
if [ $(find $value -maxdepth 1 -type d | wc -l) = 1 ]; then
|
||||
result=$(echo $value | sed "s#$HOME/dotfiles/waybar/themes/#/#g")
|
||||
IFS='/' read -ra arrThemes <<< "$result"
|
||||
listThemes[${#listThemes[@]}]="/${arrThemes[1]};$result"
|
||||
if [ -f $themes_path$result/config.sh ]; then
|
||||
source $themes_path$result/config.sh
|
||||
listThemes[${#listThemes[@]}]="${arrThemes[1]};${arrThemes[2]}"
|
||||
if [ -f $themes_path/${arrThemes[1]}/${arrThemes[2]}/config.sh ]; then
|
||||
source $themes_path/${arrThemes[1]}/${arrThemes[2]}/config.sh
|
||||
listNames+="$theme_name\n"
|
||||
else
|
||||
listNames+="/${arrThemes[1]};$result\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user