2020-09-17 01:27:02 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# jgkeys-pipe - native jgmenu pipemenu with keyboard shortcuts
|
|
|
|
#
|
|
|
|
|
|
|
|
case $LANG in
|
|
|
|
pl*)
|
|
|
|
APPS="Aplikacje"
|
|
|
|
FILEMNGR="Menadżer plików"
|
|
|
|
BROWSER="Przeglądarka WWW"
|
|
|
|
TERMINAL="Terminal"
|
|
|
|
EDITOR="Edytor tekstu"
|
|
|
|
FSEARCH="Wyszukiwanie plików"
|
2020-09-25 16:06:39 +02:00
|
|
|
RESMON="Monitor zasobów"
|
2020-09-21 14:43:15 +02:00
|
|
|
VOLUME="Kontrola głośności"
|
|
|
|
COMPOSITOR="wł/wył Picom"
|
|
|
|
WINDOWS="Okna"
|
|
|
|
HALF="połowa ekranu"
|
2020-10-02 00:18:00 +02:00
|
|
|
ARROWS="Strzałki"
|
2020-09-21 14:43:15 +02:00
|
|
|
SHOW_DESKTOP="pokaż pulpit"
|
2020-09-17 01:27:02 +02:00
|
|
|
|
|
|
|
PANELS="Menu/Panele boczne"
|
|
|
|
M_MAIN="Główne menu"
|
|
|
|
M_SETTINGS="Menu ustawień"
|
2020-09-21 14:43:15 +02:00
|
|
|
M_HELP="Menu pomocy (to menu)"
|
2020-09-17 01:27:02 +02:00
|
|
|
PLACES="Lewy (miejsca)"
|
|
|
|
RIGHT="Prawy (ustawienia/pomoc)"
|
|
|
|
LOCK="Blokada ekranu"
|
|
|
|
EXIT="Wyloguj..."
|
2020-09-25 16:06:39 +02:00
|
|
|
HELPERS="Pomocnicy"
|
|
|
|
HISTORY="Ściągawka z historii"
|
|
|
|
ESPANSO="Espanso - text expander"
|
2020-10-02 00:18:00 +02:00
|
|
|
JGTILE="Kafelkowanie okien"
|
2020-10-02 09:56:51 +02:00
|
|
|
SHORTCUTS="Wszystkie skróty"
|
2020-09-17 01:27:02 +02:00
|
|
|
REMOVE="Usuń to menu z panelu"
|
2020-09-18 21:54:15 +02:00
|
|
|
|
2020-09-17 01:27:02 +02:00
|
|
|
;;
|
|
|
|
es*)
|
2020-09-27 12:37:22 +02:00
|
|
|
APPS="Ejecutar"
|
2020-09-18 21:54:15 +02:00
|
|
|
FILEMNGR="gestor archivos"
|
|
|
|
BROWSER="Navegador"
|
|
|
|
TERMINAL="Terminal"
|
|
|
|
EDITOR="Editor de textos"
|
|
|
|
FSEARCH="FSearch"
|
2020-09-25 16:06:39 +02:00
|
|
|
RESMON="Monitor de recursos"
|
2020-09-21 14:43:15 +02:00
|
|
|
VOLUME="control volumen "
|
|
|
|
COMPOSITOR="activa/desact compositor"
|
|
|
|
WINDOWS="VENTANAS"
|
|
|
|
HALF="1/2 pantalla"
|
2020-10-02 00:18:00 +02:00
|
|
|
ARROWS="Arrows"
|
2020-09-21 14:43:15 +02:00
|
|
|
SHOW_DESKTOP="mostrar escritorio"
|
2020-09-17 01:27:02 +02:00
|
|
|
|
2020-09-18 21:54:15 +02:00
|
|
|
PANELS="Paneles Laterales"
|
2020-09-21 14:43:15 +02:00
|
|
|
|
2020-09-18 21:54:15 +02:00
|
|
|
M_MAIN="Menú principal"
|
|
|
|
M_SETTINGS="Menú de configuración"
|
2020-09-21 14:43:15 +02:00
|
|
|
M_HELP="Menú de ayuda"
|
2020-09-18 21:54:15 +02:00
|
|
|
PLACES="Lugares (izquierda)"
|
|
|
|
RIGHT="Ajustes (derecha)"
|
|
|
|
LOCK="Bloquear pantalla"
|
|
|
|
EXIT="Salir "
|
2020-09-27 12:37:22 +02:00
|
|
|
HELPERS="Ayudantes"
|
2020-09-25 16:06:39 +02:00
|
|
|
HISTORY="Historia breve"
|
|
|
|
ESPANSO="Espanso - text expander"
|
2020-10-02 00:18:00 +02:00
|
|
|
JGTILE="Tiling helper"
|
2020-10-02 09:56:51 +02:00
|
|
|
SHORTCUTS="Atajos del teclado"
|
2020-09-17 01:27:02 +02:00
|
|
|
REMOVE="Eliminar este menú del panel"
|
2020-09-18 21:54:15 +02:00
|
|
|
|
2020-09-17 01:27:02 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
APPS="Applications"
|
|
|
|
FILEMNGR="File Manager"
|
|
|
|
BROWSER="WWW browser"
|
|
|
|
TERMINAL="Terminal"
|
|
|
|
EDITOR="Text Editor"
|
|
|
|
FSEARCH="FSearch"
|
2020-09-25 16:06:39 +02:00
|
|
|
RESMON="Resource Monitor"
|
2020-09-21 14:43:15 +02:00
|
|
|
VOLUME="Volume Control"
|
|
|
|
COMPOSITOR="toggle Picom (Compositor)"
|
|
|
|
WINDOWS="Windows"
|
|
|
|
HALF="Half screen"
|
2020-10-02 00:18:00 +02:00
|
|
|
ARROWS="Arrows"
|
2020-09-21 14:43:15 +02:00
|
|
|
SHOW_DESKTOP="Show desktop"
|
2020-09-17 01:27:02 +02:00
|
|
|
|
|
|
|
PANELS="Menu/SidePanels"
|
|
|
|
M_MAIN="Main Menu"
|
|
|
|
M_SETTINGS="Settings Menu"
|
2020-09-21 14:43:15 +02:00
|
|
|
M_HELP="Help (this) Menu"
|
2020-09-18 21:54:15 +02:00
|
|
|
PLACES="Places Sidepanel (Left)"
|
|
|
|
RIGHT="Help/Settings Sidepanel (Right)"
|
2020-09-17 01:27:02 +02:00
|
|
|
LOCK="Lock screen"
|
|
|
|
EXIT="Exit Dialog"
|
2020-09-25 16:06:39 +02:00
|
|
|
HELPERS="Helpers"
|
|
|
|
HISTORY="History helper"
|
|
|
|
ESPANSO="Espanso - text expander"
|
2020-10-02 00:18:00 +02:00
|
|
|
JGTILE="Tiling helper"
|
2020-10-02 09:56:51 +02:00
|
|
|
SHORTCUTS="All Keybindings"
|
2020-09-17 01:27:02 +02:00
|
|
|
REMOVE="Remove this menu from panel"
|
2020-09-18 21:54:15 +02:00
|
|
|
|
2020-09-17 01:27:02 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
out+=("^sep($APPS)")
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-f" "$FILEMNGR" "exo-open --launch FileManager")")
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-w" "$BROWSER" "exo-open --launch WebBrowser")")
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-t" "$TERMINAL" "exo-open --launch TerminalEmulator")")
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-e" "$EDITOR" geany)")
|
2020-09-25 16:06:39 +02:00
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-h" "$RESMON" "^term(bpytop)")")
|
2020-09-17 01:27:02 +02:00
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-/" "$FSEARCH" fsearch)")
|
2020-09-21 14:43:15 +02:00
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-v" "$VOLUME" pavucontrol)")
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-c" "$COMPOSITOR" compton_toggle)")
|
2020-09-18 21:54:15 +02:00
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-l" "$LOCK" "betterlockscreen -l")")
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-x" "$EXIT" "mb-jgtools mblogout")")
|
2020-09-17 01:27:02 +02:00
|
|
|
|
|
|
|
out+=("^sep($PANELS)")
|
|
|
|
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W" "$M_MAIN" "mb-jgtools main")")
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-s" "$M_SETTINGS" "mb-jgtools settings")")
|
2020-09-27 12:37:22 +02:00
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-A-k" "$M_HELP" "jgkeys-pipe -s")")
|
2020-09-17 01:27:02 +02:00
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "C-tab" "$PLACES" "mb-jgtools places")")
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-tab" "$RIGHT" "mb-jgtools right")")
|
|
|
|
|
2020-09-21 14:43:15 +02:00
|
|
|
out+=("^sep($WINDOWS)")
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-d" "$SHOW_DESKTOP" show_desktop)")
|
2020-10-02 00:18:00 +02:00
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-$ARROWS" "$HALF")")
|
2020-09-21 14:43:15 +02:00
|
|
|
|
2020-09-25 16:06:39 +02:00
|
|
|
out+=("^sep($HELPERS)")
|
2020-10-02 00:18:00 +02:00
|
|
|
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-A-t" "$JGTILE" "jgtile")")
|
2020-09-25 16:06:39 +02:00
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-A-h" "$HISTORY" "jghistory-pipe -s")")
|
|
|
|
out+=("$(printf "<tt>%-10s</tt> %s,%s" "W-A-e" "$ESPANSO" "jgespanso-pipe -s")")
|
2020-10-02 09:56:51 +02:00
|
|
|
out+=("^sep()")
|
|
|
|
out+=("$(printf "%s,%s" "$SHORTCUTS" "mb-kb --gui &>/dev/null")")
|
|
|
|
|
2020-09-17 01:27:02 +02:00
|
|
|
### RUN
|
|
|
|
if [ $1 == "-s" ]; then
|
|
|
|
. /usr/bin/pipemenu-standalone.cfg
|
|
|
|
|
|
|
|
MENU_PADDING_TOP=0
|
|
|
|
MENU_HALIGN="center"
|
|
|
|
MENU_VALIGN="center"
|
|
|
|
jgmenu_icon_size=0
|
|
|
|
mkconfigfile
|
|
|
|
|
|
|
|
cat <<EOF > ${MENU_ITEMS}
|
|
|
|
$(printf '%s\n' "${out[@]}")
|
|
|
|
EOF
|
|
|
|
|
|
|
|
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
fi
|
|
|
|
printf '%s\n' "${out[@]}"
|
2020-09-21 14:43:15 +02:00
|
|
|
if [ $1 == "-r" ]; then
|
2020-09-18 21:54:15 +02:00
|
|
|
printf '%s\n' "^sep()"
|
2020-09-22 13:11:45 +02:00
|
|
|
printf '%s\n' "<i>$REMOVE</i>,mb-setvar places_keyspipe=false"
|
2020-09-21 14:43:15 +02:00
|
|
|
fi
|
2020-09-17 01:27:02 +02:00
|
|
|
|