panels height/pos changes

master
Daniel Napora 2021-05-10 23:15:51 +02:00
parent 31473ae276
commit cf9fa9b88b
1 changed files with 59 additions and 27 deletions

View File

@ -81,7 +81,7 @@ menu_border = ${jgtools_border:-0}
# MENU MARGIN # MENU MARGIN
menu_margin_x = ${menu_margin_x:-0} 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} sub_spacing = ${submenu_spacing:-0}
menu_width = ${JGWIDTH:-40} menu_width = ${JGWIDTH:-40}
@ -171,8 +171,8 @@ cp ~/.config/jgmenu/sub-append.csv ~/.config/jgmenu/append.csv
fi fi
cat <<EOF > $HOME/.config/jgmenu/prepend.csv 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> @text,,$((jgtools_padding + 24)),$((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> @search,,$((jgtools_padding + 38)),$((jgtools_padding + 4)),150,20,2,left,top,auto,#000000 0,<i>$TYPE_TO_SEARCH</i>
^sep() ^sep()
. ~/.config/mabox/favorites.csv . ~/.config/mabox/favorites.csv
$sub_lines $sub_lines
@ -201,12 +201,25 @@ ITEM_HALIGN="left"
ARROW_STRING=" ⮜ " ARROW_STRING=" ⮜ "
JGWIDTH=40 JGWIDTH=40
TABS="100" TABS="100"
MENU_PADDING_TOP=$(expr $jgtools_padding + 70) MENU_PADDING_TOP=$((jgtools_padding + 70))
menu_margin_x=${submenu_spacing:-0} menu_margin_x=${submenu_spacing:-0}
panels_topmargin=${panels_topmargin:-0} #panels_topmargin=${panels_topmargin:-0}
eval $(xdotool getdisplaygeometry --shell) #### Compact or full height
MENU_HEIGHT_MIN=$(expr $HEIGHT - $panels_topmargin - $panels_topmargin) if [[ $panels_heightpos == "full" ]]; then
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN 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 case $LANG in
pl*) pl*)
@ -356,12 +369,12 @@ esac
mkconfigfile mkconfigfile
cat <<EOF > ${MENU_ITEMS} 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,${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,,$((jgtools_padding + 65)),$((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 + 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 #@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 . $HOME/.config/mabox/right-prepend.csv
@ -491,6 +504,7 @@ case $LANG in
SHORTCUTS="Skróty klawiszowe" SHORTCUTS="Skróty klawiszowe"
MENUPANELS="Ustawienia Menu/Paneli" MENUPANELS="Ustawienia Menu/Paneli"
TINT2SETTINGS="Ustawienia panelu Tint2" TINT2SETTINGS="Ustawienia panelu Tint2"
CONKYSETTINGS="Ustawienia Conky"
SSH_CONN="Połącz po SSH" SSH_CONN="Połącz po SSH"
;; ;;
es*) es*)
@ -503,6 +517,7 @@ case $LANG in
SHORTCUTS="Atajos del teclado" SHORTCUTS="Atajos del teclado"
MENUPANELS="Menu/Paneles laterales" MENUPANELS="Menu/Paneles laterales"
TINT2SETTINGS="Tint2 panel settings" TINT2SETTINGS="Tint2 panel settings"
CONKYSETTINGS="Conky settings"
SSH_CONN="Conexiones SSH" SSH_CONN="Conexiones SSH"
;; ;;
*) *)
@ -515,21 +530,37 @@ case $LANG in
SHORTCUTS="Keyboard shortcuts" SHORTCUTS="Keyboard shortcuts"
MENUPANELS="Menu/Sidepanels settings" MENUPANELS="Menu/Sidepanels settings"
TINT2SETTINGS="Tint2 panel settings" TINT2SETTINGS="Tint2 panel settings"
CONKYSETTINGS="Conky settings"
SSH_CONN="SSH connections" SSH_CONN="SSH connections"
;; ;;
esac esac
panels_topmargin=${panels_topmargin:-0} #panels_topmargin=${panels_topmargin:-0}
menu_margin_x=${submenu_spacing:-0} menu_margin_x=${submenu_spacing:-0}
[ $panels_topmargin == 0 ] && menu_margin_x=0 [ $panels_topmargin == 0 ] && menu_margin_x=0
#### Compact or full height
if [[ $panels_heightpos == "full" ]]; then
eval $(xdotool getdisplaygeometry --shell) eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN=$(expr $HEIGHT - $panels_topmargin - $panels_topmargin) MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN 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 JGWIDTH=40
jgmenu_icon_size=0 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} #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 #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_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_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_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 # VBOXES
[ $places_vboxes == true ] && vboxes=". $HOME/.config/mabox/vboxes.csv" || vboxes="" [ $places_vboxes == true ] && vboxes=". $HOME/.config/mabox/vboxes.csv" || vboxes=""
@ -565,10 +596,10 @@ fi
mkconfigfile mkconfigfile
cat <<EOF > ${MENU_ITEMS} 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 #@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,,$((jgtools_padding + 70)),$((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 + 30)),200,20,4,left,top,auto,#444444,<small>$USER@$HOSTNAME</small>
. $HOME/.config/mabox/places-prepend.csv . $HOME/.config/mabox/places-prepend.csv
. ${QNAV} . ${QNAV}
@ -582,6 +613,7 @@ $sshpipe
$softwarepipe $softwarepipe
$menusettingspipe $menusettingspipe
$tint2pipe $tint2pipe
$conkypipe
${vboxes} ${vboxes}
. $HOME/.config/mabox/places-append.csv . $HOME/.config/mabox/places-append.csv
@ -609,8 +641,8 @@ case $LANG in
*) CANCEL="Cancel";; *) CANCEL="Cancel";;
esac esac
jgtools_padding=${jgtools_padding:-0} jgtools_padding=${jgtools_padding:-0}
JGWIDTH=$(expr $jgtools_padding + "348" + $jgtools_padding) JGWIDTH=$((jgtools_padding + 348 + jgtools_padding))
MENU_PADDING_TOP=$(expr $jgtools_padding + 221) MENU_PADDING_TOP=$((jgtools_padding + 221))
TABS="250" TABS="250"
jgmenu_item_height=30 jgmenu_item_height=30
jgmenu_icon_size=26 jgmenu_icon_size=26
@ -621,10 +653,10 @@ mkconfigfile
#wmctrl -k on #wmctrl -k on
THUMB="$(DISPLAY=:0 scrot -t 340x213 -o $HOME/.config/mabox/mblogout.png -e 'echo $m')" THUMB="$(DISPLAY=:0 scrot -t 340x213 -o $HOME/.config/mabox/mblogout.png -e 'echo $m')"
cat <<EOF > ${MENU_ITEMS} 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 @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,,$((jgtools_padding + 180)),$((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 + 190)),200,20,4,left,top,${color_norm_fg% *},#DDDDDD,<small>$USER@$HOSTNAME</small>
. $HOME/.config/mabox/exit.csv . $HOME/.config/mabox/exit.csv
^sep() ^sep()
@ -681,8 +713,8 @@ case $LANG in
;; ;;
esac esac
jgtools_padding=${jgtools_padding:-0} jgtools_padding=${jgtools_padding:-0}
JGWIDTH=$(expr $jgtools_padding + "348" + $jgtools_padding) JGWIDTH=$((jgtools_padding + 348 + jgtools_padding))
MENU_PADDING_TOP=$(expr $jgtools_padding + 221) MENU_PADDING_TOP=$((jgtools_padding + 221))
MENU_HALIGN="center" MENU_HALIGN="center"
MENU_VALIGN="center" MENU_VALIGN="center"
TABS="280" TABS="280"
@ -701,7 +733,7 @@ THUMB="$(DISPLAY=:0 scrot -t 340x213 -o $HOME/.config/mabox/jgscrot.png -e 'echo
mkconfigfile mkconfigfile
cat <<EOF > ${MENU_ITEMS} 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) ^sep($SCRNSHOTS)
 $FULLSCR,^root(full)  $FULLSCR,^root(full)
 $ACTIVE_WIN,^root(window)  $ACTIVE_WIN,^root(window)