master
Daniel Napora 2020-02-29 14:17:05 +01:00
parent 19808a3c8b
commit 3eb30db83e
8 changed files with 73 additions and 22 deletions

View File

@ -31,7 +31,7 @@ USAGE="\vUSAGE:\tmb-conky-session [OPTION(S)]...FILES
### DIALOG VARIABLES ### DIALOG VARIABLES
DLG="yad --center --undecorated --borders=20 " DLG="yad --center --undecorated --borders=20 "
TITLE="Mabox Conky Session" TITLE="Mabox Conky Session"
WINICON="--window-icon=distributor-logo-bunsenlabs" WINICON="--window-icon=distributor-logo-mabox"
OK="--button=OK:0" OK="--button=OK:0"
case $LANG in case $LANG in
pl*) pl*)
@ -39,7 +39,7 @@ case $LANG in
KILL_FIRST="Czy zamknąć najpierw działające Conky?" KILL_FIRST="Czy zamknąć najpierw działające Conky?"
;; ;;
*) *)
CANCEL="--button=gtk-cancel:1" CANCEL="--button=Cancel:1"
KILL_FIRST="Kill running conkys first?" KILL_FIRST="Kill running conkys first?"
;; ;;
esac esac

View File

@ -20,10 +20,24 @@ CONKYPATH="$HOME/.config/conky"
### DIALOG VARIABLES ### DIALOG VARIABLES
DLGDEC="yad --center --borders=20 --width=400 --height=500 " DLGDEC="yad --center --borders=20 --width=400 --height=500 "
TITLE="Edytor Conky"
WINICON="--window-icon=distributor-logo-mabox" WINICON="--window-icon=distributor-logo-mabox"
OK="--button=OK:0" OK="--button=OK:0"
CANCEL="--button=Anuluj:1" case $LANG in
pl*)
TITLE="Edytor Conky"
CANCEL="--button=Anuluj:1"
CE_DESC="Wybierz z listy Conky do edycji.\nMożesz wybrać kilka plików konfiguracyjnych.\n Możesz dodać własne pliki konfiguracyjne Conky\n do katalogu $CONKYPATH"
CE_CHOSE="Wybór"
CE_CONFFILE="Plik konfiguracyjny"
;;
*)
TITLE="Conky Editor"
CANCEL="--button=Cancel:1"
CE_DESC="Choose Conky for edit.\n You can choose multiple files.\n You can put your own Conky configurations\n into $CONKYPATH directory."
CE_CHOSE="Choose"
CE_CONFFILE="Configuration file"
;;
esac
########## FUNCTIONS ################################################### ########## FUNCTIONS ###################################################
@ -63,9 +77,9 @@ done
## Populate yad dialog from array, get return value(s) ## Populate yad dialog from array, get return value(s)
RET=$($DLGDEC $WINICON --list --title="$TITLE" \ RET=$($DLGDEC $WINICON --list --title="$TITLE" \
--text="Wybierz z listy Conky do edycji\nMożesz wybrać kilka plików konfiguracyjnych" \ --text="$CE_DESC" \
--checklist \ --checklist \
--column="Wybór:CHK" --column="Plik konfiguracyjny:TXT" $LISTCONKY --separator=":"\ --column="$CE_CHOSE:CHK" --column="$CE_CONFFILE:TXT" $LISTCONKY --separator=":"\
$OK $CANCEL \ $OK $CANCEL \
) )

View File

@ -76,7 +76,7 @@ case $LANG in
;; ;;
*) *)
TITLE="Conky Manager" TITLE="Conky Manager"
CANCEL="--button=gtk-cancel:1" CANCEL="--button=Cancel:1"
CONKY_SESSIONFILE="Conky sessionfile" CONKY_SESSIONFILE="Conky sessionfile"
FILENAME_IN_USE="Filename already in use\n\nOverwrite it?" FILENAME_IN_USE="Filename already in use\n\nOverwrite it?"
SAVE_SESSION="Save Conky sessionfile" SAVE_SESSION="Save Conky sessionfile"
@ -90,7 +90,7 @@ case $LANG in
esac esac
DLG="yad --center --undecorated --borders=20 " DLG="yad --center --undecorated --borders=20 "
DLGDEC="yad --center --borders=20 " DLGDEC="yad --center --borders=20 "
WINICON="--window-icon=mabox" WINICON="--window-icon=distributor-logo-mabox"
OK="--button=OK:0" OK="--button=OK:0"

View File

@ -81,8 +81,8 @@ PICKSCROT="Save screenshot"
### END CONFIGS VARIABLES ### END CONFIGS VARIABLES
### DIALOG VARIABLES ### DIALOG VARIABLES
DIALOG="yad --center --undecorated --borders=20 --window-icon=/usr/share/icons/mbs_trans_32.png" DIALOG="yad --center --undecorated --borders=20 --window-icon=distributor-logo-mabox"
DIALOGDEC="yad --center --borders=20 --window-icon=mabox" DIALOGDEC="yad --center --borders=20 --window-icon=distributor-logo-mabox"
case $LANG in case $LANG in
pl*) pl*)
TITLE="Menedżer Motywów Mabox" TITLE="Menedżer Motywów Mabox"

View File

@ -18,10 +18,25 @@ TINT2PATH="$HOME/.config/tint2"
### DIALOG VARIABLES ### DIALOG VARIABLES
DLGDEC="yad --center --borders=20 --width=400 --height=500 " DLGDEC="yad --center --borders=20 --width=400 --height=500 "
TITLE="Edytor Tint2"
WINICON="--window-icon=distributor-logo-mabox" WINICON="--window-icon=distributor-logo-mabox"
OK="--button=OK:0" case $LANG in
CANCEL="--button=gtk-cancel:1" pl*)
TITLE="Edytor Tint2"
OK="--button=OK:0"
CANCEL="--button=Anuluj:1"
TE_DESC="Wybierz pliki konfiguracji Tint2 do edycji.\nMożesz wybrać kilka.\nDodatkowe pliki konfiguracyjne można skopiować do katalogu: \n$TINT2PATH"
TE_CHOOSE="Wybór"
TE_CONFFILE="Plik konfiguracyjny"
;;
*)
TITLE="Tint2 Editor"
OK="--button=OK:0"
CANCEL="--button=Cancel:1"
TE_DESC="Choose Tint2rc file for edit.\n You can choose multiple files.\n You can put your own Tint2 configurations\n into $TINT2PATH directory."
TE_CHOOSE="Choose"
TE_CONFFILE="Configuration file"
;;
esac
########## FUNCTIONS ################################################### ########## FUNCTIONS ###################################################
@ -56,9 +71,9 @@ for ((j=0; j<${#tintsArr[*]}; j++));do
done done
## Populate dialog from array, get return value(s) ## Populate dialog from array, get return value(s)
RET=$($DLGDEC $WINICON --list --title="$TITLE" \ RET=$($DLGDEC $WINICON --list --title="$TITLE" \
--text="Wybierz pliki konfiguracji Tint2 do edycji\nMożesz wybrać kilka\n" \ --text="$TE_DESC" \
--checklist \ --checklist \
--column="Wybór:CHK" --column="Plik konfiguracyjny:TXT" $LISTINT --separator=":" \ --column="$TE_CHOOSE:CHK" --column="$TE_CONFFILE:TXT" $LISTINT --separator=":" \
$OK $CANCEL \ $OK $CANCEL \
) )

View File

@ -45,8 +45,8 @@ case $LANG in
;; ;;
*) *)
TITLE="Tint2 Manager" TITLE="Tint2 Manager"
CANCEL="--button=gtk-cancel:1" CANCEL="--button=Cancel:1"
SELECT_TINT="Select Tint2s from the list:" SELECT_TINT="Select Tint2s from the list. Click <b>OK</b> to start all selected."
SELECT="Select" SELECT="Select"
TINT_CONF_FILE="tint2 Name" TINT_CONF_FILE="tint2 Name"
;; ;;

View File

@ -62,7 +62,7 @@ case $LANG in
;; ;;
*) *)
MCC="\t\t\t\t\t\t\t <big>Mabox Control Center</big>\n\t\t\t\t\t " MCC="\t\t\t\t\t\t\t <big>Mabox Control Center</big>\n\t\t\t\t\t "
SYSTEM="System and Hardware" SYSTEM="System/Hardware"
LOCALE_SETTINGS="Locale Settings" LOCALE_SETTINGS="Locale Settings"
LANGUAGE_PACKAGES="Language Packages" LANGUAGE_PACKAGES="Language Packages"
KERNEL="Kernel" KERNEL="Kernel"

View File

@ -1,5 +1,27 @@
#!/bin/bash #!/bin/bash
case $LANG in
pl*)
TITLE="Edytor autostartu XDG"
DESC="Wybierz programy/usługi do autostartu"
ENABLE="wł"
FILE="Plik"
NAME="Nazwa"
COMMENT="Komentarz"
NO_DESC="brak opisu"
;;
*)
TITLE="XDG Autostart Editor"
DESC="Choose apps/services to autostart"
ENABLE="run"
FILE="FIle"
NAME="Name"
COMMENT="Comment"
NO_DESC="no description"
;;
esac
config_dir=${XDG_CONFIG_HOME:-$HOME/.config} config_dir=${XDG_CONFIG_HOME:-$HOME/.config}
# Copy only new files from /etc/xdg/autostart/ # Copy only new files from /etc/xdg/autostart/
mkdir -p $config_dir/autostart mkdir -p $config_dir/autostart
@ -18,10 +40,10 @@ for f in $config_dir/autostart/*.desktop; do
grep -m 1 -e '^[[:blank:]]*Name=' $f | cut -d = -f 2 grep -m 1 -e '^[[:blank:]]*Name=' $f | cut -d = -f 2
#grep -m 1 -e '^[[:blank:]]*Exec' $f | cut -d = -f 2 #grep -m 1 -e '^[[:blank:]]*Exec' $f | cut -d = -f 2
comment=$(grep -m 1 -e '^[[:blank:]]*Comment=' $f | cut -d = -f 2) comment=$(grep -m 1 -e '^[[:blank:]]*Comment=' $f | cut -d = -f 2)
[ ! -z "$comment" ] && echo $comment || echo "brak opisu" [ ! -z "$comment" ] && echo $comment || echo "$NO_DESC"
done | yad --width=400 --height=400 --title="Mabox XDG Autostart editor" --image="gtk-execute" \ done | yad --width=400 --height=400 --title="$TITLE" --image="gtk-execute" \
--text="Dodaj/usuń programy z autostartu" --list --print-all --bool-fmt="t" \ --text="" --list --print-all --bool-fmt="t" \
--checklist --column="wł:CHK" --column="File:HD" --column="Nazwa" --column="Komentarz:HD" --tooltip-column=4 > $results --checklist --column="$ENABLE:CHK" --column="$FILE:HD" --column="$NAME" --column="$COMMENT:HD" --tooltip-column=4 > $results
if [[ ${PIPESTATUS[1]} -eq 0 ]]; then if [[ ${PIPESTATUS[1]} -eq 0 ]]; then
i=0 i=0