67 lines
1.7 KiB
Bash
Executable File
67 lines
1.7 KiB
Bash
Executable File
#!/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"
|
|
EDIT_TINT2="Edytuj Tint2"
|
|
TINT2_EDITOR="Wybierz pliki Tint2 do edycji..."
|
|
TINT2_EDITOR_GUI="tint2conf (GUI)"
|
|
CHOOSE_TINT2="Wybierz Tint2..."
|
|
RESTART_TINT2="Restartuj Tint2"
|
|
CONFIGURE="Konfiguruj"
|
|
;;
|
|
es*)
|
|
TITLE="Panel Tint2"
|
|
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"
|
|
CHOOSE_TINT2="Elegir un panel..."
|
|
RESTART_TINT2="Reiniciar panel(es)"
|
|
CONFIGURE="Configurar"
|
|
;;
|
|
*)
|
|
TITLE="Tint2 Panel"
|
|
RUNNING_TINT2="Running Tint2"
|
|
DEFAULT_TINT2RC="Default tint2rc"
|
|
EDIT_TINT2="Edit Tint2"
|
|
TINT2_EDITOR="Choose Tint2 to edit"
|
|
TINT2_EDITOR_GUI="tint2conf (GUI)"
|
|
CHOOSE_TINT2="Choose Tint2..."
|
|
RESTART_TINT2="Restart Tint2"
|
|
CONFIGURE="Configure"
|
|
;;
|
|
esac
|
|
|
|
|
|
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
|
|
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")
|
|
fi
|
|
done < <(pgrep -a tint2)
|
|
fi
|
|
#out+=("^sep($EDIT_TINT2)")
|
|
|
|
|
|
printf '%s\n' "${out[@]}"
|