mabox-tools/bin/mcc

555 lines
28 KiB
Plaintext
Raw Permalink Normal View History

2020-02-18 17:24:18 +01:00
#!/bin/bash
# mcc: Mabox Control Center
2022-05-03 13:05:27 +02:00
# Copyright (C) 2019-2022 napcok <napcok@gmail.com>
2020-02-18 17:24:18 +01:00
#
2021-10-05 18:53:52 +02:00
if hash btop 2>/dev/null; then
BTOP="btop"
else
BTOP="bpytop"
fi
2020-02-18 17:24:18 +01:00
case $LANG in
pl*)
2020-08-31 19:38:47 +02:00
TITLE="Centrum Sterowania Mabox"
2021-08-31 16:06:43 +02:00
MCC="<big><b>Centrum Sterowania Mabox</b></big>\t\n<i>Skonfiguruj wygląd i zachowanie swojego Maboxa</i>\t"
2022-08-26 17:10:27 +02:00
START="Start"
2020-02-20 18:31:17 +01:00
SYSTEM="System i Sprzęt"
2020-02-22 16:43:29 +01:00
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"
2021-08-12 15:48:47 +02:00
KEYBOARD="Mysz i Klawiatura"
2020-02-22 16:43:29 +01:00
HARDWARE="Konfiguracja sprzętowa"
2020-02-20 18:31:17 +01:00
SOFTWARE="Programy"
2020-08-31 19:38:47 +02:00
AUTOSTART="Autostart"
AUTOSTART_HEAD="Autostart"
2020-02-20 18:31:17 +01:00
LOOK="Wygląd"
TINT2="Panel Tint2"
SETTINGS="Ustawienia"
2020-02-18 17:24:18 +01:00
CONKY="Conky"
2022-08-25 23:52:38 +02:00
MENU="Menu/Panele boczne"
2020-02-20 18:31:17 +01:00
THEMES="Motywy"
2021-08-31 16:06:43 +02:00
HELP="Pomoc"
2022-08-25 23:52:38 +02:00
HELP_TXT="Visit <a href='https://manual.maboxlinux.org/en/'>Mabox Linux Manual</a> to learn more about Mabox. \nDo you have questions? Want to get involved?\nTake a look at our: <a href='https://maboxlinux.org/'>official website</a>, <a href='https://forum.maboxlinux.org/'>forum</a>, <a href='https://blog.maboxlinux.org/'>blog</a>\n \n<i>Mabox Linux is developed with passion in spare time.\nMabox is free and it will always be.\nIf you like Mabox you can help by making a small <a href='https://ko-fi.com/maboxlinux'>donation</a></i> \nThank you for choosing to use Mabox Linux!\n"
2020-02-20 18:31:17 +01:00
SYSTEM_DESC="Ustawienia oraz informacje systemowe i sprzętowe"
MONITORS="<b>Monitor(y)</b>"
2020-02-23 19:40:07 +01:00
SOFTWARE_DESC="Aktualizacja - Instalacja Programów - Preferowane programy\n"
2022-05-03 13:05:27 +02:00
AUTOSTART_DESC="<a href='https://manual.maboxlinux.org/en/configuration/autostart/'>Pomoc (online)</a>\nOpenbox używa dwóch mechanizmów autostartu.\nPierwszy z nich to autostart XDG."
2020-02-26 15:15:51 +01:00
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"
2020-02-23 19:40:07 +01:00
LOOK_DESC="Narzędzia do konfiguracji wyglądu\n"
2020-02-26 15:15:51 +01:00
EDIT_FILE="Edytuj plik"
2020-02-18 22:48:13 +01:00
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>."
2022-06-05 16:19:15 +02:00
T_CONF="Konfiguruj panel"
2020-02-18 17:24:18 +01:00
T_CHOOSE="Wybierz tint2!!Możesz uruchomić kilka paneli"
T_RESTART="Restartuj panel(e)"
2021-01-30 21:58:32 +01:00
T_LAUNCHERS="Dodaj/usuń programy do panelu"
2020-02-18 22:48:13 +01:00
TINT_DIR="Otwórz katalog <i>~/.config/tint2/</i> w menadżerze plików"
2022-08-26 17:10:27 +02:00
CONKY_DESC="<b>Menedżer Conky</b><i>(beta)</i>\nWybierz uruchamiane Conky. W Maboxie dostępnych jest kilka konfiguracji Conky, możesz dodać własne do katalogu <i>~/.config/conky</i>."
2020-02-18 17:24:18 +01:00
CONKY_CHOOSE="Wybierz Conky"
CONKY_RESTART="Restartuj Conky"
CONKY_EDIT="Edytuj Conky"
2020-02-26 15:15:51 +01:00
OPEN_CONKYDIR="Otwórz katalog <i>~/.config/conky</i>"
2022-08-26 17:10:27 +02:00
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<small><i>Dostępne są również dwa <b>panele boczne</b>, umożliwiające szybki dostęp np. do systemu plików.</i>\nDo menu oraz paneli możesz dodawać swoje własne polecenia - <a href='https://blog.maboxlinux.org/how-to-add-custom-commands-to-menu-and-sidepanels/'>post na devblogu</a></small>"
2021-10-12 17:35:59 +02:00
M_EDIT_MAIN="Ulubione"
M_EDIT_MAIN_AFTER="Pod Aplikacjami"
2020-02-27 19:01:40 +01:00
M_RESTORE_MAIN="Przywróć domyślne menu"
2021-10-12 17:35:59 +02:00
M_LEFT="<b>PANEL LEWY</b>"
M_LEFT_KEY="<small>(ctrl+super+left)</small>"
M_MAIN="<b>MENU GŁÓWNE</b>"
M_MAIN_KEY="<small>(super)</small>"
2022-08-26 17:10:27 +02:00
SETTINGS_MENU="<b>MENU USTAWIEŃ</b>"
SETTINGS_EDIT="Edytuj..."
2021-10-12 17:35:59 +02:00
M_RIGHT="<b>PANEL PRAWY</b>"
M_RIGHT_KEY="<small>(ctrl+super+left)</small>"
2020-02-26 15:15:51 +01:00
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>"
2021-10-12 17:35:59 +02:00
M_CUSTOMIZE="<i>Edytuj komendy:</i>"
M_MORE="<b>WIĘCEJ USTAWIEŃ...</b>"
2022-08-26 17:10:27 +02:00
M_COLORSETTINGS="<b>Kolorystyka...</b>"
2021-10-12 17:35:59 +02:00
OWN_COMMANDS_TOP="(Góra)"
OWN_COMMANDS_BOTTOM="(Dół)"
2020-02-18 17:24:18 +01:00
COMPOSITOR="Kompozytor"
2022-08-22 16:48:45 +02:00
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>p</b>)."
2020-02-18 17:24:18 +01:00
COMP_GUI="Ustawienia"
COMP_EDIT="Edytuj plik konfiguracyjny"
COMP_RESTART="Restart"
2021-10-12 17:35:59 +02:00
COMP_TOGGLE="Włącz/Wyłącz (<b>win</b>+<b>p</b>)"
2020-02-18 17:24:18 +01:00
COMP_REMOVE="Usuń plik konfiguracyjny"
COMP_DEFAULT="Przywróć domyślny plik konfiguracyjny"
MT_MNGR="Menedżer Motywów Maboxa"
2022-05-03 13:05:27 +02:00
MT_MNGR_DESC="\n<a href='https://manual.maboxlinux.org/en/configuration/theme-manager/'>Pomoc (online)</a>\nMotyw Maboxa składa się z:\n - tapety\n - wystroju GTK2/GTK3 oraz obramowania okien 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, a następnie dowolnie przełączać się między nimi."
2023-01-04 13:18:49 +01:00
COLORIZER_DESC="<b>Colorizer</b>\nUmożliwia zmianę kolorystyki elementów pulpitu Mabox.\nMoże również automatycznie generować kolorystykę na bazie tapety.\n<i>Zobacz video (online):</i> <a href='https://youtu.be/h50oeS7aFyM'>Colorizer - krótki przegląd</a>\n"
COL_MODULES="Pojedyńcze Moduły (Zaawansowane)"
COL_MENU="Colorizer Menu (Zaawansowane)"
2022-08-22 16:48:45 +02:00
LNG="pl"
2022-08-25 23:52:38 +02:00
USER_LBL="użytkownik"
USERS_MSM="Użytkownicy"
RES="rozdzielczość"
PKGS_INSTALLED="zainstalowane pakiety"
PKGS_STAT="Statystyki"
UPDCHECK="sprawdź aktualizacje"
CLI_UPD="Aktualizacja CLI"
KERNEL_LBL="jądro"
KERNELS="Jądra"
INSTALLED="zainstalowany:"
2022-09-20 18:04:09 +02:00
DAYS_AGO="dni temu"
2022-08-25 23:52:38 +02:00
MABOX_DESC="Twój lekki, szybki i funkcjonalny Linuksowy Desktop"
2022-09-14 23:17:27 +02:00
ADVANCED="Zaawansowane"
2022-08-22 16:48:45 +02:00
;;
es*)
2020-08-31 19:38:47 +02:00
TITLE="Centro de control Mabox"
2022-08-26 17:10:27 +02:00
MCC="<big><b>Centro de control Mabox</b></big>\t\nConfigura y ajusta tu sistema Mabox\t"
START="Start"
SYSTEM="Sistema/Hardware"
LOCALE_SETTINGS="Configuración regional"
LANGUAGE_PACKAGES="Paquetes de idiomas"
KERNEL="Núcleo"
USER_ACCOUNTS="Cuentas de usuario"
TIME_DATE="Hora y fecha"
2021-08-12 15:48:47 +02:00
KEYBOARD="Mouse e teclado"
HARDWARE="Configuración de hardware"
SOFTWARE="Programas"
2020-08-31 19:38:47 +02:00
AUTOSTART="Programas de inicio"
AUTOSTART_HEAD="Programas de inicio"
LOOK="Apariencia"
TINT2="Panel Tint2"
SETTINGS="Ajustes"
CONKY="Recuadro Conky"
2020-08-31 19:38:47 +02:00
MENU="Menú y Paneles"
THEMES="Temas"
2021-08-31 16:06:43 +02:00
HELP="Help"
2022-08-25 23:52:38 +02:00
HELP_TXT="Visit <a href='https://manual.maboxlinux.org/es/'>Mabox Linux Manual</a> to learn more about Mabox. \nDo you have questions? Want to get involved?\nTake a look at our: <a href='https://maboxlinux.org/'>official website</a>, <a href='https://forum.maboxlinux.org/'>forum</a>, <a href='https://blog.maboxlinux.org/'>blog</a>\n \n<i>Mabox Linux is developed with passion in spare time.\nMabox is free and it will always be.\nIf you like Mabox you can help by making a small <a href='https://ko-fi.com/maboxlinux'>donation</a></i> \nThank you for choosing to use Mabox Linux!\n"
SYSTEM_DESC="Ajustes e información del sistema y de hardware"
MONITORS="<b>Monitor(es)</b>"
SOFTWARE_DESC="Instalación y actualización de programas - Aplicaciones preferidas.\n"
2022-05-03 13:05:27 +02:00
AUTOSTART_DESC="<a href='https://manual.maboxlinux.org/es/configuration/autostart/'>Info (online)</a>\nOpenbox ocupa 2 métodos de reinicio.\nEl primero es reinicio por XDG."
2020-08-31 19:38:47 +02:00
AUTOSTART_DESC2="El segundo método de reinicio es usar el mismo archivo script de Openbox:\n<i><b>~/.config/openbox/autostart</b></i>. "
EDIT_XDG="Seleccionar ítemes para reinicio"
EDIT_SCRIPT="Editar el archivo script de reinicio"
AUTOSTART_RESET="Reestablecer el archivo script de reinicio por defecto"
LOOK_DESC="Configurar la apariencia de tu escritorio.\n"
EDIT_FILE="Editar el archivo"
TINT_DESC="<b>Configurador de paneles Tint2</b>\nAquí puede elegir los ajustes para los paneles.\nExisten varios ajustes predefinidos en Mabox, y además puede agregar nuevos en este directorio <i>~/.config/tint2</i> ."
2022-06-05 16:19:15 +02:00
T_CONF="Configurar panel"
T_CHOOSE="Elija un panel tint2!!Puede ejecutar varios paneles de inmediato"
T_RESTART="Reiniciar panel tint2"
2021-01-30 21:58:32 +01:00
T_LAUNCHERS="Add/remove launchers..."
TINT_DIR="Abrir la carpeta <i>~/.config/tint2/</i> "
2022-08-26 17:10:27 +02:00
CONKY_DESC="<b>Gestor de recuadro Conky</b><i>(beta)</i>\nElija el recuadro Conky que desea ejecutar. Existen varios ajustes predefinidos de recuadros Conky, y además puede agregar nuevos en este directorio <i>~/.config/conky</i> ."
CONKY_CHOOSE="Seleccionar recuadros Conky"
CONKY_RESTART="Recargar recuadro Conky"
CONKY_EDIT="Editar recuadro Conky"
OPEN_CONKYDIR="Abrir la carpeta <i>~/.config/conky</i> "
2022-08-26 17:10:27 +02:00
MENU_DESC="Menu principal (<small>accede con clic derecho, teclas Super+barra de espacio o desde el ícono del panel</small>) activa escribe sobre buscar. Sólo empieza a escribir el término que estas buscando.\n<small><i>There are also two <b>side-panels</b> available for quick access to file system locations for example.</i>You can add custom commands to menus and side-panels - <a href='https://blog.maboxlinux.org/how-to-add-custom-commands-to-menu-and-sidepanels/'>blogpost</a></small>"
2021-10-12 17:35:59 +02:00
M_EDIT_MAIN="Favoritos"
M_EDIT_MAIN_AFTER="Below Apps"
M_RESTORE_MAIN="Reestablecer el menu por defecto"
2021-10-12 17:35:59 +02:00
M_LEFT="<b>PANEL IZQUIERDO</b>"
M_LEFT_KEY="<small>(ctrl+super+left)</small>"
M_MAIN="<b>MENU PRINCIPAL</b>"
M_MAIN_KEY="<small>(super)</small>"
2022-08-26 17:10:27 +02:00
SETTINGS_MENU="<b>SETTINGS MENU</b>"
SETTINGS_EDIT="Editar..."
2021-10-12 17:35:59 +02:00
M_RIGHT="<b>PANEL DERECHO</b>"
M_RIGHT_KEY="<small>(ctrl+super+right)</small>"
M_LEFT_DESC="<small>Panel izquierdo\n - Navegacion veloz\n - Marcadores GTK\n - Máquinas Virtuales</small>"
M_RIGHT_DESC="<small>Panel derecho\n - Configuración del sistema\n - ayuda\n - opciones de salida</small>"
2021-10-12 17:35:59 +02:00
M_CUSTOMIZE="<i>Ajustes:</i>"
M_MORE="<b>MORE SETTINGS..</b>"
2022-08-26 17:10:27 +02:00
M_COLORSETTINGS="<b>Coloring...</b>"
2021-10-12 17:35:59 +02:00
OWN_COMMANDS_TOP="(TOP)"
OWN_COMMANDS_BOTTOM="(BOTTOM)"
COMPOSITOR="Compositor gráfico"
COMP_DESC="<b>Picom</b> se usa como gestor gráfico en Mabox"
COMP_GUI="Configuración"
COMP_EDIT="Editar el archivo de configuración"
COMP_RESTART="Reiniciar compositor gráfico"
2021-10-12 17:35:59 +02:00
COMP_TOGGLE="Activar/desactivar compositor (<b>win</b>+<b>p</b>)"
COMP_REMOVE="Eliminar archivo picom.conf"
COMP_DEFAULT="Reestablecer compositor grafico por defecto"
MT_MNGR="Gestor de Temas Mabox"
2022-05-03 13:05:27 +02:00
MT_MNGR_DESC="\n<a href='https://manual.maboxlinux.org/es/configuration/theme-manager/'>Help (online)</a>\nTemas Mabox consiste de:\n - fondos de pantalla\n - temas GTK2/GTK3\n - ajustes a tema Openbox\n - paneles Tint2 seleccionados\n - recuadros Conky seleccionados\n\nCon el gestor de Temas en Mabox puede fácilmente guardar nuevas configuraciones, y cambiar entre ellas."
2023-01-04 13:18:49 +01:00
COLORIZER_DESC="<b>Colorizer</b>\nColorizer allows you to change the color of the Mabox desktop elements.\nIt can also automatically generate colors based on the wallpaper.\n<i>See video (online - YT):</i> <a href='https://youtu.be/h50oeS7aFyM'>Colorizer - overview</a>\n"
COL_MODULES="Individual Modules (advanced mode):"
COL_MENU="Colorizer Menu (advanced)"
2022-08-22 16:48:45 +02:00
LNG="en"
2022-08-25 23:52:38 +02:00
USER_LBL="user"
USERS_MSM="Users"
RES="resolution"
PKGS_INSTALLED="installed pkgs"
PKGS_STAT="Statistics"
UPDCHECK="check updates"
CLI_UPD="CLI update"
KERNEL_LBL="kernel"
KERNELS="Kernels"
INSTALLED="install date: "
2022-09-20 18:04:09 +02:00
DAYS_AGO="days ago"
2022-09-14 23:17:27 +02:00
MABOX_DESC="Your fast, lightweight and functional Linux Desktop"
ADVANCED="Advanced"
;;
2020-02-18 17:24:18 +01:00
*)
2020-08-31 19:38:47 +02:00
TITLE="Mabox Control Center"
2022-08-26 17:10:27 +02:00
MCC="<big><b>Mabox Control Center</b></big>\t\n<i>Configure and customize your Mabox Linux</i>\t"
START="Start"
2021-08-31 16:06:43 +02:00
SYSTEM="System/HW"
2020-02-22 16:43:29 +01:00
LOCALE_SETTINGS="Locale Settings"
LANGUAGE_PACKAGES="Language Packages"
KERNEL="Kernel"
USER_ACCOUNTS="User Accounts"
TIME_DATE="Time and Date"
2021-08-12 15:48:47 +02:00
KEYBOARD="Mouse and Keyboard Settings"
2020-02-22 16:43:29 +01:00
HARDWARE="Hardware Configuration"
2020-02-20 18:31:17 +01:00
SOFTWARE="Software"
2020-08-31 19:38:47 +02:00
AUTOSTART="Autostart"
AUTOSTART_HEAD="Autostart"
2020-02-23 19:40:07 +01:00
LOOK="Look and Feel"
2021-01-30 21:58:32 +01:00
TINT2="Tint2 Panel"
2020-02-18 17:24:18 +01:00
SETTINGS="Settings"
CONKY="Conky"
2022-08-25 23:52:38 +02:00
MENU="Menu/SidePanels"
2020-02-20 18:31:17 +01:00
THEMES="Themes"
2021-08-31 16:06:43 +02:00
HELP="Help"
2022-08-25 23:52:38 +02:00
HELP_TXT="Visit <a href='https://manual.maboxlinux.org/en/'>Mabox Linux Manual</a> to learn more about Mabox. \nDo you have questions? Want to get involved?\nTake a look at our: <a href='https://maboxlinux.org/'>official website</a>, <a href='https://forum.maboxlinux.org/'>forum</a>, <a href='https://blog.maboxlinux.org/'>blog</a>\n \n<i>Mabox Linux is developed with passion in spare time.\nMabox is free and it will always be.\nIf you like Mabox you can help by making a small <a href='https://ko-fi.com/maboxlinux'>donation</a></i> \nThank you for choosing to use Mabox Linux!\n"
2020-02-20 18:31:17 +01:00
SYSTEM_DESC="System and Hardware settings and information"
MONITORS="<b>Monitor(s)</b>"
2020-02-23 19:40:07 +01:00
SOFTWARE_DESC="Software installation and update - Preferred Applications.\n"
2022-05-03 13:05:27 +02:00
AUTOSTART_DESC="<a href='https://manual.maboxlinux.org/en/configuration/autostart/'>Info (online)</a>\nOpenbox uses two autostart methods.\nFirst is XDG autostart."
2020-02-26 16:50:56 +01:00
AUTOSTART_DESC2="Second method is Openbox own autostart script: <i><b>~/.config/openbox/autostart</b></i>. "
2020-02-26 15:15:51 +01:00
EDIT_XDG="Select items to autostart"
EDIT_SCRIPT="Edit script"
AUTOSTART_RESET="Reset to default autostart script"
2020-02-23 19:40:07 +01:00
LOOK_DESC="Customize Look and Feel of your desktop.\n"
2020-02-22 16:43:29 +01:00
EDIT_FILE="Edit file"
2020-02-20 18:31:17 +01:00
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."
2022-06-05 16:19:15 +02:00
T_CONF="Configure panel"
2020-02-18 17:24:18 +01:00
T_CHOOSE="Choose tint2!!You can run several tint2 panels at once"
T_RESTART="Restart tint2"
2021-01-30 21:58:32 +01:00
T_LAUNCHERS="Add/remove launchers..."
2020-02-26 15:15:51 +01:00
TINT_DIR="Open <i>~/.config/tint2/</i> directory "
2022-08-26 17:10:27 +02:00
CONKY_DESC="<b>Conky Manager</b><i>(beta)</i>\nChoose Conky you want to run. There are several predefined Conky configurations, you can also add your own to <i>~/.config/conky</i> directory."
2020-02-18 17:24:18 +01:00
CONKY_CHOOSE="Choose Conky(s)"
CONKY_RESTART="Reload Conky"
CONKY_EDIT="Edit Conky"
2020-02-26 16:50:56 +01:00
OPEN_CONKYDIR="Open <i>~/.config/conky</i> directory"
2022-08-26 17:10:27 +02:00
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<small><i>There are also two <b>side-panels</b> available for quick access to file system locations for example.</i> You can add custom commands to menus and side-panels <a href='https://blog.maboxlinux.org/how-to-add-custom-commands-to-menu-and-sidepanels/'>blogpost</a></small>"
2021-10-12 17:35:59 +02:00
M_EDIT_MAIN="Edit Favorites"
M_EDIT_MAIN_AFTER="Edit below Apps"
2020-02-27 19:01:40 +01:00
M_RESTORE_MAIN="Reset mainmenu to default"
2021-10-12 17:35:59 +02:00
M_LEFT="<b>LEFT PANEL</b>"
M_LEFT_KEY="<small>(ctrl+super+left)</small>"
M_MAIN="<b>MAIN MENU</b>"
M_MAIN_KEY="<small>(super)</small>"
2022-08-26 17:10:27 +02:00
SETTINGS_MENU="<b>SETTINGS MENU</b>"
SETTINGS_EDIT="Edit..."
2021-10-12 17:35:59 +02:00
M_RIGHT="<b>RIGHT PANEL</b>"
M_RIGHT_KEY="<small>(ctrl+super+right)</small>"
2020-02-26 16:50:56 +01:00
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>"
2021-10-12 17:35:59 +02:00
M_CUSTOMIZE="<i>Customize commands:</i>"
M_MORE="<b>MORE SETTINGS..</b>"
2022-08-26 17:10:27 +02:00
M_COLORSETTINGS="<b>Coloring...</b>"
2021-10-12 17:35:59 +02:00
OWN_COMMANDS_TOP="(TOP)"
OWN_COMMANDS_BOTTOM="(BOTTOM)"
2020-02-18 17:24:18 +01:00
COMPOSITOR="Compositor"
2020-02-20 18:31:17 +01:00
COMP_DESC="<b>Picom</b> is used as composite manager in Mabox"
2020-02-18 17:24:18 +01:00
COMP_GUI="Settings"
COMP_EDIT="Edit config file"
COMP_RESTART="Restart"
2021-10-12 17:35:59 +02:00
COMP_TOGGLE="Toggle (<b>win</b>+<b>p</b>)"
2020-02-20 18:31:17 +01:00
COMP_REMOVE="Remove picom.conf"
2020-02-18 17:24:18 +01:00
COMP_DEFAULT="Reset to default"
2020-02-20 18:31:17 +01:00
MT_MNGR="Mabox Theme Manager"
2022-05-03 13:05:27 +02:00
MT_MNGR_DESC="\n<a href='https://manual.maboxlinux.org/en/configuration/theme-manager/'>Help (online)</a>\nMabox theme consist of:\n - wallpaper\n - GTK2/GTK3 Theme and Openbox window decoration \n - selected Tint2 panel(s)\n - selected Conkies \n\nWith Mabox Theme Manager you can easily save your configurations, and switch between them."
2023-01-04 13:18:49 +01:00
COLORIZER_DESC="<b>Colorizer</b>\nColorizer allows you to change the color of the Mabox desktop elements.\nIt can also automatically generate colors based on the wallpaper.\n<i>See video (online - YT):</i> <a href='https://youtu.be/h50oeS7aFyM'>Colorizer - overview</a>\n"
COL_MODULES="Individual Modules (advanced mode):"
COL_MENU="Colorizer Menu (advanced)"
2022-08-22 16:48:45 +02:00
LNG="en"
2022-08-25 23:52:38 +02:00
USER_LBL="user"
USERS_MSM="Users"
RES="resolution"
PKGS_INSTALLED="installed pkgs"
PKGS_STAT="Statistics"
UPDCHECK="check updates"
CLI_UPD="CLI update"
KERNEL_LBL="kernel"
KERNELS="Kernels"
INSTALLED="install date: "
2022-09-20 18:04:09 +02:00
DAYS_AGO="days ago"
2022-09-14 23:17:27 +02:00
MABOX_DESC="Your fast, lightweight and functional Linux Desktop"
ADVANCED="Advanced"
;;
2020-02-18 17:24:18 +01:00
esac
maindialog () {
KEY=$RANDOM
res1=$(mktemp --tmpdir mcc-tab1.XXXXXXXX)
2022-08-25 23:52:38 +02:00
#res2=$(mktemp --tmpdir mcc-tab2.XXXXXXXX)
2020-02-18 17:24:18 +01:00
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)
2021-08-31 16:06:43 +02:00
res10=$(mktemp --tmpdir mcc-tab10.XXXXXXXX)
2022-08-22 16:48:45 +02:00
res11=$(mktemp --tmpdir mcc-tab11.XXXXXXXX)
2022-08-25 23:52:38 +02:00
res12=$(mktemp --tmpdir mcc-tab12.XXXXXXXX)
out=$(mktemp --tmpdir mcc-out.XXXXXXXX)
2020-02-18 17:24:18 +01:00
# cleanup
2022-08-25 23:52:38 +02:00
trap "rm -f $res1 $res3 $res4 $res5 $res6 $res7 $res8 $res9 $res10 $res11 $res12 $out" EXIT
2020-02-18 17:24:18 +01:00
2022-08-25 23:52:38 +02:00
OSNAME=$(lsb_release -d | awk '{print $2}')
OSVERSION=$(lsb_release -r | awk '{print $2}')
2022-11-09 22:56:06 +01:00
#OSCODE=$(lsb_release -c | awk '{print $2}')
OSCODE=$(grep CODENAME /etc/lsb-release |cut -d '=' -f2)
2020-02-18 17:24:18 +01:00
2022-08-25 23:52:38 +02:00
# system uptime
UPT="$(uptime -p)"
UPT="${UPT/up /}"
UPT="${UPT/ day?/d}"
UPT="${UPT/ hour?/h}"
UPT="${UPT/ minute?/m}"
# install date
if [[ -e /var/log/pacman.log ]]; then
INST="$(sed 1q /var/log/pacman.log)"
INST="${INST/ */}"
INST="${INST/T*/}" # newer pacman adds a different timestamp (TXX:XX:XX+0000), we just want the date
INST="${INST/\[/}"
#INST="${INST//\-/ }"
fi
2022-09-20 18:04:09 +02:00
# Days ago
TODAY=$(date +%F)
let DIFF=($(date +%s -d ${TODAY})-$(date +%s -d ${INST}))/86400
if [[ "$DIFF" > "1" ]];then
2022-09-20 23:15:04 +02:00
DAGO="(${DIFF} ${DAYS_AGO})"
2022-09-20 18:04:09 +02:00
else
DAGO=""
fi
2022-08-25 23:52:38 +02:00
PKGS=$(pacman -Qq 2>/dev/null | wc -l)
# kernel version
KERN="${KERN:-$(uname -sr | awk '{print $2}')}"
KERN="${KERN/-*/}"
KERN="${KERN/linux/}"
KERN="${KERN,,}"
RESOLUTION=$(xdpyinfo | awk '/^ +dimensions/ {print $2}')
INTRO_TXT=$(cat <<EOF
\t<big>Mabox Linux $OSVERSION</big> <i>$OSCODE</i>
\t<small><i>$MABOX_DESC</i></small>\n
2022-09-20 23:15:04 +02:00
\t<small><tt>$INSTALLED </tt></small><b>$INST</b> <small>$DAGO</small>
2022-08-27 15:07:39 +02:00
\t<small><tt>wm: </tt></small><b>$XDG_SESSION_DESKTOP</b>
2022-08-25 23:52:38 +02:00
\t<small><tt>uptime: </tt></small><b>$UPT</b>
\n
EOF
)
#INTRO
yad --plug=$KEY --tabnum=1 --borders=10 \
--text="$INTRO_TXT" --image=/usr/share/icons/hicolor/128x128/apps/mbcc.png \
--columns=4 --form \
--field="$USER_LBL:LBL" "" \
--field="$PKGS_INSTALLED:LBL" "" \
--field="$UPDCHECK:LBL" "" \
--field="$KERNEL_LBL:LBL" "" \
2022-09-29 22:06:37 +02:00
--field="$RES:LBL" "" \
2022-08-25 23:52:38 +02:00
--field="<b>$USER</b>:LBL" "" \
--field="<b>$PKGS</b>:LBL" "" \
--field="<b>>>></b>:LBL" "" \
--field="<b>$KERN</b>:LBL" "" \
2022-09-29 22:06:37 +02:00
--field="<b>$RESOLUTION</b>:LBL" "" \
2022-08-25 23:52:38 +02:00
--field=" $USERS_MSM!system-config-users!:FBTN" "manjaro-settings-manager -m msm_users" \
--field=" Pamac!package-manager-icon!:FBTN" "pamac-manager" \
--field=" Pamac updater!software-update!:FBTN" "pamac-manager --updates" \
--field=" $KERNELS!distributor-logo-linux!:FBTN" "manjaro-settings-manager -m msm_kernel" \
2022-09-29 22:06:37 +02:00
--field=" ARandr!system-terminal!:FBTN" "arandr" \
2022-08-25 23:52:38 +02:00
--field=" :LBL" "" \
2023-05-31 21:43:41 +02:00
--field=" $PKGS_STAT (<small><tt>yay -Ps</tt></small>)!utilities-terminal!:FBTN" "terminator -T 'Package stats' -e 'yay -Ps;read'" \
--field=" $CLI_UPD (<small><tt>yay</tt></small>)!utilities-terminal!:FBTN" "terminator -e 'bash -c yay;read'" \
2022-08-25 23:52:38 +02:00
--field=" :LBL" "" \
2022-09-29 22:06:37 +02:00
--field=" LXRandr!system-terminal!:FBTN" "lxrandr" \
2020-02-18 17:24:18 +01:00
> $res1 &
2022-08-25 23:52:38 +02:00
# Programy
#yad --plug=$KEY --tabnum=2 --borders=20 --text="$SOFTWARE_DESC" \
#--icons --compact --term "terminator -e %s" --read-dir=/home/napcok/Git/mabox-tools/mcc/software --item-width=100 \
#> $res2 &
#--icons --compact --read-dir=/usr/share/mcc/software --item-width=100 \
2020-02-18 17:24:18 +01:00
2022-08-25 23:52:38 +02:00
# AUTOSTART
2022-08-26 17:10:27 +02:00
yad --plug=$KEY --tabnum=4 --borders=20 --uri-handler=xdg-open \
2020-08-31 19:38:47 +02:00
--text="<b>$AUTOSTART_HEAD</b>" --image=gtk-execute \
2020-02-18 17:24:18 +01:00
--columns=1 --form \
2020-02-20 18:31:17 +01:00
--field="$AUTOSTART_DESC:LBL" "" \
2020-02-26 15:15:51 +01:00
--field="$EDIT_XDG:FBTN" "yautostart" \
--field="$AUTOSTART_DESC2 :LBL" "" \
2022-08-22 16:48:45 +02:00
--field="$EDIT_SCRIPT <i>~/.config/openbox/autostart</i>:FBTN" "xdg-open $HOME/.config/openbox/autostart" \
2020-02-26 15:15:51 +01:00
--field="$AUTOSTART_RESET:FBTN" "cp /etc/skel/.config/openbox/autostart $HOME/.config/openbox/" \
2020-02-21 22:39:09 +01:00
> $res3 &
2021-08-31 16:06:43 +02:00
#--field=":LBL" "" \
2020-02-18 17:24:18 +01:00
2022-08-25 23:52:38 +02:00
# TINT2
2022-08-26 17:10:27 +02:00
yad --plug=$KEY --tabnum=2 --borders=20 \
2022-09-14 23:17:27 +02:00
--text="$TINT_DESC \n" --image=tint2conf \
2020-02-18 17:24:18 +01:00
--columns=1 --form \
2022-08-22 16:48:45 +02:00
--field="$T_LAUNCHERS:FBTN" "jgtint2launcher" \
2022-06-05 16:19:15 +02:00
--field="$T_CONF:FBTN" "jgtint2-pipe -s" \
2020-02-18 17:24:18 +01:00
--field="$T_RESTART:FBTN" "mb-tint2restart" \
2022-09-14 23:17:27 +02:00
--field="$ADVANCED:LBL" "" \
--field="$T_CHOOSE:FBTN" "mb-tint2-manager" \
2020-02-18 22:48:13 +01:00
--field="$TINT_DIR:FBTN" "exo-open $HOME/.config/tint2/" \
2020-02-18 17:24:18 +01:00
> $res5 &
2022-08-25 23:52:38 +02:00
# MENU
2022-08-26 17:10:27 +02:00
yad --plug=$KEY --tabnum=3 --borders=1 \
2020-08-29 15:39:24 +02:00
--text="$MENU_DESC" --image=menu-editor \
2022-08-26 17:10:27 +02:00
--columns=4 --form \
2021-10-12 17:35:59 +02:00
--field="$M_LEFT:FBTN" "mb-jgtools places" \
--field="$M_LEFT_KEY:LBL" "" \
--field="$M_CUSTOMIZE:LBL" "" \
2022-08-22 16:48:45 +02:00
--field="$OWN_COMMANDS_TOP:FBTN" "xdg-open $HOME/.config/mabox/places-prepend.csv" \
--field="$OWN_COMMANDS_BOTTOM:FBTN" "xdg-open $HOME/.config/mabox/places-append.csv" \
2021-10-12 17:35:59 +02:00
--field=" :LBL" "" \
2022-08-26 17:10:27 +02:00
--field="$M_MORE:FBTN" "jgmenusettings-pipe -s" \
--field=" $M_COLORSETTINGS!colorizer!:FBTN" "colorizer-menus -s" \
2021-10-12 17:35:59 +02:00
--field="$M_MAIN:FBTN" "mb-jgtools main" \
--field="$M_MAIN_KEY:LBL" "" \
--field=" :LBL" "" \
2022-08-22 16:48:45 +02:00
--field="$M_EDIT_MAIN:FBTN" "xdg-open $HOME/.config/mabox/favorites.csv" \
--field="$M_EDIT_MAIN_AFTER:FBTN" "xdg-open $HOME/.config/mabox/mainmenu_below_apps.csv" \
2021-10-12 17:35:59 +02:00
--field=" :LBL" "" \
2022-08-26 17:10:27 +02:00
--field=" :LBL" "" \
--field=" :LBL" "" \
--field="$SETTINGS_MENU:FBTN" "mb-jgtools settings" \
--field="<small>(super+s)</small>:LBL" "" \
--field=" :LBL" "" \
--field="$SETTINGS_EDIT:FBTN" "xdg-open $HOME/.config/mabox/settings.csv" \
--field=" :LBL" "" \
--field=" :LBL" "" \
--field=" :LBL" "" \
--field=" :LBL" "" \
2021-10-12 17:35:59 +02:00
--field="$M_RIGHT:FBTN" "mb-jgtools right" \
--field="$M_RIGHT_KEY:LBL" "" \
--field=" :LBL" "" \
2022-08-22 16:48:45 +02:00
--field="$OWN_COMMANDS_TOP:FBTN" "xdg-open $HOME/.config/mabox/right-prepend.csv" \
--field="$OWN_COMMANDS_BOTTOM:FBTN" "xdg-open $HOME/.config/mabox/right-append.csv" \
2022-08-26 17:10:27 +02:00
--field=" :LBL" "" \
--field=" :LBL" "" \
2022-08-25 23:52:38 +02:00
> $res6 &
2021-08-31 16:06:43 +02:00
#--field="$M_LEFT_DESC:LBL" "" \
#--field="$M_RIGHT_DESC:LBL" "" \
2020-02-18 17:24:18 +01:00
2022-08-25 23:52:38 +02:00
# WYGLĄD
2022-08-26 17:10:27 +02:00
yad --plug=$KEY --tabnum=5 --borders=20 --text="$LOOK_DESC" --icons --read-dir=/usr/share/mcc/appearance --item-width=80 \
2022-08-25 23:52:38 +02:00
> $res4 &
2020-10-01 18:21:51 +02:00
2022-08-25 23:52:38 +02:00
# MOTYWY
2022-08-26 17:10:27 +02:00
yad --plug=$KEY --tabnum=6 --borders=20 --uri-handler=xdg-open \
2020-02-18 17:24:18 +01:00
--text="<b>$MT_MNGR</b>\n $MT_MNGR_DESC" \
--form --field="$MT_MNGR!preferences-desktop-theme:FBTN" "mb-obthemes" \
> $res9 &
2022-08-25 23:52:38 +02:00
# COLORIZER
2022-08-26 17:10:27 +02:00
yad --plug=$KEY --tabnum=7 --borders=20 \
2022-08-22 16:48:45 +02:00
--text="$COLORIZER_DESC" --image=colorizer \
--form \
2022-08-25 23:52:38 +02:00
--columns=4 \
2022-12-20 22:24:40 +01:00
--field=" Colorizer!colorizer!:FBTN" "ycolorizer" \
2022-08-22 16:48:45 +02:00
--field="$COL_MODULES :LBL" "" \
--field="OpenBox:FBTN" "colorizer-ob -s" \
2022-08-25 23:52:38 +02:00
--field=" :LBL" "" \
--field=" :LBL" "" \
--field=" :LBL" "" \
2022-08-22 16:48:45 +02:00
--field="Conky:FBTN" "colorizer-conky -s" \
2022-08-25 23:52:38 +02:00
--field=" :LBL" "" \
--field=" :LBL" "" \
--field=" :LBL" "" \
2022-08-22 16:48:45 +02:00
--field="Menu/SidePanels:FBTN" "colorizer-menus -s" \
2022-08-25 23:52:38 +02:00
--field=" :LBL" "" \
2022-12-20 22:24:40 +01:00
--field="$COL_MENU:FBTN" "colorizer -s" \
2022-08-25 23:52:38 +02:00
--field=" :LBL" "" \
2022-08-22 16:48:45 +02:00
--field="PyRadio:FBTN" "colorizer-pyradio -s" \
2022-08-25 23:52:38 +02:00
--field=" :LBL" "" \
2022-09-29 22:06:37 +02:00
> $res8 &
2022-08-22 16:48:45 +02:00
2022-08-25 23:52:38 +02:00
# CONKY
2022-08-26 17:10:27 +02:00
yad --plug=$KEY --tabnum=8 --borders=20 \
2022-09-14 23:17:27 +02:00
--text="$CONKY_DESC \n" --image=conky \
2022-08-25 23:52:38 +02:00
--form \
2022-08-26 17:10:27 +02:00
--field=" Colorizer Conky (new)!colorizer!:FBTN" "colorizer-conky -s" \
2022-08-25 23:52:38 +02:00
--field="$CONKY_RESTART:FBTN" "mb-conky-session" \
2022-09-14 23:17:27 +02:00
--field="$ADVANCED :LBL" "" \
--field="$CONKY_CHOOSE:FBTN" "mb-conky-manager" \
2022-08-25 23:52:38 +02:00
--field="$CONKY_EDIT:FBTN" "mb-conkyedit" \
--field="$OPEN_CONKYDIR:FBTN" "exo-open $HOME/.config/conky/" \
> $res10 &
# Picom
2022-08-26 17:10:27 +02:00
yad --plug=$KEY --tabnum=9 --borders=20 \
2022-08-25 23:52:38 +02:00
--text="$COMP_DESC" --image=compton \
--columns=1 --form \
--field="$COMP_EDIT:FBTN" "xdg-open $HOME/.config/picom.conf" \
--field="$COMP_RESTART:FBTN" "mabox-compositor --restart" \
2022-08-26 17:10:27 +02:00
--field="$COMP_TOGGLE:FBTN" "compton_toggle" \
2022-08-25 23:52:38 +02:00
> $res11 &
#--field="$COMP_REMOVE:FBTN" "rm -f $HOME/.config/picom.conf" \
#--field="$COMP_DEFAULT:FBTN" "cp /etc/skel/.config/picom.conf $HOME/.config/" \
# SYSTEM_SPRZET
2022-08-26 17:10:27 +02:00
yad --plug=$KEY --tabnum=10 --borders=0 --text="$SYSTEM_DESC" --columns=2 --align="center" --form --scroll \
2022-08-25 23:52:38 +02:00
--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" "lxinput" \
--field="$HARDWARE:FBTN" "manjaro-settings-manager -m msm_mhwd" \
--field="$MONITORS:LBL" "" \
--field="ARandr:FBTN" "arandr" \
--field="LXRandR:FBTN" "lxrandr" \
--field=" :LBL" "" \
--field="<b>Info</b>:LBL" "" \
2023-06-10 08:45:50 +02:00
--field=" inxi -CGAD!utilities-terminal!:FBTN" "terminator -T 'inxi -CAGD system info' -e 'inxi -CGAD;bash'" \
--field=" neofetch!utilities-terminal!:FBTN" "terminator -e 'neofetch;bash'" \
2022-08-26 17:10:27 +02:00
--field=" btop!utilities-terminal!:FBTN" "terminator -T 'btop' -x $BTOP" \
2022-08-25 23:52:38 +02:00
> $res7 &
# HELP
2022-08-22 16:48:45 +02:00
yad --plug=$KEY --tabnum=11 \
2022-05-03 13:05:27 +02:00
--image=/usr/share/icons/hicolor/128x128/apps/distributor-logo-mabox-trans.png --text-justify=center --uri-handler=xdg-open --text="$HELP_TXT" \
2022-08-25 23:52:38 +02:00
--form --columns="4" \
--field="www:FBTN" "xdg-open https://maboxlinux.org" \
--field="forum:FBTN" "xdg-open https://forum.maboxlinux.org" \
2022-08-26 17:10:27 +02:00
--field="manual:FBTN" "xdg-open https://manual.maboxlinux.org/en/" \
2022-08-25 23:52:38 +02:00
--field="donate:FBTN" "xdg-open https://ko-fi.com/maboxlinux" \
> $res12 &
2021-08-31 16:06:43 +02:00
2020-02-18 17:24:18 +01:00
#main window
2022-08-26 01:27:07 +02:00
yad --window-icon=mcc \
2020-02-18 17:24:18 +01:00
--notebook --tab-pos="left" --key=$KEY \
2022-08-26 17:10:27 +02:00
--tab="$START" \
2022-08-25 23:52:38 +02:00
--tab="$TINT2"\
--tab="$MENU" \
2022-08-26 17:10:27 +02:00
--tab="$AUTOSTART" \
2022-08-25 23:52:38 +02:00
--tab="$LOOK" \
--tab="$THEMES" \
--tab="Colorizer" \
2022-08-26 17:10:27 +02:00
--tab="<i>$CONKY</i>" \
--tab="<i>$COMPOSITOR</i>" \
2021-08-31 16:06:43 +02:00
--tab="$SYSTEM" \
2022-08-25 23:52:38 +02:00
--tab="$HELP"\
2022-08-26 01:27:07 +02:00
--title="$TITLE" --image=/usr/share/icons/hicolor/48x48/apps/mcc.png \
2021-08-31 16:06:43 +02:00
--width="720" --height="420" --image-on-top --text-justify=right --text="$MCC" --no-buttons > $out &
2020-02-18 17:24:18 +01:00
}
maindialog