239 lines
12 KiB
Bash
Executable File
239 lines
12 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
#
|
|
EDITOR=geany
|
|
case $LANG in
|
|
pl*)
|
|
MCC="\t\t\t\t\t\t <big>Mabox Control Center</big>\n\t\t\t\t Konfigurator wyglądu i zachowania Maboxa."
|
|
SYSTEM="System i Sprzęt"
|
|
LOCALE_SETTINGS="Język i formaty"
|
|
LANGUAGE_PACKAGES="Pakiety językowe"
|
|
KERNEL="Jądro systemowe"
|
|
USER_ACCOUNTS="Konta użytkowników"
|
|
TIME_DATE="Data i Czas"
|
|
KEYBOARD="Ustawienia klawiatury"
|
|
HARDWARE="Konfiguracja sprzętowa"
|
|
SOFTWARE="Programy"
|
|
LOOK="Wygląd"
|
|
TINT2="Panel Tint2"
|
|
SETTINGS="Ustawienia"
|
|
TINT2="Panel tint2"
|
|
CONKY="Conky"
|
|
MENU="Menu"
|
|
THEMES="Motywy"
|
|
SYSTEM_DESC="Ustawienia oraz informacje systemowe i sprzętowe"
|
|
MONITORS="<b>Monitor(y)</b>"
|
|
SOFTWARE_DESC="Aktualizacja - Instalacja Programów - Preferowane programy\n"
|
|
AUTOSTART_DESC="Openbox używa dwóch mechanizmów autostartu.\nPierwszy z nich to <b>systemowy autostart XDG</b>."
|
|
AUTOSTART_DESC2="Drugim - specyficznym dla Openbox - jest skrypt <i><b>~/.config/openbox/autostart</b></i>."
|
|
EDIT_XDG="Wybierz programy autostartu XDG"
|
|
EDIT_SCRIPT="Edytuj skrypt"
|
|
AUTOSTART_RESET="Przywróć domyślny skrypt autostartu"
|
|
LOOK_DESC="Narzędzia do konfiguracji wyglądu\n"
|
|
EDIT_FILE="Edytuj plik"
|
|
TINT_DESC="<b>Konfigurator paneli tint2</b>\nTutaj możesz wybrać konfigurację panelu Tint2.\nW Maboxie dostępne są różne konfiguracje panelu tint2, możesz również dodać własne do katalogu <i>~/.config/tint2</i>."
|
|
T_CONF="Konfigurator paneli tint2!!Konfiguracja wyglądu panelu"
|
|
T_CHOOSE="Wybierz tint2!!Możesz uruchomić kilka paneli"
|
|
T_RESTART="Restartuj panel(e)"
|
|
TINT_DIR="Otwórz katalog <i>~/.config/tint2/</i> w menadżerze plików"
|
|
CONKY_DESC="<b>Menedżer Conky</b>\nWybierz uruchamiane Conky. W Maboxie dostępnych jest kilka konfiguracji Conky, możesz dodać własne do katalogu <i>~/.config/conky</i>.\n"
|
|
CONKY_CHOOSE="Wybierz Conky"
|
|
CONKY_RESTART="Restartuj Conky"
|
|
CONKY_EDIT="Edytuj Conky"
|
|
OPEN_CONKYDIR="Otwórz katalog <i>~/.config/conky</i>"
|
|
MENU_DESC="Główne menu (<small>wywoływane przez: prawy klik, skrót win+spacja lub z ikony w panelu</small>) umożliwia wyszukiwanie, należy po prostu zacząć pisać np. nazwę programu.\n\n<small><i>Dostępne są również dwa <b>panele boczne</b>, umożliwiające szybki dostęp np. do systemu plików.</i>\nPoniżej możesz dodać swoje własne polecenia na początku i na końcu paneli bocznych.</small>\n"
|
|
M_LEFT="\t\t\t<b>LEWY</b><small> (ctrl+tab)</small>"
|
|
M_RIGHT="\t\t\t<b>PRAWY</b><small> (win+tab)</small>"
|
|
M_LEFT_DESC="<small>Lewy panel\n - szybka nawigacja po systemie plików\n - zakładki GTK\n - maszyny wirtualne</small>"
|
|
M_RIGHT_DESC="<small>Prawy panel\n - ustawienia systemowe\n - pomoc\n - wyjście</small>"
|
|
M_CUSTOMIZE="Edytuj"
|
|
COMPOSITOR="Kompozytor"
|
|
COMP_DESC="Menadżerem kompozycji w Maboxie jest <b>Picom</b> - fork Compton.\nSkrót klawiszowy do włączania/wyłączania menadżera kompozycji to (<b>win</b>+<b>c</b>)."
|
|
COMP_GUI="Ustawienia"
|
|
COMP_EDIT="Edytuj plik konfiguracyjny"
|
|
COMP_RESTART="Restart"
|
|
COMP_TOGGLE="Włącz/Wyłącz (<b>win</b>+<b>c</b>)"
|
|
COMP_REMOVE="Usuń plik konfiguracyjny"
|
|
COMP_DEFAULT="Przywróć domyślny plik konfiguracyjny"
|
|
MT_MNGR="Menedżer Motywów Maboxa"
|
|
MT_MNGR_DESC="\nMotyw Maboxa składa się z:\n - tapety\n - wystroju GTK2/GTK3\n - motywu Openboxa\n - ustawień panelu Tint2\n - uruchamianych automatycznie Conky\n\nZa pomocą menedżera motywów możesz w wygodny sposób zapisywać swoje konfiguracje Maboxa, a następnie dowolnie przełączać się między nimi.\n"
|
|
;;
|
|
*)
|
|
MCC="\t\t\t\t\t\t <big>Mabox Control Center</big>\n\t\t\t\t "
|
|
SYSTEM="System and Hardware"
|
|
LOCALE_SETTINGS="Locale Settings"
|
|
LANGUAGE_PACKAGES="Language Packages"
|
|
KERNEL="Kernel"
|
|
USER_ACCOUNTS="User Accounts"
|
|
TIME_DATE="Time and Date"
|
|
KEYBOARD="Keyboard Settings"
|
|
HARDWARE="Hardware Configuration"
|
|
SOFTWARE="Software"
|
|
LOOK="Look and Feel"
|
|
TINT2="Tin2 Panel"
|
|
SETTINGS="Settings"
|
|
TINT2="Tint2 panel"
|
|
CONKY="Conky"
|
|
MENU="Menu"
|
|
THEMES="Themes"
|
|
SYSTEM_DESC="System and Hardware settings and information"
|
|
MONITORS="<b>Monitor(s)</b>"
|
|
SOFTWARE_DESC="Software installation and update - Preferred Applications.\n"
|
|
AUTOSTART_DESC="Openbox uses two autostart methods.\nFirst is XDG autostart."
|
|
AUTOSTART_DESC2="Second method is Openbox own autostart script: <i><b>~/.config/openbox/autostart</b></i>. "
|
|
EDIT_XDG="Select items to autostart"
|
|
EDIT_SCRIPT="Edit script"
|
|
AUTOSTART_RESET="Reset to default autostart script"
|
|
LOOK_DESC="Customize Look and Feel of your desktop.\n"
|
|
EDIT_FILE="Edit file"
|
|
TINT_DESC="<b>Tint2 panels Configurator</b>\nHere you can choose Tint2 panel(s) configuration.\nThere are some predefined configurations in Mabox, you can also add your own to <i>~/.config/tint2</i> directory."
|
|
T_CONF="Configure tint2"
|
|
T_CHOOSE="Choose tint2!!You can run several tint2 panels at once"
|
|
T_RESTART="Restart tint2"
|
|
TINT_DIR="Open <i>~/.config/tint2/</i> directory "
|
|
CONKY_DESC="<b>Conky Manager</b>\nChoose Conky you want to run. There are several predefined Conky configurations, you can also add your own to <i>~/.config/conky</i> directory."
|
|
CONKY_CHOOSE="Choose Conky(s)"
|
|
CONKY_RESTART="Reload Conky"
|
|
CONKY_EDIT="Edit Conky"
|
|
OPEN_CONKYDIR="Open <i>~/.config/conky</i> directory"
|
|
MENU_DESC="Main menu (<small>access it by right click, win+space shortcut or from panel icon</small>) have type to search functionality. Just start to type what you looking for.\n\n<small><i>There are also two <b>side-panels</b> available for quick access to file system locations for example.</i> Below you can add custom commands to both side-panels.</small>\n"
|
|
M_LEFT="\t\t\t<b>LEFT</b><small> (ctrl+tab)</small>"
|
|
M_RIGHT="\t\t\t<b>RIGHT</b><small> (win+tab)</small>"
|
|
M_LEFT_DESC="<small>Left panel\n - quick navigation\n - GTK Bookmarks\n - Virtualbox machines</small>"
|
|
M_RIGHT_DESC="<small>Right panel\n - system settings\n - help\n - exit options</small>"
|
|
M_CUSTOMIZE="Customize"
|
|
COMPOSITOR="Compositor"
|
|
COMP_DESC="<b>Picom</b> is used as composite manager in Mabox"
|
|
COMP_GUI="Settings"
|
|
COMP_EDIT="Edit config file"
|
|
COMP_RESTART="Restart"
|
|
COMP_TOGGLE="Toggle (<b>win</b>+<b>c</b>)"
|
|
COMP_REMOVE="Remove picom.conf"
|
|
COMP_DEFAULT="Reset to default"
|
|
MT_MNGR="Mabox Theme Manager"
|
|
MT_MNGR_DESC="\nMabox theme consist of:\n - wallpaper\n - GTK2/GTK3 Theme\n - Openbox theme and settings\n - selected Tint2 panel(s)\n - selected Conkies\n\nWith Mabox Theme Manager you can easily save your configurations, and switch between them."
|
|
;;
|
|
esac
|
|
|
|
maindialog () {
|
|
KEY=$RANDOM
|
|
|
|
res1=$(mktemp --tmpdir mcc-tab1.XXXXXXXX)
|
|
res2=$(mktemp --tmpdir mcc-tab2.XXXXXXXX)
|
|
res3=$(mktemp --tmpdir mcc-tab3.XXXXXXXX)
|
|
res4=$(mktemp --tmpdir mcc-tab4.XXXXXXXX)
|
|
res5=$(mktemp --tmpdir mcc-tab5.XXXXXXXX)
|
|
res6=$(mktemp --tmpdir mcc-tab6.XXXXXXXX)
|
|
res7=$(mktemp --tmpdir mcc-tab7.XXXXXXXX)
|
|
res8=$(mktemp --tmpdir mcc-tab8.XXXXXXXX)
|
|
res9=$(mktemp --tmpdir mcc-tab9.XXXXXXXX)
|
|
out=$(mktemp --tmpdir mcc-out.XXXXXXXX)
|
|
|
|
# cleanup
|
|
trap "rm -f $res1 $res2 $res3 $res4 $res5 $res6 $res7 $res8 $res9 $out" EXIT
|
|
|
|
|
|
# TAB1 SYSTEM_SPRZET
|
|
yad --plug=$KEY --tabnum=1 --text="$SYSTEM_DESC" --columns=2 --align="center" --form --borders=10 \
|
|
--field="<b>$SETTINGS</b>:LBL" " " \
|
|
--field="$LOCALE_SETTINGS:FBTN" "manjaro-settings-manager -m msm_locale" \
|
|
--field="$LANGUAGE_PACKAGES:FBTN" "manjaro-settings-manager -m msm_language_packages" \
|
|
--field="$KERNEL:FBTN" "manjaro-settings-manager -m msm_kernel" \
|
|
--field="$USER_ACCOUNTS:FBTN" "manjaro-settings-manager -m msm_users" \
|
|
--field="$TIME_DATE:FBTN" "manjaro-settings-manager -m msm_timedate" \
|
|
--field="$KEYBOARD:FBTN" "manjaro-settings-manager -m msm_keyboard" \
|
|
--field="$HARDWARE:FBTN" "manjaro-settings-manager -m msm_mhwd" \
|
|
--field="$MONITORS:LBL" "" \
|
|
--field="ARandr:FBTN" "arandr" \
|
|
--field="<b>Info</b>:LBL" "" \
|
|
--field=" Neofetch:FBTN" "terminator -p neofetch" \
|
|
--field=" inxi -Fxzc0:FBTN" "terminator -p inxi" \
|
|
--field=" :LBL" \
|
|
--field=" :LBL" \
|
|
--field=" :LBL" \
|
|
> $res1 &
|
|
|
|
# TAB2 Programy
|
|
yad --plug=$KEY --tabnum=2 --text="$SOFTWARE_DESC" \
|
|
--icons --read-dir=/usr/share/mcc/software --item-width=100 \
|
|
> $res2 &
|
|
|
|
#TAB 3 AUTOSTART
|
|
yad --plug=$KEY --tabnum=3 --borders=20 \
|
|
--text="<b>Autostart</b>" \
|
|
--columns=1 --form \
|
|
--field="$AUTOSTART_DESC:LBL" "" \
|
|
--field="$EDIT_XDG:FBTN" "yautostart" \
|
|
--field=":LBL" "" \
|
|
--field="$AUTOSTART_DESC2 :LBL" "" \
|
|
--field="$EDIT_SCRIPT <i>~/.config/openbox/autostart</i>:FBTN" "geany $HOME/.config/openbox/autostart" \
|
|
--field="$AUTOSTART_RESET:FBTN" "cp /etc/skel/.config/openbox/autostart $HOME/.config/openbox/" \
|
|
> $res3 &
|
|
|
|
#TAB 4 WYGLĄD
|
|
yad --plug=$KEY --tabnum=4 --text="$LOOK_DESC" --icons --read-dir=/usr/share/mcc/appearance --item-width=100 \
|
|
> $res4 &
|
|
|
|
#TAB 5 TINT2
|
|
yad --plug=$KEY --tabnum=5 --borders=20 \
|
|
--text="$TINT_DESC" \
|
|
--columns=1 --form \
|
|
--field="$T_CHOOSE:FBTN" "mb-tint2zen" \
|
|
--field="$T_CONF:FBTN" "tint2conf" \
|
|
--field="$T_RESTART:FBTN" "mb-tint2restart" \
|
|
--field=":LBL" "" \
|
|
--field="$TINT_DIR:FBTN" "exo-open $HOME/.config/tint2/" \
|
|
> $res5 &
|
|
|
|
#TAB 6 CONKY
|
|
yad --plug=$KEY --tabnum=6 --borders=20 \
|
|
--text="$CONKY_DESC" \
|
|
--form \
|
|
--field="$CONKY_CHOOSE:FBTN" "mb-conkyzen" \
|
|
--field="$CONKY_RESTART:FBTN" "mb-conky-session" \
|
|
--field="$CONKY_EDIT:FBTN" "mb-conkyedit" \
|
|
--field="$OPEN_CONKYDIR:FBTN" "exo-open $HOME/.config/conky/" \
|
|
> $res6 &
|
|
|
|
# TAB 7 MENU
|
|
yad --plug=$KEY --tabnum=7 \
|
|
--text="$MENU_DESC" \
|
|
--columns=2 --form \
|
|
--field="$M_LEFT:LBL" "" \
|
|
--field="$M_CUSTOMIZE left-prepend.csv:FBTN" "geany $HOME/.config/mabox/left-prepend.csv" \
|
|
--field="$M_LEFT_DESC:LBL" "" \
|
|
--field="$M_CUSTOMIZE left-append.csv:FBTN" "geany $HOME/.config/mabox/left-append.csv" \
|
|
--field="$M_RIGHT:LBL" "" \
|
|
--field="$M_CUSTOMIZE right-prepend.csv:FBTN" "geany $HOME/.config/mabox/right-prepend.csv" \
|
|
--field="$M_RIGHT_DESC:LBL" "" \
|
|
--field="$M_CUSTOMIZE right-append.csv:FBTN" "geany $HOME/.config/mabox/right-append.csv" \
|
|
> $res7 &
|
|
|
|
#TAB 8 Picom
|
|
yad --plug=$KEY --tabnum=8 --borders=20 \
|
|
--text="$COMP_DESC" \
|
|
--columns=1 --form \
|
|
--field="$COMP_EDIT:FBTN" "$EDITOR $HOME/.config/picom.conf" \
|
|
--field="$COMP_RESTART:FBTN" "mabox-compositor --restart" \
|
|
--field="$COMP_TOGGLE:FBTN" "mabox-compositor --toggle" \
|
|
--field="$COMP_REMOVE:FBTN" "rm -f $HOME/.config/picom.conf" \
|
|
--field="$COMP_DEFAULT:FBTN" "cp /etc/skel/.config/picom.conf $HOME/.config/" \
|
|
> $res8 &
|
|
|
|
#TAB 9 MOTYWY
|
|
yad --plug=$KEY --tabnum=9 --borders=2 \
|
|
--text="<b>$MT_MNGR</b>\n $MT_MNGR_DESC" \
|
|
--form --field="$MT_MNGR!preferences-desktop-theme:FBTN" "mb-obthemes" \
|
|
> $res9 &
|
|
|
|
#main window
|
|
yad --window-icon=utilities-terminal \
|
|
--notebook --tab-pos="left" --key=$KEY \
|
|
--tab="$SYSTEM" --tab="$SOFTWARE" --tab="Autostart" --tab="$LOOK" --tab="$TINT2"\
|
|
--tab="Conky" --tab="Menu" --tab="$COMPOSITOR" --tab="$THEMES" \
|
|
--title="Mabox Control Center" --image=/usr/share/icons/hicolor/64x64/apps/distributor-logo-mabox.png \
|
|
--width=680 --height=420 --image-on-top --text="$MCC" --no-buttons > $out &
|
|
}
|
|
|
|
maindialog
|