menu/sidepanel resize option added

master
Daniel Napora 2020-03-06 14:23:50 +01:00
parent 21f9ef0815
commit ae627fa13a
6 changed files with 59 additions and 24 deletions

View File

@ -21,7 +21,7 @@ case $jgmenu_theme in
export color_norm_fg="#FFFFFF "
;;
esac
. $HOME/.config/mabox/jgmenusize.conf
gtkbookmarks() {
BOOKMARKS="$HOME/.gtk-bookmarks"
@ -44,18 +44,14 @@ esac
fi
}
JGWIDTH="280"
WEBBROWSER="exo-open --launch WebBrowser"
[ $(pidof picom) ] && RADIUS="4"
#SCREENWIDTH=$(xdpyinfo | awk '/^ +dimensions/ {print $2}' | cut -d 'x' -f1)
#Poniższe, wywalić do mabox.conf który i tak jest wczytywany - uaktualiać przez usługę z autostartu + sponge z moreutils
OSNAME=$(lsb_release -d | awk '{print $2}')
OSVERSION=$(lsb_release -r | awk '{print $2}')
OSCODE=$(lsb_release -c | awk '{print $2}')
#KERNEL=$(uname -r)
mkconfigfile() {
@ -72,7 +68,7 @@ menu_margin_y = 0
menu_width = $JGWIDTH
menu_height_min = ${MENU_HEIGHT_MIN:-0}
menu_height_max = ${MENU_HEIGHT_MAX:-0}
menu_padding_top = ${MENU_PADDING_TOP:-90}
menu_padding_top = ${MENU_PADDING_TOP:-70}
menu_padding_right = ${MENU_PADDING_RIGHT:-10}
menu_padding_bottom = ${MENU_PADDING_BOTTOM:-10}
menu_padding_left = ${MENU_PADDING_LEFT:-10}
@ -80,9 +76,10 @@ menu_radius = ${MENU_RADIUS:-0}
menu_valign = ${MENU_VALIGN:-top}
menu_halign = ${MENU_HALIGN:-left}
item_height = ${ITEM_HEIGHT:-20}
item_height = ${jgmenu_item_height:-20}
item_halign = ${ITEM_HALIGN:-left}
item_padding = 4
item_margin_y = ${item_margin_y:-3}
item_radius = ${item_radius:-2}
item_border = ${item_border:-0}
arrow_string = ${ARROW_STRING:-⮞}
@ -105,9 +102,10 @@ color_scroll_ind = ${COLOR_SCROLL_IND:-#504e65 100}
sep_markup = weight="bold" foreground="${color_title_fg% *}"
sep_height = ${sep_height:-5}
font = ${jgmenu_font:-Noto Sans Medium 9}
icon_size = ${ICON_SIZE:-0}
icon_theme = ${jgmenu_icon_theme:-Numix-Square}
icon_size = ${jgmenu_icon_size:-0}
icon_theme = ${jgmenu_icon_theme:-Numix-Circle}
EOF
unset font
@ -126,13 +124,11 @@ MENU_PADDING_TOP=30
MENU_PADDING_RIGHT=0
MENU_PADDING_BOTTOM=0
MENU_PADDING_LEFT=0
JGWIDTH=0
ITEM_HEIGHT=20
[ $jgmenu_use_icons == true ] && ICON_SIZE=16
MENU_RADIUS=${RADIUS:-0}
mkconfigfile
#jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
jgmenu --config-file=${CONFIG_FILE} 2>/dev/null
}
@ -145,7 +141,6 @@ trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT
MENU_HALIGN="right"
ITEM_HALIGN="left"
ARROW_STRING=" ⮜ "
[ $jgmenu_use_icons == true ] && ICON_SIZE=18
TABS="100"
MENU_HEIGHT_MIN=$(xdpyinfo | awk '/^ +dimensions/ {print $2}' | cut -d 'x' -f2)
@ -190,6 +185,12 @@ case $LANG in
COMPOSER="Kompozytor"
MABOX_THEMES="Predefiniowane konfiguracje pulpitu"
THEME_MNGR="Menadżer schematów"
SIZE="Rozmiar Menu i Paneli"
TINY="malutki"
SMALL="mały"
NORMAL="normalny"
BIG="duży"
HUGE="wielki"
;;
*)
TYPE_TO_SEARCH="type to search"
@ -231,6 +232,12 @@ case $LANG in
COMPOSER="Composer"
MABOX_THEMES="Mabox Themes"
THEME_MNGR="Theme Manager"
SIZE="Menu/Sidepanels Size"
TINY="tiny"
SMALL="small"
NORMAL="normal"
BIG="big"
HUGE="huge"
;;
esac
@ -238,13 +245,13 @@ esac
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,225,10,48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/distributor-logo-mabox.png
@text,,20,10,200,20,4,left,top,${color_title_fg% *},#111111,<big>$OSNAME $OSVERSION</big> <sup> $OSCODE</sup>
@text,,20,30,200,20,4,left,top,#666666,#444444,<small>$USER@$HOSTNAME</small>
@icon,,15,10,48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/distributor-logo-mabox.png
@text,,70,10,200,20,4,left,top,${color_title_fg% *},#111111,<big>$OSNAME $OSVERSION</big> <sup> $OSCODE</sup>
@text,,70,30,200,20,4,left,top,#666666,#444444,<small>$USER@$HOSTNAME</small>
@text,,20,50,200,20,4,left,top,#666666,#444444,
#@rect,,40,70,262,20,0,left,top,#666666,#262626,
@text,,74,70,20,20,0,left,top,auto,#222222,<big></big>
@search,,90,70,292,20,4,left,top,auto,#262626,""" <i>$TYPE_TO_SEARCH</i>"""
@text,,84,50,20,20,0,left,top,auto,#222222,<big></big>
@search,,100,50,292,20,4,left,top,auto,#262626,""" <small><i>$TYPE_TO_SEARCH</i></small>"""
. $HOME/.config/mabox/right-prepend.csv
@ -259,7 +266,7 @@ $MIRROR_RANK,^root(mirrory),download
$MCC,mcc,distributor-logo-mabox
$SYS_AND_HARDWARE,^root(system),audiocard
$LOOK_AND_FEEL,^root(wyglad),preferences-color
$SIZE,^checkout(menusize),applications-development
^sep($HELP)
$SHORTCUTS,mb-kb --gui &>/dev/null,key_bindings
$ONLINE_RES,^root(weblinks),web-browser
@ -269,6 +276,13 @@ $SCREENSHOT,mb-jgtools screenshot,emblem-photos
. $HOME/.config/mabox/right-append.csv
. $HOME/.config/mabox/exit.csv
^tag(menusize)
^sep($SIZE)
<small><small>$TINY</small></small>,cat /usr/share/mb-jgtools/tiny > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
<small>$SMALL</small>,cat /usr/share/mb-jgtools/small > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
$NORMAL,cat /usr/share/mb-jgtools/normal > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
<big>$BIG</big>,cat /usr/share/mb-jgtools/big > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
<big><big>$HUGE</big></big>,cat /usr/share/mb-jgtools/huge > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
^tag(system)
^sep($SYS_AND_HARDWARE)
@ -313,6 +327,7 @@ $THEME_MNGR,mb-obthemes,preferences-desktop-theme
Mabox - pierwsze kroki,exo-open --launch WebBrowser https://pl.maboxlinux.org/przewodnik-uzytkownika/,distributor-logo-mabox
Forum Mabox,exo-open --launch WebBrowser https://forum.maboxlinux.org/,distributor-logo-mabox
^sep(Manjaro)
Stable Updates,exo-open --launch WebBrowser https://forum.manjaro.org/c/announcements/stable-updates/,distributor-logo-manjaro
Home site,exo-open --launch WebBrowser https://manjaro.org,distributor-logo-manjaro
Wiki,exo-open --launch WebBrowser https://wiki.manjaro.org,distributor-logo-manjaro
Forum,exo-open --launch WebBrowser https://forum.manjaro.org,distributor-logo-manjaro
@ -356,8 +371,8 @@ case $LANG in
esac
MENU_HEIGHT_MIN=$(xdpyinfo | awk '/^ +dimensions/ {print $2}' | cut -d 'x' -f2)
JGWIDTH=250
ITEM_HEIGHT=20
JGWIDTH=220
jgmenu_icon_size=0
MENU_PADDING_TOP=70
mkconfigfile
@ -411,8 +426,8 @@ MENU_HALIGN="center"
MENU_VALIGN="center"
MENU_PADDING_TOP=221
TABS="250"
ITEM_HEIGHT="30"
ICON_SIZE="24"
jgmenu_item_height=30
jgmenu_icon_size=26
font="Noto Sans Medium 11"
MENU_RADIUS=${RADIUS:-0}
@ -473,6 +488,7 @@ MENU_HALIGN="center"
MENU_VALIGN="center"
TABS="280"
ITEM_HEIGHT=25
jgmenu_icon_size=0
font='Noto Sans Medium 10'
MENU_RADIUS=${RADIUS:-0}

3
mb-jgtools/big 100644
View File

@ -0,0 +1,3 @@
jgmenu_font="Noto Sans Medium 10"
jgmenu_item_height=20
jgmenu_icon_size=18

3
mb-jgtools/huge 100644
View File

@ -0,0 +1,3 @@
jgmenu_font="Noto Sans Medium 11"
jgmenu_item_height=22
jgmenu_icon_size=20

View File

@ -0,0 +1,3 @@
jgmenu_font="Noto Sans Medium 9"
jgmenu_item_height=18
jgmenu_icon_size=16

5
mb-jgtools/small 100644
View File

@ -0,0 +1,5 @@
jgmenu_font="Noto Sans Medium 8"
jgmenu_item_height=16
jgmenu_icon_size=12
sep_height=2
item_margin_y=2

5
mb-jgtools/tiny 100644
View File

@ -0,0 +1,5 @@
jgmenu_font="Noto Sans Medium 7"
jgmenu_item_height=14
jgmenu_icon_size=8
sep_height=1
item_margin_y=1