ssh-pipe, settings update
parent
277440d2db
commit
c6878a8988
|
@ -9,6 +9,10 @@ case $LANG in
|
||||||
OWN_COMMANDS="własne komendy"
|
OWN_COMMANDS="własne komendy"
|
||||||
FAVORITES="Ulubione"
|
FAVORITES="Ulubione"
|
||||||
MAINMENU="Menu główne"
|
MAINMENU="Menu główne"
|
||||||
|
APPS="Programy"
|
||||||
|
APPS_POS="Pokaż programy w..."
|
||||||
|
APPS_MAIN="...menu głównym"
|
||||||
|
APPS_SUB="...submenu"
|
||||||
LEFTPANEL="Lewy panel"
|
LEFTPANEL="Lewy panel"
|
||||||
RIGHTPANEL="Prawy panel"
|
RIGHTPANEL="Prawy panel"
|
||||||
EXITMENU="Dialog wylogowania"
|
EXITMENU="Dialog wylogowania"
|
||||||
|
@ -26,7 +30,8 @@ case $LANG in
|
||||||
POPINSTALL="Instaluj popularne programy"
|
POPINSTALL="Instaluj popularne programy"
|
||||||
SYSINFO="Informacje o systemie"
|
SYSINFO="Informacje o systemie"
|
||||||
SHORTCUTS="Skróty klawiszowe"
|
SHORTCUTS="Skróty klawiszowe"
|
||||||
MENUPANELS="Menu / Panele boczne"
|
MENUPANELS="Ustawienia Menu/Paneli bocznych"
|
||||||
|
SSH_CONN="Połączenia SSH"
|
||||||
LOOKANDFEEL="Wygląd"
|
LOOKANDFEEL="Wygląd"
|
||||||
BORDER="Obramowanie"
|
BORDER="Obramowanie"
|
||||||
PADDING="Margines wewnętrzny"
|
PADDING="Margines wewnętrzny"
|
||||||
|
@ -59,6 +64,10 @@ case $LANG in
|
||||||
OWN_COMMANDS="Custom Commands"
|
OWN_COMMANDS="Custom Commands"
|
||||||
FAVORITES="Favoritos"
|
FAVORITES="Favoritos"
|
||||||
MAINMENU="Main Menu"
|
MAINMENU="Main Menu"
|
||||||
|
APPS="Applicationes"
|
||||||
|
APPS_POS="Show Applications in..."
|
||||||
|
APPS_MAIN="...mainmenu"
|
||||||
|
APPS_SUB="...submenu"
|
||||||
LEFTPANEL="Left panel"
|
LEFTPANEL="Left panel"
|
||||||
RIGHTPANEL="Right panel"
|
RIGHTPANEL="Right panel"
|
||||||
EXITMENU="Logout Dialog"
|
EXITMENU="Logout Dialog"
|
||||||
|
@ -76,7 +85,8 @@ case $LANG in
|
||||||
POPINSTALL="Instalar Programas populares"
|
POPINSTALL="Instalar Programas populares"
|
||||||
SYSINFO="System information"
|
SYSINFO="System information"
|
||||||
SHORTCUTS="Atajos del teclado"
|
SHORTCUTS="Atajos del teclado"
|
||||||
MENUPANELS="Menu / Paneles laterales"
|
MENUPANELS="Menu/Paneles laterales"
|
||||||
|
SSH_CONN="SSH Connections"
|
||||||
LOOKANDFEEL="Apariencia"
|
LOOKANDFEEL="Apariencia"
|
||||||
BORDER="Menu Border"
|
BORDER="Menu Border"
|
||||||
PADDING="Padding"
|
PADDING="Padding"
|
||||||
|
@ -109,6 +119,10 @@ case $LANG in
|
||||||
OWN_COMMANDS="Custom Commands"
|
OWN_COMMANDS="Custom Commands"
|
||||||
FAVORITES="Favorites"
|
FAVORITES="Favorites"
|
||||||
MAINMENU="Main Menu"
|
MAINMENU="Main Menu"
|
||||||
|
APPS="Applications"
|
||||||
|
APPS_POS="Show Applications in..."
|
||||||
|
APPS_MAIN="...mainmenu"
|
||||||
|
APPS_SUB="...submenu"
|
||||||
LEFTPANEL="Left Panel "
|
LEFTPANEL="Left Panel "
|
||||||
RIGHTPANEL="Right Panel"
|
RIGHTPANEL="Right Panel"
|
||||||
EXITMENU="Logout Dialog"
|
EXITMENU="Logout Dialog"
|
||||||
|
@ -126,7 +140,8 @@ case $LANG in
|
||||||
POPINSTALL="Install popular apps"
|
POPINSTALL="Install popular apps"
|
||||||
SYSINFO="System information"
|
SYSINFO="System information"
|
||||||
SHORTCUTS="Keyboard shortcuts"
|
SHORTCUTS="Keyboard shortcuts"
|
||||||
MENUPANELS="Menu / Sidepanels"
|
MENUPANELS="Menu/Sidepanels settings"
|
||||||
|
SSH_CONN="SSH Connections"
|
||||||
LOOKANDFEEL="Look and Feel"
|
LOOKANDFEEL="Look and Feel"
|
||||||
BORDER="Menu Border"
|
BORDER="Menu Border"
|
||||||
PADDING="Padding"
|
PADDING="Padding"
|
||||||
|
@ -184,6 +199,9 @@ out+=("^sep($JGBROWSER)")
|
||||||
out2+=("^tag(mainmenu_edit)")
|
out2+=("^tag(mainmenu_edit)")
|
||||||
out2+=("^sep($MAINMENU)")
|
out2+=("^sep($MAINMENU)")
|
||||||
out2+=("$EDIT $FAVORITES, geany $HOME/.config/mabox/favorites.csv, geany")
|
out2+=("$EDIT $FAVORITES, geany $HOME/.config/mabox/favorites.csv, geany")
|
||||||
|
out2+=("^sep($APPS_POS)")
|
||||||
|
out2+=("$APPS_MAIN,mb-setvar apps_in_submenu=false;mb-jgtools main ipc")
|
||||||
|
out2+=("$APPS_SUB,mb-setvar apps_in_submenu=true;mb-jgtools main ipc")
|
||||||
out2+=("^sep(Reset)")
|
out2+=("^sep(Reset)")
|
||||||
out2+=("$RESET,mb-jgtools reset main")
|
out2+=("$RESET,mb-jgtools reset main")
|
||||||
out2+=("^tag(left_edit)")
|
out2+=("^tag(left_edit)")
|
||||||
|
@ -199,10 +217,12 @@ out2+=("$EDIT $OWN_COMMANDS ($TOP), geany $HOME/.config/mabox/places-prepend.csv
|
||||||
|
|
||||||
out2+=("^sep()")
|
out2+=("^sep()")
|
||||||
out2+=("^sep($PIPEMENUS)")
|
out2+=("^sep($PIPEMENUS)")
|
||||||
[[ $places_softwarepipe = false ]] && out2+=("<i><s>$POPINSTALL</s></i>,mb-setvar places_softwarepipe=true;$L") || out2+=("$POPINSTALL,mb-setvar places_softwarepipe=false;$L")
|
[[ $places_menusettingspipe = false ]] && out2+=("<i><s>$MENUPANELS</s></i>,mb-setvar places_menusettingspipe=true;$L") || out2+=("$MENUPANELS,mb-setvar places_menusettingspipe=false;$L")
|
||||||
[[ $places_sysinfopipe = false ]] && out2+=("<i><s>$SYSINFO</s></i>,mb-setvar places_sysinfopipe=true;$L") || out2+=("$SYSINFO,mb-setvar places_sysinfopipe=false;$L")
|
[[ $places_sysinfopipe = false ]] && out2+=("<i><s>$SYSINFO</s></i>,mb-setvar places_sysinfopipe=true;$L") || out2+=("$SYSINFO,mb-setvar places_sysinfopipe=false;$L")
|
||||||
[[ $places_keyspipe = false ]] && out2+=("<i><s>$SHORTCUTS</s></i>,mb-setvar places_keyspipe=true;$L") || out2+=("$SHORTCUTS,mb-setvar places_keyspipe=false;$L")
|
[[ $places_keyspipe = false ]] && out2+=("<i><s>$SHORTCUTS</s></i>,mb-setvar places_keyspipe=true;$L") || out2+=("$SHORTCUTS,mb-setvar places_keyspipe=false;$L")
|
||||||
[[ $places_menusettingspipe = false ]] && out2+=("<i><s>$MENUPANELS</s></i>,mb-setvar places_menusettingspipe=true;$L") || out2+=("$MENUPANELS,mb-setvar places_menusettingspipe=false;$L")
|
[[ $places_sshpipe = false ]] && out2+=("<i><s>$SSH_CONN</s></i>,mb-setvar places_sshpipe=true;$L") || out2+=("$SSH_CONN,mb-setvar places_sshpipe=false;$L")
|
||||||
|
[[ $places_softwarepipe = false ]] && out2+=("<i><s>$POPINSTALL</s></i>,mb-setvar places_softwarepipe=true;$L") || out2+=("$POPINSTALL,mb-setvar places_softwarepipe=false;$L")
|
||||||
|
|
||||||
out2+=("^sep()")
|
out2+=("^sep()")
|
||||||
out2+=("$EDIT $OWN_COMMANDS ($BOTTOM), geany $HOME/.config/mabox/places-append.csv, geany")
|
out2+=("$EDIT $OWN_COMMANDS ($BOTTOM), geany $HOME/.config/mabox/places-append.csv, geany")
|
||||||
out2+=("^sep(Reset)")
|
out2+=("^sep(Reset)")
|
||||||
|
@ -376,3 +396,4 @@ printf '%s\n' "^sep()"
|
||||||
printf '%s\n' "<i>$REMOVE</i>,mb-setvar places_menusettingspipe=false"
|
printf '%s\n' "<i>$REMOVE</i>,mb-setvar places_menusettingspipe=false"
|
||||||
fi
|
fi
|
||||||
printf '%s\n' "${out2[@]}"
|
printf '%s\n' "${out2[@]}"
|
||||||
|
printf '%s\n' "${out3[@]}"
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Daniel Napora 2021 <napcok@gmail.com>
|
||||||
|
#: jgssh - pipemenu for connecting to hosts defined in ~/.ssh/config
|
||||||
|
#: Usage: jgssh ( )
|
||||||
|
#:
|
||||||
|
#:
|
||||||
|
case $LANG in
|
||||||
|
pl*)
|
||||||
|
SSH_CONN="Połączenia SSH"
|
||||||
|
CONNECT="Połącz z"
|
||||||
|
TERM="Terminal"
|
||||||
|
FM="Menadżer plików"
|
||||||
|
REMOVE="Usuń to menu z panelu"
|
||||||
|
EDIT="Edytuj"
|
||||||
|
;;
|
||||||
|
es*)
|
||||||
|
SSH_CONN="Hosts SSH"
|
||||||
|
CONNECT="Conectar a"
|
||||||
|
TERM="Terminal"
|
||||||
|
FM="Gestor de archivos"
|
||||||
|
REMOVE="Eliminar este menú del panel"
|
||||||
|
EDIT="Editar"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
SSH_CONN="SSH hosts"
|
||||||
|
CONNECT="Connect to"
|
||||||
|
TERM="Terminal"
|
||||||
|
FM="File Manager"
|
||||||
|
REMOVE="Remove this menu from panel"
|
||||||
|
EDIT="Edit"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
__usage() {
|
||||||
|
grep "^#:" $0 | while read DOC; do printf '%s\n' "${DOC###:}"; done
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
__mklist() {
|
||||||
|
hostlist=$(sed -ne 's/^[[:blank:]]*[Hh][Oo][Ss][Tt][[:blank:]]\{1,\}\([^#*?%]*\)\(#.*\)\{0,1\}$/\1/p' ~/.ssh/config)
|
||||||
|
out+=("^sep($SSH_CONN)")
|
||||||
|
for host in $hostlist;
|
||||||
|
do
|
||||||
|
out+=("$host,^checkout($host)")
|
||||||
|
out2+=("^tag($host)")
|
||||||
|
out2+=("^sep($CONNECT $host)")
|
||||||
|
out2+=("<big></big> $TERM,^term(ssh $host)")
|
||||||
|
out2+=(" $FM,pcmanfm $HOME sftp://$host/")
|
||||||
|
done
|
||||||
|
out+=("^sep()")
|
||||||
|
out+=("$EDIT <i>~/.ssh/config</i>, geany $HOME/.ssh/config")
|
||||||
|
}
|
||||||
|
|
||||||
|
__removable() {
|
||||||
|
__mklist
|
||||||
|
out+=("^sep()")
|
||||||
|
out+=("<i>$REMOVE</i>,mb-setvar places_sshpipe=false")
|
||||||
|
__ret
|
||||||
|
}
|
||||||
|
|
||||||
|
__standalone() {
|
||||||
|
echo "TODO"
|
||||||
|
}
|
||||||
|
|
||||||
|
__ret() {
|
||||||
|
printf '%s\n' "${out[@]}"
|
||||||
|
printf '%s\n' "${out2[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
"-r") __removable ;;
|
||||||
|
"-s") __standalone ;;
|
||||||
|
"-h"|"--help") __usage ;;
|
||||||
|
*) __usage ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue