panels height/pos changes

This commit is contained in:
Daniel Napora 2021-05-10 23:15:51 +02:00
parent 31473ae276
commit cf9fa9b88b

View File

@ -81,7 +81,7 @@ menu_border = ${jgtools_border:-0}
# MENU MARGIN
menu_margin_x = ${menu_margin_x:-0}
menu_margin_y = ${panels_topmargin:-0}
menu_margin_y = ${MENU_MARGIN_Y:-0}
sub_spacing = ${submenu_spacing:-0}
menu_width = ${JGWIDTH:-40}
@ -171,8 +171,8 @@ cp ~/.config/jgmenu/sub-append.csv ~/.config/jgmenu/append.csv
fi
cat <<EOF > $HOME/.config/jgmenu/prepend.csv
@text,,$(expr $jgtools_padding + 24),$(expr $jgtools_padding + 4),150,20,0,left,top,auto,#000000,<span size="large"></span>
@search,,$(expr $jgtools_padding + 38),$(expr $jgtools_padding + 4),150,20,2,left,top,auto,#000000 0,<i>$TYPE_TO_SEARCH</i>
@text,,$((jgtools_padding + 24)),$((jgtools_padding + 4)),150,20,0,left,top,auto,#000000,<span size="large"></span>
@search,,$((jgtools_padding + 38)),$((jgtools_padding + 4)),150,20,2,left,top,auto,#000000 0,<i>$TYPE_TO_SEARCH</i>
^sep()
. ~/.config/mabox/favorites.csv
$sub_lines
@ -201,12 +201,25 @@ ITEM_HALIGN="left"
ARROW_STRING=" ⮜ "
JGWIDTH=40
TABS="100"
MENU_PADDING_TOP=$(expr $jgtools_padding + 70)
MENU_PADDING_TOP=$((jgtools_padding + 70))
menu_margin_x=${submenu_spacing:-0}
panels_topmargin=${panels_topmargin:-0}
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN=$(expr $HEIGHT - $panels_topmargin - $panels_topmargin)
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
#panels_topmargin=${panels_topmargin:-0}
#### Compact or full height
if [[ $panels_heightpos == "full" ]]; then
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
MENU_RADIUS="0"
menu_margin_x="0"
elif [[ $panels_heightpos == "top" ]]; then
MENU_VALIGN="top"
MENU_MARGIN_Y=${panels_topmargin:-0}
elif [[ $panels_heightpos == "bottom" ]]; then
MENU_VALIGN="bottom"
MENU_MARGIN_Y=${panels_topmargin:-0}
else
MENU_VALIGN="center"
fi
case $LANG in
pl*)
@ -356,12 +369,12 @@ esac
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$(expr $jgtools_padding + 10),$(expr $jgtools_padding + 10),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/distributor-logo-mabox.png
@icon,,$((jgtools_padding + 10)),$((jgtools_padding + 10)),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/distributor-logo-mabox.png
#@text,,$(expr $jgtools_padding + 65),$(expr $jgtools_padding + 10),200,20,4,left,top,${color_sel_fg% *},#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup>
@text,,$(expr $jgtools_padding + 65),$(expr $jgtools_padding + 10),200,20,4,left,top,auto,#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup>
@text,,$(expr $jgtools_padding + 65),$(expr $jgtools_padding + 30),200,20,4,left,top,auto,#444444,<small>$USER@$HOSTNAME</small>
@text,,$((jgtools_padding + 65)),$((jgtools_padding + 10)),200,20,4,left,top,auto,#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup>
@text,,$((jgtools_padding + 65)),$((jgtools_padding + 30)),200,20,4,left,top,auto,#444444,<small>$USER@$HOSTNAME</small>
#@icon,,5,$(expr $MENU_HEIGHT_MIN - 180),240,180,4,center,top,,,$BOTTOM_IMG
@search,,$(expr $jgtools_padding + 80),$(expr $jgtools_padding + 50),292,20,4,left,top,auto,#262626,"""<big></big> <small><i>$TYPE_TO_SEARCH</i></small>"""
@search,,$((gtools_padding + 80)),$((jgtools_padding + 50)),292,20,4,left,top,auto,#262626,"""<big></big> <small><i>$TYPE_TO_SEARCH</i></small>"""
. $HOME/.config/mabox/right-prepend.csv
@ -491,6 +504,7 @@ case $LANG in
SHORTCUTS="Skróty klawiszowe"
MENUPANELS="Ustawienia Menu/Paneli"
TINT2SETTINGS="Ustawienia panelu Tint2"
CONKYSETTINGS="Ustawienia Conky"
SSH_CONN="Połącz po SSH"
;;
es*)
@ -503,6 +517,7 @@ case $LANG in
SHORTCUTS="Atajos del teclado"
MENUPANELS="Menu/Paneles laterales"
TINT2SETTINGS="Tint2 panel settings"
CONKYSETTINGS="Conky settings"
SSH_CONN="Conexiones SSH"
;;
*)
@ -515,21 +530,37 @@ case $LANG in
SHORTCUTS="Keyboard shortcuts"
MENUPANELS="Menu/Sidepanels settings"
TINT2SETTINGS="Tint2 panel settings"
CONKYSETTINGS="Conky settings"
SSH_CONN="SSH connections"
;;
esac
panels_topmargin=${panels_topmargin:-0}
#panels_topmargin=${panels_topmargin:-0}
menu_margin_x=${submenu_spacing:-0}
[ $panels_topmargin == 0 ] && menu_margin_x=0
#### Compact or full height
if [[ $panels_heightpos == "full" ]]; then
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN=$(expr $HEIGHT - $panels_topmargin - $panels_topmargin)
MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
MENU_RADIUS="0"
menu_margin_x="0"
elif [[ $panels_heightpos == "top" ]]; then
MENU_VALIGN="top"
MENU_MARGIN_Y=${panels_topmargin:-0}
elif [[ $panels_heightpos == "bottom" ]]; then
MENU_VALIGN="bottom"
MENU_MARGIN_Y=${panels_topmargin:-0}
else
MENU_VALIGN="center"
fi
JGWIDTH=40
jgmenu_icon_size=0
MENU_PADDING_TOP=$(expr $jgtools_padding + 60)
MENU_PADDING_TOP=$((jgtools_padding + 60))
#BOTTOM_IMG=${places_bottom_img:-/usr/share/mb-jgtools/mabox_3D_silver.png}
#if [[ $places_softwarepipe || $places_sysinfopipe || $places_keyspipe ]];then pipeseparator="^sep($PIPEMENUS)";fi
@ -557,7 +588,7 @@ fi
[ $places_keyspipe == true ] && keyspipe="<big></big> $SHORTCUTS,^pipe(jgkeys-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_sshpipe == true ] && sshpipe="<big></big> $SSH_CONN,^pipe(jgssh -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_softwarepipe == true ] && softwarepipe="<big></big> $POPINSTALL,^pipe(jgsoftware-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_conkypipe == true ] && conkypipe="<big></big> $CONKYSETTINGS,^pipe(jgconky-pipe -r)" && pipesep="^sep($PIPEMENUS)"
# VBOXES
[ $places_vboxes == true ] && vboxes=". $HOME/.config/mabox/vboxes.csv" || vboxes=""
@ -565,10 +596,10 @@ fi
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$(expr $jgtools_padding + 10),$(expr $jgtools_padding + 10),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
@icon,,$((jgtools_padding + 10)),$((jgtools_padding + 10)),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
#@icon,,10,$(expr $MENU_HEIGHT_MIN - 160),240,180,4,center,top,,,$BOTTOM_IMG
@text,,$(expr $jgtools_padding + 70),$(expr $jgtools_padding + 10),200,20,4,left,top,auto,#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup>
@text,,$(expr $jgtools_padding + 70),$(expr $jgtools_padding + 30),200,20,4,left,top,auto,#444444,<small>$USER@$HOSTNAME</small>
@text,,$((jgtools_padding + 70)),$((jgtools_padding + 10)),200,20,4,left,top,auto,#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup>
@text,,$((jgtools_padding + 70)),$((jgtools_padding + 30)),200,20,4,left,top,auto,#444444,<small>$USER@$HOSTNAME</small>
. $HOME/.config/mabox/places-prepend.csv
. ${QNAV}
@ -582,6 +613,7 @@ $sshpipe
$softwarepipe
$menusettingspipe
$tint2pipe
$conkypipe
${vboxes}
. $HOME/.config/mabox/places-append.csv
@ -609,8 +641,8 @@ case $LANG in
*) CANCEL="Cancel";;
esac
jgtools_padding=${jgtools_padding:-0}
JGWIDTH=$(expr $jgtools_padding + "348" + $jgtools_padding)
MENU_PADDING_TOP=$(expr $jgtools_padding + 221)
JGWIDTH=$((jgtools_padding + 348 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 221))
TABS="250"
jgmenu_item_height=30
jgmenu_icon_size=26
@ -621,10 +653,10 @@ mkconfigfile
#wmctrl -k on
THUMB="$(DISPLAY=:0 scrot -t 340x213 -o $HOME/.config/mabox/mblogout.png -e 'echo $m')"
cat <<EOF > ${MENU_ITEMS}
@icon,,$(expr $jgtools_padding + 4),$(expr $jgtools_padding + 4),340,100,4,left,top,,,$THUMB
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),340,100,4,left,top,,,$THUMB
@icon,,10,10,48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
@text,,$(expr $jgtools_padding + 180),$(expr $jgtools_padding + 170),220,20,4,left,top,${color_sel_fg% *},${color_sel_bg% *},$OSNAME $OSVERSION <sup> $OSCODE</sup>
@text,,$(expr $jgtools_padding + 180),$(expr $jgtools_padding + 190),200,20,4,left,top,${color_norm_fg% *},#DDDDDD,<small>$USER@$HOSTNAME</small>
@text,,$((jgtools_padding + 180)),$((jgtools_padding + 170)),220,20,4,left,top,${color_sel_fg% *},${color_sel_bg% *},$OSNAME $OSVERSION <sup> $OSCODE</sup>
@text,,$((jgtools_padding + 180)),$((jgtools_padding + 190)),200,20,4,left,top,${color_norm_fg% *},#DDDDDD,<small>$USER@$HOSTNAME</small>
. $HOME/.config/mabox/exit.csv
^sep()
@ -681,8 +713,8 @@ case $LANG in
;;
esac
jgtools_padding=${jgtools_padding:-0}
JGWIDTH=$(expr $jgtools_padding + "348" + $jgtools_padding)
MENU_PADDING_TOP=$(expr $jgtools_padding + 221)
JGWIDTH=$((jgtools_padding + 348 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 221))
MENU_HALIGN="center"
MENU_VALIGN="center"
TABS="280"
@ -701,7 +733,7 @@ THUMB="$(DISPLAY=:0 scrot -t 340x213 -o $HOME/.config/mabox/jgscrot.png -e 'echo
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$(expr $jgtools_padding + 4),$(expr $jgtools_padding + 4),340,100,4,left,top,,,$THUMB
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),340,100,4,left,top,,,$THUMB
^sep($SCRNSHOTS)
 $FULLSCR,^root(full)
 $ACTIVE_WIN,^root(window)