update menu/sidepanels theme handling
parent
e5c591aa15
commit
538f53d8ef
|
@ -27,19 +27,22 @@ jgmenu_theme=${jgmenu_theme:-obtheme}
|
||||||
|
|
||||||
case $jgmenu_theme in
|
case $jgmenu_theme in
|
||||||
default)
|
default)
|
||||||
export color_norm_fg="#FFFFFF "
|
#export color_norm_fg="#FFFFFF "
|
||||||
;;
|
;;
|
||||||
obtheme)
|
obtheme)
|
||||||
export color_title_fg="#FFFFFF "
|
#export color_title_fg="#FFFFFF "
|
||||||
ob_file=$HOME/.config/openbox/rc.xml
|
ob_file=$HOME/.config/openbox/rc.xml
|
||||||
[[ -f $ob_file ]] && wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file")
|
[[ -f $ob_file ]] && wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file")
|
||||||
|
if [ ! -f "$HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc" ]; then
|
||||||
|
obtheme2jgmenu
|
||||||
|
fi
|
||||||
while read -r a b c
|
while read -r a b c
|
||||||
do
|
do
|
||||||
[[ -n "$a" && "$a" != [[:blank:]#]* ]] && export "$a$b$c"
|
[[ -n "$a" && "$a" != [[:blank:]#]* ]] && export "$a$b$c"
|
||||||
done < $HOME/.config/mabox/jgobthemes/$wm_theme.colorrc
|
done < "$HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
export color_norm_fg="#FFFFFF "
|
#export color_norm_fg="#FFFFFF "
|
||||||
while read -r a b c
|
while read -r a b c
|
||||||
do
|
do
|
||||||
[[ -n "$a" && "$a" != [[:blank:]#]* ]] && export "$a$b$c"
|
[[ -n "$a" && "$a" != [[:blank:]#]* ]] && export "$a$b$c"
|
||||||
|
|
|
@ -5,10 +5,14 @@ ob_file=$HOME/.config/openbox/rc.xml
|
||||||
|
|
||||||
#Run only if theme doesn't exist
|
#Run only if theme doesn't exist
|
||||||
|
|
||||||
CONFFILE="$HOME/.config/mabox/jgobthemes/$wm_theme.colorrc"
|
CONFFILE="$HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc"
|
||||||
|
|
||||||
|
|
||||||
if [ ! -f "$CONFFILE" ]; then
|
if [ ! -f "$CONFFILE" ]; then
|
||||||
jgmenu_run init --apply-obtheme
|
jgmenu_run init --apply-obtheme
|
||||||
cp $HOME/.config/jgmenu/jgmenurc $HOME/.config/mabox/jgobthemes/$wm_theme.colorrc
|
grep -f $HOME/.config/mabox/jgobthemes/example.txt $HOME/.config/jgmenu/jgmenurc | sponge $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc
|
||||||
|
echo "color_title_border = #ffffff 50" >> "$CONFFILE"
|
||||||
|
#cp $HOME/.config/jgmenu/jgmenurc $HOME/.config/mabox/jgobthemes/$wm_theme.colorrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue