From 4a5313f01062dbfbc2099c50a4391e8751261854 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Thu, 19 Jan 2023 14:56:43 +0100 Subject: [PATCH] menu theme selection back --- usr/bin/jgmenusettings-pipe | 54 ++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/usr/bin/jgmenusettings-pipe b/usr/bin/jgmenusettings-pipe index b6ac02f..0275581 100755 --- a/usr/bin/jgmenusettings-pipe +++ b/usr/bin/jgmenusettings-pipe @@ -371,37 +371,37 @@ out2+=("^tag(lineheight)") for i in 160 180 200 240 280 300 400; do out2+=("$(printf "%4s%%,%s" "$i" "mb-setvar item_height_factor=${i};$me")");done ########## THEMES -#out+=("^sep($COLOR_SCHEME)") +out+=("^sep($COLOR_SCHEME)") -#ob_file=$HOME/.config/openbox/rc.xml -#[[ -f $ob_file ]] && wm_theme=$(awk '// {while (getline n) {if (match(n, //)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file") +ob_file=$HOME/.config/openbox/rc.xml +[[ -f $ob_file ]] && wm_theme=$(awk '// {while (getline n) {if (match(n, //)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file") -#if [ $jgmenu_theme != obtheme ]; then #INNY NIŻ OB THEME -#. $HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc > /dev/null 2>&1 & -#out+=("$CHOOSE [$jgmenu_theme],^checkout(motywy)") -#out+=("$EDIT_CURRENT: ($jgmenu_theme),xdg-open $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc,geany") -#out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me") -#out+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;$me -#^sep()") -#out+=("$GRADIENT [ ${menu_gradient_pos:-none} ],^checkout(gradient)") -#out2+=("^tag(gradient)") -#for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "%14s,%s" "$i" "mb-setvar menu_gradient_pos=${i};$me")");done -#out2+=("^tag(motywy)") -#else +if [ $jgmenu_theme != obtheme ]; then #INNY NIŻ OB THEME +. $HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc > /dev/null 2>&1 & +out+=("$CHOOSE [$jgmenu_theme],^checkout(motywy)") +out+=("$EDIT_CURRENT: ($jgmenu_theme),xdg-open $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc,geany") +out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me") +out+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;$me +^sep()") +out+=("$GRADIENT [ ${menu_gradient_pos:-none} ],^checkout(gradient)") +out2+=("^tag(gradient)") +for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "%14s,%s" "$i" "mb-setvar menu_gradient_pos=${i};$me")");done +out2+=("^tag(motywy)") +else -#. $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc > /dev/null 2>&1 & -#out+=("#${menu_gradient_pos}\n") -#out+=("$CHOOSE [${wm_theme// /_}],^checkout(motywy)") -#out+=("$EDIT_CURRENT: (${wm_theme// /_}),xdg-open $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc,geany") -#out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me") -#out+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;$me -#^sep()") -#out+=("$GRADIENT [ ${menu_gradient_pos:-none} ],^checkout(gradient)") -#out2+=("^tag(gradient)") -#for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "%14s,%s" "$i" "mb-setvar menu_gradient_pos=${i} $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc;$me")");done -#out2+=("^tag(motywy)") -#fi +. $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc > /dev/null 2>&1 & +out+=("#${menu_gradient_pos}\n") +out+=("$CHOOSE [${wm_theme// /_}],^checkout(motywy)") +out+=("$EDIT_CURRENT: (${wm_theme// /_}),xdg-open $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc,geany") +out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me") +out+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;$me +^sep()") +out+=("$GRADIENT [ ${menu_gradient_pos:-none} ],^checkout(gradient)") +out2+=("^tag(gradient)") +for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "%14s,%s" "$i" "mb-setvar menu_gradient_pos=${i} $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc;$me")");done +out2+=("^tag(motywy)") +fi