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