uri-handler in yad based tools
parent
263118d6e7
commit
e5371747f9
24
bin/mcc
24
bin/mcc
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
# mcc: Mabox Control Center
|
||||
# Copyright (C) 2019-2021 napcok <napcok@gmail.com>
|
||||
# Copyright (C) 2019-2022 napcok <napcok@gmail.com>
|
||||
#
|
||||
EDITOR=geany
|
||||
if hash btop 2>/dev/null; then
|
||||
|
@ -31,11 +31,11 @@ case $LANG in
|
|||
MENU="Menu i Panele"
|
||||
THEMES="Motywy"
|
||||
HELP="Pomoc"
|
||||
HELP_TXT="Visit <a href='https://manual.maboxlinux.org/mabox-doc-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.\nHowever, maintaining the project's infrastructure costs money.\nIf you like Mabox you can help by making a small <a href='https://maboxlinux.org/donate'>donation</a></i> \nThank you for choosing to use Mabox Linux!"
|
||||
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.\nHowever, maintaining the project's infrastructure costs money.\nIf you like Mabox you can help by making a small <a href='https://maboxlinux.org/donate'>donation</a></i> \nThank you for choosing to use Mabox Linux!"
|
||||
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="<a href='https://manual.maboxlinux.org/mabox-doc-en/configuration/autostart/'>Pomoc (online)</a>\nOpenbox używa dwóch mechanizmów autostartu.\nPierwszy z nich to autostart XDG."
|
||||
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."
|
||||
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"
|
||||
|
@ -78,7 +78,7 @@ case $LANG in
|
|||
COMP_REMOVE="Usuń plik konfiguracyjny"
|
||||
COMP_DEFAULT="Przywróć domyślny plik konfiguracyjny"
|
||||
MT_MNGR="Menedżer Motywów Maboxa"
|
||||
MT_MNGR_DESC="\n<a href='https://manual.maboxlinux.org/mabox-doc-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."
|
||||
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."
|
||||
;;
|
||||
es*)
|
||||
TITLE="Centro de control Mabox"
|
||||
|
@ -101,11 +101,11 @@ case $LANG in
|
|||
MENU="Menú y Paneles"
|
||||
THEMES="Temas"
|
||||
HELP="Help"
|
||||
HELP_TXT="Visit <a href='https://manual.maboxlinux.org/mabox-doc-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.\nHowever, maintaining the project's infrastructure costs money.\nIf you like Mabox you can help by making a small <a href='https://maboxlinux.org/donate'>donation</a></i> \nThank you for choosing to use Mabox Linux!"
|
||||
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.\nHowever, maintaining the project's infrastructure costs money.\nIf you like Mabox you can help by making a small <a href='https://maboxlinux.org/donate'>donation</a></i> \nThank you for choosing to use Mabox Linux!"
|
||||
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"
|
||||
AUTOSTART_DESC="<a href='https://manual.maboxlinux.org/mabox-doc-en/configuration/autostart/'>Info (online)</a>\nOpenbox ocupa 2 métodos de reinicio.\nEl primero es reinicio por XDG."
|
||||
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."
|
||||
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"
|
||||
|
@ -148,7 +148,7 @@ case $LANG in
|
|||
COMP_REMOVE="Eliminar archivo picom.conf"
|
||||
COMP_DEFAULT="Reestablecer compositor grafico por defecto"
|
||||
MT_MNGR="Gestor de Temas Mabox"
|
||||
MT_MNGR_DESC="\n<a href='https://manual.maboxlinux.org/mabox-doc-en/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."
|
||||
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."
|
||||
;;
|
||||
*)
|
||||
TITLE="Mabox Control Center"
|
||||
|
@ -175,7 +175,7 @@ case $LANG in
|
|||
SYSTEM_DESC="System and Hardware settings and information"
|
||||
MONITORS="<b>Monitor(s)</b>"
|
||||
SOFTWARE_DESC="Software installation and update - Preferred Applications.\n"
|
||||
AUTOSTART_DESC="<a href='https://manual.maboxlinux.org/mabox-doc-en/configuration/autostart/'>Info (online)</a>\nOpenbox uses two autostart methods.\nFirst is XDG autostart."
|
||||
AUTOSTART_DESC="<a href='https://manual.maboxlinux.org/en/configuration/autostart/'>Info (online)</a>\nOpenbox 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"
|
||||
|
@ -218,7 +218,7 @@ case $LANG in
|
|||
COMP_REMOVE="Remove picom.conf"
|
||||
COMP_DEFAULT="Reset to default"
|
||||
MT_MNGR="Mabox Theme Manager"
|
||||
MT_MNGR_DESC="\n<a href='https://manual.maboxlinux.org/mabox-doc-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."
|
||||
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."
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -276,7 +276,7 @@ yad --plug=$KEY --tabnum=2 --borders=10 --text="$SOFTWARE_DESC" \
|
|||
> $res2 &
|
||||
|
||||
#TAB 3 AUTOSTART
|
||||
yad --plug=$KEY --tabnum=3 --borders=10 \
|
||||
yad --plug=$KEY --tabnum=3 --borders=10 --uri-handler=xdg-open \
|
||||
--text="<b>$AUTOSTART_HEAD</b>" --image=gtk-execute \
|
||||
--columns=1 --form \
|
||||
--field="$AUTOSTART_DESC:LBL" "" \
|
||||
|
@ -354,14 +354,14 @@ yad --plug=$KEY --tabnum=8 --borders=10 \
|
|||
#--field="$COMP_DEFAULT:FBTN" "cp /etc/skel/.config/picom.conf $HOME/.config/" \
|
||||
|
||||
#TAB 9 MOTYWY
|
||||
yad --plug=$KEY --tabnum=9 --borders=10 \
|
||||
yad --plug=$KEY --tabnum=9 --borders=10 --uri-handler=xdg-open \
|
||||
--text="<b>$MT_MNGR</b>\n $MT_MNGR_DESC" \
|
||||
--form --field="$MT_MNGR!preferences-desktop-theme:FBTN" "mb-obthemes" \
|
||||
> $res9 &
|
||||
|
||||
#TAB 10 -HELP
|
||||
yad --plug=$KEY --tabnum=10 \
|
||||
--image=/usr/share/icons/hicolor/128x128/apps/distributor-logo-mabox-trans.png --text-justify=center --text="$HELP_TXT" \
|
||||
--image=/usr/share/icons/hicolor/128x128/apps/distributor-logo-mabox-trans.png --text-justify=center --uri-handler=xdg-open --text="$HELP_TXT" \
|
||||
> $res10 &
|
||||
|
||||
#main window
|
||||
|
|
16
bin/mwelcome
16
bin/mwelcome
|
@ -15,13 +15,23 @@ exo-open --launch WebBrowser https://pl.maboxlinux.org/przewodnik-uzytkownika/
|
|||
}
|
||||
export -f userguide
|
||||
;;
|
||||
*)
|
||||
function homewww() {
|
||||
es*)
|
||||
function homewww() {
|
||||
exo-open --launch WebBrowser https://maboxlinux.org
|
||||
}
|
||||
export -f homewww
|
||||
function userguide() {
|
||||
exo-open --launch WebBrowser https://manual.maboxlinux.org/mabox-doc-en/
|
||||
exo-open --launch WebBrowser https://manual.maboxlinux.org/es/
|
||||
}
|
||||
export -f userguide
|
||||
;;
|
||||
*)
|
||||
function homewww() {
|
||||
exo-open --launch WebBrowser https://maboxlinux.org
|
||||
}
|
||||
export -f homewww
|
||||
function userguide() {
|
||||
exo-open --launch WebBrowser https://manual.maboxlinux.org/en/
|
||||
}
|
||||
export -f userguide
|
||||
;;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
case $LANG in
|
||||
pl*)
|
||||
TITLE="Edytor autostartu XDG"
|
||||
DESC="Wybierz programy/usługi, które mają być uruchamiane autamatycznie\nwraz z sesją OpenBox. <a href='https://manual.maboxlinux.org/mabox-doc-en/configuration/autostart/'>Pomoc (online)</a>"
|
||||
DESC="Wybierz programy/usługi, które mają być uruchamiane autamatycznie\nwraz z sesją OpenBox. <a href='https://manual.maboxlinux.org/en/configuration/autostart/'>Pomoc (online)</a>"
|
||||
ENABLE="wł"
|
||||
FILE="Plik"
|
||||
NAME="Nazwa"
|
||||
|
@ -17,7 +17,7 @@ case $LANG in
|
|||
;;
|
||||
es*)
|
||||
TITLE="XDG Autostart Editor"
|
||||
DESC="Elegir apps o servicios para un reinicio en sesión Openbox.\n<a href='https://manual.maboxlinux.org/mabox-doc-en/configuration/autostart/'>Info (online)</a>"
|
||||
DESC="Elegir apps o servicios para un reinicio en sesión Openbox.\n<a href='https://manual.maboxlinux.org/es/configuration/autostart/'>Info (online)</a>"
|
||||
ENABLE="ejecutar"
|
||||
FILE="Archivo"
|
||||
NAME="Nombrar"
|
||||
|
@ -28,7 +28,7 @@ case $LANG in
|
|||
;;
|
||||
*)
|
||||
TITLE="Mabox XDG Autostart Editor"
|
||||
DESC="Choose apps/services to autostart with OpenBox session.\n<a href='https://manual.maboxlinux.org/mabox-doc-en/configuration/autostart/'>Info (online)</a>"
|
||||
DESC="Choose apps/services to autostart with OpenBox session.\n<a href='https://manual.maboxlinux.org/en/configuration/autostart/'>Info (online)</a>"
|
||||
ENABLE="run"
|
||||
FILE="File"
|
||||
NAME="Name"
|
||||
|
@ -63,7 +63,7 @@ for f in $config_dir/autostart/*.desktop; do
|
|||
#grep -m 1 -e '^[[:blank:]]*Exec' $f | cut -d = -f 2
|
||||
comment=$(grep -m 1 -e '^[[:blank:]]*Comment=' $f | cut -d = -f 2)
|
||||
[ ! -z "$comment" ] && echo "<i>$comment</i>" || echo "$NO_DESC"
|
||||
done | yad --window-icon=distributor-logo-mabox --width=640 --height=500 --title="$TITLE" --image="gtk-execute" \
|
||||
done | yad --window-icon=distributor-logo-mabox --width=640 --height=500 --title="$TITLE" --image="gtk-execute" --uri-handler=xdg-open \
|
||||
--text="$DESC" --list --print-all --bool-fmt="t" \
|
||||
--checklist --column="$ENABLE:CHK" --column="$FILE:HD" --column="$NAME" --column="$COMMENT" --tooltip-column=4 $CANCEL $OK > $results
|
||||
|
||||
|
|
Loading…
Reference in New Issue