fix gradients setter

master
Daniel Napora 2021-01-17 14:50:27 +01:00
parent da86c426fe
commit ee70564721
1 changed files with 14 additions and 5 deletions

View File

@ -291,23 +291,32 @@ out+=("^sep(<i>$COLOR_SCHEME</i>)")
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")
out+=("$CHOOSE,^checkout(motywy)")
if [ $jgmenu_theme != obtheme ]; then
out+=("$CHOOSE,^checkout(motywy)")
if [ $jgmenu_theme != obtheme ]; then #INNY NIŻ OB THEME
. $HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc
out+=("$EDIT_CURRENT: (<i>$jgmenu_theme</i>),geany $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc,geany")
out+=("<s>$FOLLOW_OB</s>,mb-setvar jgmenu_theme=obtheme;$me
^sep()")
out+=("$GRADIENT [ <b>${menu_gradient_pos:-none}</b> ],^checkout(gradient)")
out2+=("^tag(gradient)")
for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "<tt>%14s</tt>,%s" "$i" "mb-setvar menu_gradient_pos=${i} $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc;$me")");done
out2+=("^tag(motywy)")
else
. $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc
out+=("#${menu_gradient_pos}\n")
out+=("$EDIT_CURRENT: (<i>${wm_theme// /_}</i>),geany $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc,geany")
out+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;$me
^sep()")
fi
. $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc
out+=("$GRADIENT [ <b>${menu_gradient_pos:-none}</b> ],^checkout(gradient)")
out2+=("^tag(gradient)")
for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "<tt>%14s</tt>,%s" "$i" "mb-setvar menu_gradient_pos=${i} $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc;$me")");done
out2+=("^tag(motywy)")
fi
for item in "$HOME"/.config/mabox/jgobthemes/*colorrc; do
theme="${item##*/}"