cleanup, change look and feel from menu

This commit is contained in:
Daniel Napora 2020-09-07 18:15:03 +02:00
parent e315d35ee3
commit 08e1fd2b36

View File

@ -4,9 +4,11 @@
# Copyright (C) 2019-2020 Daniel Napora <napcok@gmail.com>
. $HOME/.config/mabox/mabox.conf
## TEMPORARY SETTINGS MENU FIX
FILE="$HOME/.config/mabox/settings.csv"
if [ ! -f "$FILE" ]; then
if [ -z "$menu_font_family" ]; then
case $LANG in
pl*)
rsync -a /usr/share/mabox/lang/pl/.config/mabox/settings* $HOME/.config/mabox/
@ -18,9 +20,12 @@ if [ ! -f "$FILE" ]; then
rsync -a /usr/share/mabox/lang/en/.config/mabox/settings* $HOME/.config/mabox/
;;
esac
mb-setvar menu_font_family='Noto Sans Medium'
mb-setvar menu_font_size=9
fi
## END TEMPORARY SETTINGS MENU FIX
. $HOME/.config/mabox/mabox.conf
jgmenu_theme=${jgmenu_theme:-obtheme}
@ -39,10 +44,18 @@ case $jgmenu_theme in
;;
*)
export color_norm_fg="#FFFFFF "
while read -r a b c
do
[[ -n "$a" && "$a" != [[:blank:]#]* ]] && export "$a$b$c"
done < $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc
;;
esac
. $HOME/.config/mabox/jgmenusize.conf
#. $HOME/.config/mabox/jgmenusize.conf
menu_font_size=${menu_font_size:-9}
menu_font_family=${menu_font_family:-Noto Sans Medium}
jgmenu_font="${menu_font_family} ${menu_font_size}"
echo "${menu_font_family} ${menu_font_size}"
gtkbookmarks() {
BOOKMARKS="$HOME/.gtk-bookmarks"
if [[ -s "$BOOKMARKS" ]]; then
@ -127,7 +140,7 @@ color_scroll_ind = ${COLOR_SCROLL_IND:-#504e65 100}
sep_markup = weight="bold" foreground="${color_title_fg% *}"
sep_height = ${sep_height:-5}
font = ${jgmenu_font:-Noto Sans Medium 9}
icon_size = ${jgmenu_icon_size:-0}
icon_size = ${jgmenu_icon_size:-16}
icon_theme = ${jgmenu_icon_theme:-Numix-Square}
EOF
@ -209,12 +222,6 @@ case $LANG in
COMPOSER="Kompozytor"
MABOX_THEMES="Predefiniowane konfiguracje pulpitu"
THEME_MNGR="Menadżer schematów"
SIZE="Rozmiar Menu i Paneli"
TINY="malutki"
SMALL="mały"
NORMAL="normalny"
BIG="duży"
HUGE="wielki"
UGUIDE_TITLE="Przewodnik Użytkownika Mabox"
UGUIDE=". /usr/share/mb-jgtools/userguide_PL.csv"
;;
@ -258,12 +265,6 @@ case $LANG in
COMPOSER="Compositor gráfico"
MABOX_THEMES="Temas Mabox"
THEME_MNGR="Gestor de Temas"
SIZE="Tamaño de Menu/Panel lateral"
TINY="Diminuto"
SMALL="Pequeño"
NORMAL="Normal"
BIG="Grande"
HUGE="Muy Grande"
UGUIDE_TITLE="Mabox User Guide"
UGUIDE=". /usr/share/mb-jgtools/userguide.csv"
;;
@ -307,12 +308,6 @@ case $LANG in
COMPOSER="Composer"
MABOX_THEMES="Mabox Themes"
THEME_MNGR="Theme Manager"
SIZE="Menu/Sidepanels Size"
TINY="tiny"
SMALL="small"
NORMAL="normal"
BIG="big"
HUGE="huge"
UGUIDE_TITLE="Mabox User Guide"
UGUIDE=". /usr/share/mb-jgtools/userguide.csv"
;;
@ -337,7 +332,6 @@ $MCC,mcc,distributor-logo-mabox
^sep()
$SYS_AND_HARDWARE,^root(system),audiocard
$LOOK_AND_FEEL,^root(wyglad),preferences-color
$SIZE,^checkout(menusize),applications-development
^sep($SOFT_MANAGEMENT)
$PAMAC_UPDATE,pamac-manager --updates,system-upgrade
@ -358,13 +352,7 @@ $SCREENSHOT,mb-jgtools screenshot,emblem-photos
. $HOME/.config/mabox/right-append.csv
. $HOME/.config/mabox/exit.csv
^tag(menusize)
^sep($SIZE)
<small><small>$TINY</small></small>,cat /usr/share/mb-jgtools/tiny > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
<small>$SMALL</small>,cat /usr/share/mb-jgtools/small > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
$NORMAL,cat /usr/share/mb-jgtools/normal > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
<big>$BIG</big>,cat /usr/share/mb-jgtools/big > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
<big><big>$HUGE</big></big>,cat /usr/share/mb-jgtools/huge > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
^tag(system)
^sep($SETTINGS)
@ -393,20 +381,6 @@ $GEOIP <small>pacman-mirrors -i --geoip</small>,^term(sudo pacman-mirrors -i --g
^tag(wyglad)
. ~/.config/mabox/settings.csv
#^sep($LOOK_AND_FEEL)
#$LXAPPEARANCE,lxappearance,preferences-desktop-theme
#$NITROGEN,nitrogen,nitrogen
#$OBCONF,obconf,obconf
#$NOTIFYD,xfce4-notifyd-config,xfce4-notifyd
#$PREFERRED_APPS,exo-preferred-applications,preferences-desktop-default-applications
#$LIGHTDM,lightdm-gtk-greeter-settings-pkexec,lightdm-gtk-greeter-settings
#$POWER_MNGR,xfce4-power-manager-settings,xfce4-power-manager-settings
#^sep($MABOX_DESK_ELEM)
#Conky,^pipe(jgmenu_run ob --cmd=mabox-conky-pipemenu),desktop-effects
#$TINT2,^pipe(jgmenu_run ob --cmd=mabox-tint2-pipemenu),tint2conf
#$COMPOSER,^pipe(jgmenu_run ob --cmd='mabox-compositor' --tag='Kompo'),compton
#^sep($MABOX_THEMES)
#$THEME_MNGR,mb-obthemes,preferences-desktop-theme
^sep()
⮜ $BACK,^back()
. ~/.config/mabox/settings_tags.csv
@ -500,10 +474,7 @@ cat <<EOF > ${MENU_ITEMS}
$ROOTDIR,^pipe(jgbrowser /)
$HOME_DIR,^pipe(jgbrowser)
#$(basename $(xdg-user-dir DESKTOP)),^pipe(jgbrowser $(xdg-user-dir DESKTOP))
$(basename $(xdg-user-dir DOWNLOAD)),^pipe(jgbrowser $(xdg-user-dir DOWNLOAD))
#$(basename $(xdg-user-dir TEMPLATES)),^pipe(jgbrowser $(xdg-user-dir TEMPLATES))
#(basename $(xdg-user-dir PUBLICSHARE)),^pipe(jgbrowser $(xdg-user-dir PUBLICSHARE))
$(basename $(xdg-user-dir DOCUMENTS)),^pipe(jgbrowser $(xdg-user-dir DOCUMENTS))
$(basename $(xdg-user-dir MUSIC)),^pipe(jgbrowser $(xdg-user-dir MUSIC))
$(basename $(xdg-user-dir PICTURES)),^pipe(jgbrowser $(xdg-user-dir PICTURES))
@ -548,7 +519,7 @@ MENU_PADDING_TOP=221
TABS="250"
jgmenu_item_height=30
jgmenu_icon_size=26
jgmenu_font="Noto Sans Medium 11"
#jgmenu_font="Noto Sans Medium 11"
MENU_RADIUS=${RADIUS:-0}
mkconfigfile
@ -622,7 +593,7 @@ MENU_VALIGN="center"
TABS="280"
jgmenu_item_height=28
jgmenu_icon_size=0
jgmenu_font='Noto Sans Medium 10'
#jgmenu_font='Noto Sans Medium 10'
MENU_RADIUS=${RADIUS:-0}
[ -d $(xdg-user-dir PICTURES)/screenshots ] || mkdir -p $(xdg-user-dir PICTURES)/screenshots
@ -682,152 +653,12 @@ MENU_PADDING_TOP=0
MENU_PADDING_RIGHT=0
MENU_PADDING_BOTTOM=0
MENU_PADDING_LEFT=0
TABS="90"
[ $jgmenu_use_icons == false ] && jgmenu_icon_size=0
#jgmenu_icon_size=20
case $LANG in
pl*)
TYPE_TO_SEARCH="pisz, aby wyszukać"
SOFT_MANAGEMENT="Zarządzanie oprogramowaniem"
PAMAC_UPDATE="Aktualizacja systemu (Pamac)"
CLI_UPDATE="Aktualizacja systemu (cli)"
PAMAC="Menadżer pakietów - Pamac"
RENEW_KEYS="Odnawianie kluczy"
MIRROR_RANK="Ranking mirrorów"
SETTINGS="Ustawienia"
MCC="Centrum Sterowania Mabox"
SYS_AND_HARDWARE="System i sprzęt"
LOOK_AND_FEEL="Wygląd i zachowanie"
HELP="Pomoc"
SHORTCUTS="Skróty klawiszowe"
ONLINE_RES="Zasoby online"
OTHER="Inne"
SCREENSHOT="Zrzut ekranu"
BACK="wróć"
FAST="Szybko"
ALL="Wszystkie"
GEOIP="Najbliższe"
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"
LXAPPEARANCE="Wystrój i ikony"
NITROGEN="Wybór tapety"
OBCONF="Menadżer konfiguracji OpenBox"
NOTIFYD="Konfiguracja powiadomień"
PREFERRED_APPS="Preferowane aplikacje"
LIGHTDM="Ustawienia Menedżera logowania"
POWER_MNGR="Ustawienia zasilania"
MABOX_DESK_ELEM="Elementy pulpitu Mabox"
TINT2="Panele Tint2"
COMPOSER="Kompozytor"
MABOX_THEMES="Predefiniowane konfiguracje pulpitu"
THEME_MNGR="Menadżer schematów"
SIZE="Rozmiar Menu i SidePaneli"
TINY="malutki"
SMALL="mały"
NORMAL="normalny"
BIG="duży"
HUGE="wielki"
;;
es*)
TYPE_TO_SEARCH="Buscar"
SOFT_MANAGEMENT="Agregar/Quitar Software"
PAMAC_UPDATE="Actualizar el sistema(Tienda)"
CLI_UPDATE="Actualizar en la terminal (cli)"
PAMAC="Tienda de software"
RENEW_KEYS="Actualizar atajos de teclado"
MIRROR_RANK="Actualizar repositorios"
SETTINGS="Ajustes"
MCC="Centro de Control Mabox"
SYS_AND_HARDWARE="Sistema y Hardware"
LOOK_AND_FEEL="Apariencia"
HELP="Ayuda"
SHORTCUTS="Atajos del teclado"
ONLINE_RES="Recursos en línea"
OTHER="Otros"
SCREENSHOT="Captura Pantalla"
BACK="atrás"
FAST="Repositorios rápidos"
ALL="Todos los repositorios"
GEOIP="Repositorios locales"
LOCALE_SETTINGS="Ajustes de idioma"
LANGUAGE_PACKAGES="Paquetes de idioma"
KERNEL="Núcleo"
USER_ACCOUNTS="Cuentas de usuario"
TIME_DATE="Hora y Fecha"
KEYBOARD="Ajustes del teclado"
HARDWARE="Configuración Hardware"
LXAPPEARANCE="Temas e íconos"
NITROGEN="Fondos de pantalla"
OBCONF="Configuración de Openbox"
NOTIFYD="Notificaciones"
PREFERRED_APPS="Aplicaciones Preferidas"
LIGHTDM="Gestor de Inicio de sesión"
POWER_MNGR="Ajustes de energía"
MABOX_DESK_ELEM="Escritorio Mabox"
TINT2="Paneles Tint2"
COMPOSER="Compositor gráfico"
MABOX_THEMES="Temas Mabox"
THEME_MNGR="Gestor de Temas"
SIZE="Tamaño de Menu/Panel lateral"
TINY="Diminuto"
SMALL="Pequeño"
NORMAL="Normal"
BIG="Grande"
HUGE="Muy Grande"
;;
*)
TYPE_TO_SEARCH="type to search"
SOFT_MANAGEMENT="Software management"
PAMAC_UPDATE="System update (Pamac)"
CLI_UPDATE="System update (cli)"
PAMAC="Pamac"
RENEW_KEYS="Renew keys"
MIRROR_RANK="Mirror ranking"
SETTINGS="Settings"
MCC="Mabox Control Center"
SYS_AND_HARDWARE="System and Hardware"
LOOK_AND_FEEL="Look and Feel"
HELP="Help"
SHORTCUTS="Keyboard Shortcuts"
ONLINE_RES="Online Resources"
OTHER="Other"
SCREENSHOT="Screenshot Tool"
BACK="back"
FAST="Fasttrack"
ALL="All"
GEOIP="Geoip"
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"
LXAPPEARANCE="Themes and icons"
NITROGEN="Wallpaper"
OBCONF="Openbox Configuration Manager"
NOTIFYD="Notifycations"
PREFERRED_APPS="Preffered Applications"
LIGHTDM="Login Manager Settings"
POWER_MNGR="Power Manager"
MABOX_DESK_ELEM="Mabox Desktop"
TINT2="Tint2 Panel(s)"
COMPOSER="Composer"
MABOX_THEMES="Mabox Themes"
THEME_MNGR="Theme Manager"
SIZE="Menu/Sidepanels Size"
TINY="tiny"
SMALL="small"
NORMAL="normal"
BIG="big"
HUGE="huge"
;;
esac
mkconfigfile
@ -836,28 +667,6 @@ cat <<EOF > ${MENU_ITEMS}
. ~/.config/mabox/settings.csv
. ~/.config/mabox/settings_tags.csv
#^sep( $SETTINGS )
#^sep($LOOK_AND_FEEL)
#$LXAPPEARANCE,lxappearance,preferences-desktop-theme
#$NITROGEN,nitrogen,nitrogen
#$OBCONF,obconf,obconf
#$NOTIFYD,xfce4-notifyd-config,xfce4-notifyd
#$PREFERRED_APPS,exo-preferred-applications,preferences-desktop-default-applications
#$LIGHTDM,lightdm-gtk-greeter-settings-pkexec,lightdm-gtk-greeter-settings
#$POWER_MNGR,xfce4-power-manager-settings,xfce4-power-manager-settings
#^sep($MABOX_DESK_ELEM)
#$SIZE,^checkout(menusize),applications-development
#Conky,^pipe(jgmenu_run ob --cmd=mabox-conky-pipemenu),desktop-effects
#$TINT2,^pipe(jgmenu_run ob --cmd=mabox-tint2-pipemenu),tint2conf
#$COMPOSER,^pipe(jgmenu_run ob --cmd=mabox-compositor),compton
#^tag(menusize)
#^sep($SIZE)
#<small><small>$TINY</small></small>,cat /usr/share/mb-jgtools/tiny > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
#<small>$SMALL</small>,cat /usr/share/mb-jgtools/small > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
#$NORMAL,cat /usr/share/mb-jgtools/normal > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
#<big>$BIG</big>,cat /usr/share/mb-jgtools/big > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
#<big><big>$HUGE</big></big>,cat /usr/share/mb-jgtools/huge > ~/.config/mabox/jgmenusize.conf && mb-jgtools right
EOF
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
}