mabox-pipemenus/usr/bin/jgtint2-pipe

80 lines
2.2 KiB
Plaintext
Raw Normal View History

2020-09-27 12:47:00 +02:00
#!/bin/bash
TINT2PATH="$HOME/.config/tint2"
TINT2RC="$TINT2PATH/tint2rc"
TZEN="mb-tint2-manager"
case $LANG in
pl*)
TITLE="Panel Tint2"
RUNNING_TINT2="Działające Tint2"
DEFAULT_TINT2RC="Domyślny tint2rc"
2021-01-30 22:00:15 +01:00
EDIT_TINT2="Edytuj plik konfiguracyjny"
APPS="Programy"
LAUNCHERS="Dodaj/usuń programy..."
2020-09-27 12:47:00 +02:00
TINT2_EDITOR="Wybierz pliki Tint2 do edycji..."
2021-01-30 22:00:15 +01:00
TINT2_CONFIGURE="Konfiguracja"
2020-09-27 12:47:00 +02:00
CHOOSE_TINT2="Wybierz Tint2..."
RESTART_TINT2="Restartuj Tint2"
RELOAD_TINT2="Przeładuj Tint2"
2021-01-30 22:00:15 +01:00
CONFIGURE="Konfiguruj (GUI)"
2020-09-27 12:47:00 +02:00
;;
es*)
TITLE="Panel Tint2"
RUNNING_TINT2="Panel(es) en ejecución"
DEFAULT_TINT2RC="Panel tint2rc x defecto"
EDIT_TINT2="Edición manual panel"
2021-01-30 22:00:15 +01:00
APPS="Launchers"
LAUNCHERS="Add/Remove Launchers..."
2020-09-27 12:47:00 +02:00
TINT2_EDITOR="Elegir panel Tint2 a editar"
2021-01-30 22:00:15 +01:00
TINT2_CONFIGURE="Editor gráfico"
2020-09-27 12:47:00 +02:00
CHOOSE_TINT2="Elegir un panel..."
RESTART_TINT2="Reiniciar panel(es)"
RELOAD_TINT2="Reload Tint2"
2021-01-30 22:00:15 +01:00
CONFIGURE="Editor gráfico"
2020-09-27 12:47:00 +02:00
;;
*)
TITLE="Tint2 Panel"
RUNNING_TINT2="Running Tint2"
DEFAULT_TINT2RC="Default tint2rc"
2021-01-30 22:00:15 +01:00
EDIT_TINT2="Edit config file"
APPS="Launchers"
LAUNCHERS="Add/Remove Launchers..."
2020-09-27 12:47:00 +02:00
TINT2_EDITOR="Choose Tint2 to edit"
2021-01-30 22:00:15 +01:00
TINT2_CONFIGURE="Configure"
2020-09-27 12:47:00 +02:00
CHOOSE_TINT2="Choose Tint2..."
RESTART_TINT2="Restart Tint2"
RELOAD_TINT2="Reload Tint2"
2021-01-30 22:00:15 +01:00
CONFIGURE="Configure (GUI)"
2020-09-27 12:47:00 +02:00
;;
esac
out+=("^sep($TITLE)")
out+=("$CHOOSE_TINT2,$TZEN")
out+=("$RESTART_TINT2,mb-tint2restart")
out+=("$RELOAD_TINT2,killall -SIGUSR1 tint2")
2020-09-27 12:47:00 +02:00
if [ "$(pidof tint2)" ];then
2021-01-30 22:00:15 +01:00
out+=("^sep($TINT2_CONFIGURE)")
2020-09-27 12:47:00 +02:00
while read -r pid cmd; do
if [[ ${cmd%% *} = tint2 ]]; then
TINT=${cmd##* }
TINT2=${TINT#$HOME/.config/tint2/}
if [[ $TINT = tint2 ]];then
TINT="$TINT2RC"
TINT2="$DEFAULT_TINT2RC"
fi
out+=("$CONFIGURE <i>$TINT2</i>,tint2conf $TINT")
out+=("$EDIT_TINT2 <i>$TINT2</i>,geany $TINT")
2020-09-27 12:47:00 +02:00
fi
done < <(pgrep -a tint2)
fi
#out+=("^sep($EDIT_TINT2)")
2021-01-30 22:00:15 +01:00
out+=("^sep($APPS)")
out+=("$LAUNCHERS,jgtint2launcher")
2020-09-27 12:47:00 +02:00
printf '%s\n' "${out[@]}"