apps in submenu option, ssh-pipe

master
Daniel Napora 2021-01-27 12:53:11 +01:00
parent 7a6039c99a
commit c69d3f5706
1 changed files with 29 additions and 6 deletions

View File

@ -73,7 +73,7 @@ esac
while read -r line
do
uri=$(echo $line | cut -b 8- | cut -d' ' -f1 | sed 's/%20/ /g')
dirs+=("${line#* },^pipe(jgbrowser \"${uri}\")")
dirs+=("${line#* },^pipe(jgbrowser \"${uri}\")")
done <"$BOOKMARKS"
printf "%b\n" "^sep($GTK_BOOKMARKS)"
printf '%s\n' "${dirs[@]}"
@ -164,19 +164,36 @@ POSITION_MODE=${1:-pointer}
HIDE_BACK_ITEMS=1
#MENU_PADDING_TOP=24
MENU_PADDING_TOP=$(expr $jgtools_padding + 24)
panels_topmargin=0
### write header file to prepend.csv
case $LANG in
pl*) TYPE_TO_SEARCH="Pisz aby wyszukać";;
es*) TYPE_TO_SEARCH="Buscar";;
*) TYPE_TO_SEARCH="type to search";;
pl*) TYPE_TO_SEARCH="Pisz aby Wyszukać"
APPS="Programy";;
es*) TYPE_TO_SEARCH="Buscar"
APPS="Aplicationes";;
*) TYPE_TO_SEARCH="Type to Search"
APPS="Applications";;
esac
#apps_in_submenu=true
if [[ $apps_in_submenu == true ]]
then
sub_lines="$APPS,^checkout(lx-apps),applications-other
. ~/.config/jgmenu/sub-append.csv
^tag(lx-apps)"
[ ! -f ~/.config/jgmenu/sub-append.csv ] && cp ~/.config/jgmenu/append.csv ~/.config/jgmenu/sub-append.csv
rm -f ~/.config/jgmenu/append.csv
else
sub_lines=""
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>
^sep()
. ~/.config/mabox/favorites.csv
$sub_lines
EOF
@ -196,7 +213,7 @@ CONFIG_FILE=$(mktemp)
MENU_ITEMS=$(mktemp)
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT
[ $jgmenu_use_icons == false ] && jgmenu_icon_size=0
BOTTOM_IMG=${right_bottom_img:-/usr/share/mb-jgtools/mabox_3D_gold.png}
#BOTTOM_IMG=${right_bottom_img:-/usr/share/mb-jgtools/mabox_3D_gold.png}
MENU_HALIGN="right"
ITEM_HALIGN="left"
ARROW_STRING=" ⮜ "
@ -488,6 +505,7 @@ case $LANG in
SYSINFO="Informacje o systemie"
SHORTCUTS="Skróty klawiszowe"
MENUPANELS="Ustawienia Menu/Paneli"
SSH_CONN="Połącz po SSH"
;;
es*)
QUICK_NAV="Navegación rápida"
@ -498,6 +516,7 @@ case $LANG in
SYSINFO="System information"
SHORTCUTS="Atajos del teclado"
MENUPANELS="Menu/Paneles laterales"
SSH_CONN="SSH"
;;
*)
QUICK_NAV="Quick Navigation"
@ -508,6 +527,7 @@ case $LANG in
SYSINFO="System information"
SHORTCUTS="Keyboard shortcuts"
MENUPANELS="Menu/Sidepanels settings"
SSH_CONN="SSH hosts"
;;
esac
@ -517,6 +537,7 @@ esac
panels_topmargin=${panels_topmargin:-0}
menu_margin_x=${submenu_spacing:-0}
[ $panels_topmargin == 0 ] && menu_margin_x=0
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN=$(expr $HEIGHT - $panels_topmargin - $panels_topmargin)
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
@ -530,6 +551,7 @@ BOTTOM_IMG=${places_bottom_img:-/usr/share/mb-jgtools/mabox_3D_silver.png}
[ $places_sysinfopipe == true ] && sysinfopipe="<big></big> $SYSINFO,^pipe(jgsysinfo-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_keyspipe == true ] && keyspipe="<big></big> $SHORTCUTS,^pipe(jgkeys-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_menusettingspipe == true ] && menusettingspipe="<big></big> $MENUPANELS,^pipe(jgmenusettings-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_sshpipe == true ] && sshpipe="<big></big> $SSH_CONN,^pipe(jgssh -r)" && pipesep="^sep($PIPEMENUS)"
mkconfigfile
@ -556,6 +578,7 @@ $pipesep
$menusettingspipe
$sysinfopipe
$keyspipe
$sshpipe
$softwarepipe
. $HOME/.config/mabox/vboxes.csv