mabox-pipemenus/usr/bin/mabox-tint2-pipemenu

67 lines
1.7 KiB
Plaintext
Raw Normal View History

2016-03-26 10:18:26 +01:00
#!/bin/bash
TINT2PATH="$HOME/.config/tint2"
TINT2RC="$TINT2PATH/tint2rc"
2020-08-29 10:00:57 +02:00
TZEN="mb-tint2-manager"
2016-03-26 10:18:26 +01:00
2017-01-04 19:18:24 +01:00
case $LANG in
pl*)
2020-09-27 12:29:11 +02:00
TITLE="Panel Tint2"
2017-01-04 19:18:24 +01:00
RUNNING_TINT2="Działające Tint2"
DEFAULT_TINT2RC="Domyślny tint2rc"
EDIT_TINT2="Edytuj Tint2"
2020-04-25 17:36:39 +02:00
TINT2_EDITOR="Wybierz pliki Tint2 do edycji..."
2018-12-13 12:39:01 +01:00
TINT2_EDITOR_GUI="tint2conf (GUI)"
2020-09-27 12:29:11 +02:00
CHOOSE_TINT2="Wybierz Tint2..."
2017-01-04 19:18:24 +01:00
RESTART_TINT2="Restartuj Tint2"
2020-09-27 12:29:11 +02:00
CONFIGURE="Konfiguruj"
2017-01-04 19:18:24 +01:00
;;
2020-08-26 15:50:04 +02:00
es*)
2020-09-27 12:29:11 +02:00
TITLE="Panel Tint2"
2020-08-29 20:47:05 +02:00
RUNNING_TINT2="Panel(es) en ejecución"
DEFAULT_TINT2RC="Panel tint2rc x defecto"
EDIT_TINT2="Edición manual panel"
TINT2_EDITOR="Elegir panel Tint2 a editar"
TINT2_EDITOR_GUI="Editor gráfico"
2020-09-27 12:29:11 +02:00
CHOOSE_TINT2="Elegir un panel..."
2020-08-29 20:47:05 +02:00
RESTART_TINT2="Reiniciar panel(es)"
2020-09-27 12:29:11 +02:00
CONFIGURE="Configurar"
2020-08-26 15:50:04 +02:00
;;
2017-01-04 19:18:24 +01:00
*)
2020-09-27 12:29:11 +02:00
TITLE="Tint2 Panel"
2017-01-04 19:18:24 +01:00
RUNNING_TINT2="Running Tint2"
DEFAULT_TINT2RC="Default tint2rc"
EDIT_TINT2="Edit Tint2"
2018-12-13 12:39:01 +01:00
TINT2_EDITOR="Choose Tint2 to edit"
TINT2_EDITOR_GUI="tint2conf (GUI)"
2020-09-27 12:29:11 +02:00
CHOOSE_TINT2="Choose Tint2..."
2017-01-04 19:18:24 +01:00
RESTART_TINT2="Restart Tint2"
2020-09-27 12:29:11 +02:00
CONFIGURE="Configure"
2017-01-04 19:18:24 +01:00
;;
esac
2020-09-27 12:29:11 +02:00
out+=("^sep($TITLE)")
out+=("$CHOOSE_TINT2,$TZEN")
out+=("$RESTART_TINT2,mb-tint2restart")
if [ "$(pidof tint2)" ];then
out+=("^sep($TINT2_EDITOR_GUI)")
while read -r pid cmd; do
2016-03-26 10:18:26 +01:00
if [[ ${cmd%% *} = tint2 ]]; then
TINT=${cmd##* }
2020-09-27 12:29:11 +02:00
TINT2=${TINT#$HOME/.config/tint2/}
2016-03-26 10:18:26 +01:00
if [[ $TINT = tint2 ]];then
TINT="$TINT2RC"
2017-01-04 19:18:24 +01:00
TINT2="$DEFAULT_TINT2RC"
2016-03-26 10:18:26 +01:00
fi
2020-09-27 12:29:11 +02:00
out+=("$CONFIGURE <i>$TINT2</i>,tint2conf $TINT")
2016-03-26 10:18:26 +01:00
fi
2020-09-27 12:29:11 +02:00
done < <(pgrep -a tint2)
fi
#out+=("^sep($EDIT_TINT2)")
2016-03-26 10:18:26 +01:00
2020-09-27 12:29:11 +02:00
printf '%s\n' "${out[@]}"