diff --git a/usr/bin/jgmenusettings-pipe b/usr/bin/jgmenusettings-pipe index 323b697..40bb3bb 100755 --- a/usr/bin/jgmenusettings-pipe +++ b/usr/bin/jgmenusettings-pipe @@ -51,7 +51,7 @@ case $LANG in SQUARE="Kwadratowe ikony (Numix)" SHOW_ICONS="Pokaż ikony" HIDE_ICONS="Ukryj ikony" - INSTALL_SARDI="Instaluj sardi-icons" + INSTALL="Instaluj" SIZE="Rozmiar i czcionka" FONT_FAMILY="Czcionka" FONT_SIZE="Rozmiar czcionki" @@ -110,7 +110,7 @@ case $LANG in SQUARE="Cuadrado iconos (Numix)" SHOW_ICONS="Mostrar iconos" HIDE_ICONS="Ocultar iconos" - INSTALL_SARDI="Instalar sardi-icons" + INSTALL="Instalar" SIZE="Tamaño de Menu/Panel lateral" FONT_FAMILY="Familia tipográfica" FONT_SIZE="Tamaño de fuente" @@ -169,7 +169,7 @@ case $LANG in SQUARE="Square icons (Numix)" SHOW_ICONS="Show icons" HIDE_ICONS="Hide icons" - INSTALL_SARDI="Install sardi-icons" + INSTALL="Install" SIZE="Menu/Sidepanels Size and Font" FONT_FAMILY="Font Family" FONT_SIZE="Font Size" @@ -215,6 +215,7 @@ out2+=("^sep($MODULES)") [[ $places_vboxes == false ]] && out2+=("$VBOXES,mb-setvar places_vboxes=true;$L") || out2+=("$VBOXES,mb-setvar places_vboxes=false;$L") out2+=("^sep($PIPEMENUS)") +[[ $places_menusettingspipe = false ]] && out2+=("$MENUPANELS,mb-setvar places_menusettingspipe=true;$L") || out2+=("$MENUPANELS,mb-setvar places_menusettingspipe=false;$L") [[ $places_jgdesktops = false ]] && out2+=("$DESKTOPS,mb-setvar places_jgdesktops=true;$L") || out2+=("$DESKTOPS,mb-setvar places_jgdesktops=false;$L") [[ $places_jgdeskmngr = false ]] && out2+=("$DESKMNGR,mb-setvar places_jgdeskmngr=true;$L") || out2+=("$DESKMNGR,mb-setvar places_jgdeskmngr=false;$L") [[ $places_jgdeskgrid = false ]] && out2+=("$DESKGRID,mb-setvar places_jgdeskgrid=true;$L") || out2+=("$DESKGRID,mb-setvar places_jgdeskgrid=false;$L") @@ -222,7 +223,7 @@ out2+=("^sep($PIPEMENUS)") [[ $places_keyspipe = false ]] && out2+=("$SHORTCUTS,mb-setvar places_keyspipe=true;$L") || out2+=("$SHORTCUTS,mb-setvar places_keyspipe=false;$L") [[ $places_sshpipe = false ]] && out2+=("$SSH_CONN,mb-setvar places_sshpipe=true;$L") || out2+=("$SSH_CONN,mb-setvar places_sshpipe=false;$L") [[ $places_softwarepipe = false ]] && out2+=("$POPINSTALL,mb-setvar places_softwarepipe=true;$L") || out2+=("$POPINSTALL,mb-setvar places_softwarepipe=false;$L") -[[ $places_menusettingspipe = false ]] && out2+=("$MENUPANELS,mb-setvar places_menusettingspipe=true;$L") || out2+=("$MENUPANELS,mb-setvar places_menusettingspipe=false;$L") + [[ $places_tint2pipe = false ]] && out2+=("$TINT2,mb-setvar places_tint2pipe=true;$L") || out2+=("$TINT2,mb-setvar places_tint2pipe=false;$L") [[ $places_conkypipe = false ]] && out2+=("$CONKY,mb-setvar places_conkypipe=true;$L") || out2+=("$CONKY,mb-setvar places_conkypipe=false;$L") @@ -321,7 +322,7 @@ ob_file=$HOME/.config/openbox/rc.xml if [ $jgmenu_theme != obtheme ]; then #INNY NIŻ OB THEME -. $HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc +. $HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc > /dev/null 2>&1 & out+=("$CHOOSE [$jgmenu_theme],^checkout(motywy)") out+=("$EDIT_CURRENT: ($jgmenu_theme),geany $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc,geany") out+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;$me @@ -332,7 +333,7 @@ for i in none top right bottom left top_left top_right bottom_left bottom_right; out2+=("^tag(motywy)") else -. $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc +. $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// /_}),geany $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc,geany") @@ -350,18 +351,23 @@ fi for item in "$HOME"/.config/mabox/jgobthemes/*colorrc; do theme="${item##*/}" out2+=("${theme%.*},mb-setvar jgmenu_theme=${theme%.*};$me") - done +done ########## ICONS out+=("^sep($ICONS)") if [ $jgmenu_use_icons == true ]; then - out+=("$HIDE_ICONS,mb-setvar jgmenu_use_icons=false;$me") + out+=("$HIDE_ICONS [ ${jgmenu_icon_theme} ],mb-setvar jgmenu_use_icons=false;$me") else - out+=("$SHOW_ICONS,mb-setvar jgmenu_use_icons=true;$me") + out+=("$SHOW_ICONS [ ${jgmenu_icon_theme} ],mb-setvar jgmenu_use_icons=true;$me") fi out+=("^sep()") out+=("$SQUARE,mb-setvar jgmenu_icon_theme=Numix-Square;mb-setvar jgmenu_use_icons=true;$me") out+=("$CIRCLE,mb-setvar jgmenu_icon_theme=Numix-Circle;mb-setvar jgmenu_use_icons=true;$me") +if [ -d /usr/share/icons/BeautyLine ];then +out+=("BeautyLine,mb-setvar jgmenu_icon_theme=BeautyLine;mb-setvar jgmenu_use_icons=true;$me") +else +out+=("$INSTALL BeautyLine icons, pamac-installer beautyline") +fi if [ -d /usr/share/icons/Sardi-Arc ];then out+=("^sep()") out+=("Sardi,^checkout(sardi)") @@ -373,7 +379,7 @@ out2+=("Sardi-Flexible,mb-setvar jgmenu_icon_theme=Sardi-Flexible;mb-setvar jgme out2+=("Sardi-Mono,mb-setvar jgmenu_icon_theme=Sardi-Mono;mb-setvar jgmenu_use_icons=true;$me") else out+=("^sep()") -out+=("$INSTALL_SARDI, pamac-installer sardi-icons") +out+=("$INSTALL Sardi icons, pamac-installer sardi-icons") fi @@ -381,7 +387,7 @@ fi ### RUN -if [ $1 == "-s" ]; then +if [[ $1 == "-s" ]]; then . /usr/bin/pipemenu-standalone.cfg @@ -394,6 +400,7 @@ mkconfigfile cat < ${MENU_ITEMS} $(printf '%s\n' "${out[@]}") $(printf '%s\n' "${out2[@]}") +$(printf '%s\n' "${out3[@]}") EOF jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null exit 0 diff --git a/usr/bin/mbhelper b/usr/bin/mbhelper new file mode 100755 index 0000000..a41da89 --- /dev/null +++ b/usr/bin/mbhelper @@ -0,0 +1,56 @@ +#!/bin/bash +# mbhelper - command palette like menu, search and run, quick access to +# all important config tools, edit config files, show keybord shortcuts +# favorites, online resources and more. +# + +case $LANG in + pl*) + LNGDIR="pl" + TYPE_TO_SEARCH="pisz aby wyszukać" + + ;; + es*) + LNGDIR="en" + TYPE_TO_SEARCH="type to search" + ;; + *) + LNGDIR="en" + TYPE_TO_SEARCH="type to search" + ;; +esac + +[[ -f "$HOME/.config/mabox/mbhelper.csv" ]] && CSVFILE="$HOME/.config/mabox/mbhelper.csv" || CSVFILE="/usr/share/mabox/lang/${LNGDIR}/.config/mabox/mbhelper.csv" + + +### RUN +if [ $1 == "-s" ]; then +. /usr/bin/pipemenu-standalone.cfg +. $HOME/.config/mabox/mabox.conf +MENU_PADDING_TOP=24 +MENU_HALIGN="center" +MENU_VALIGN="top" +MENU_MARGIN_Y=40 +jgmenu_icon_size=0 +JGWIDTH=500 +MENU_HEIGHT_MAX=600 + + +[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius +[ -z $jgmenu_use_borders ] && menu_border=0 + +mkconfigfile + +cat < ${MENU_ITEMS} +@search,,10,5,292,20,4,left,top,auto,#262626,""" $TYPE_TO_SEARCH""" +. $CSVFILE +EOF + +jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null + +exit 0 + +fi +printf '%s\n' "${out[@]}" + +