mabox-pipemenus/usr/bin/jgmenusettings-pipe
2023-09-05 19:04:12 +02:00

522 lines
21 KiB
Bash
Executable File

#!/bin/bash
. $HOME/.config/mabox/mabox.conf
case $LANG in
pl*)
TITLE="Ustawienia Menu i Paneli"
MENU_ITEMS="Konfiguruj Elementy Menu"
OWN_COMMANDS="własne komendy"
FAVORITES="Ulubione (u góry)"
BELOW_APPS="(pod Aplikacjami)"
MAINMENU="Menu główne"
SEARCH_FIELD="Pole wyszukiwania"
APPS="Programy"
APPS_POS="Pokaż programy w..."
APPS_MAIN="w menu głównym"
APPS_SUB="w podmenu"
LEFTPANEL="Lewy panel"
RIGHTPANEL="Prawy panel"
EXITMENU="Dialog wylogowania"
JGBROWSER="Przeglądarka plików/katalogów"
SHOW_HIDDEN="Wyświetlanie ukrytych plików"
EDIT="Edytuj"
FULLHEIGHT="Pełna wysokość"
TOP="Góra"
CENTER="Na środku"
BOTTOM="Dół"
MODULES="Moduły"
RESET="Przywróć domyślne ustawienia"
QUICK_NAV="Szybka nawigacja"
BOOKMARKS="Zakładki GTK"
VBOXES="Maszyny Wirtualne"
PIPEMENUS="Dynamiczne <i>(pipe)</i> menu"
DESKMNGR="Desktop Session Manager"
DESKTOPS="Pulpity i okna"
DESKGRID="DeskGrid"
POPINSTALL="Instaluj popularne programy"
SYSINFO="Informacje o systemie"
SHORTCUTS="Skróty klawiszowe"
MENUPANELS="Ustawienia Menu/Paneli bocznych"
WALLCHANGER="Tapeta"
LOCKSCREEN="Blokada ekranu"
TINT2="Ustawienia panelu Tint2"
CONKY="Ustawienia Conky"
SSH_CONN="Połączenia SSH"
LOOKANDFEEL="Wygląd"
BORDER="Obramowanie"
PADDING="Margines wewnętrzny"
RADIUS="Zaokrąglone rogi"
SUBSPACING="Odstęp submenu"
SIDEPANELS_HPOS="Panele boczne pozycja/wysokość"
TOPMARGIN="Margines Paneli Góra/Dół"
ICONS="Ikony"
CIRCLE="Okrągłe ikony (Numix)"
SQUARE="Kwadratowe ikony (Numix)"
SHOW_ICONS="Pokaż ikony"
HIDE_ICONS="Ukryj ikony"
INSTALL="Instaluj"
SIZE="Rozmiar i czcionka"
FONT_FAMILY="Czcionka"
FONT_SIZE="Rozmiar czcionki"
ITEM_FONT="Element"
TITLE_FONT="Tytuł/Separator"
INCREASE="Powiększ"
DECREASE="Pomniejsz"
LINEHEIGHT="Wysokość elementu menu"
FONT_CUSTOM="Wybierz czcionkę i rozmiar..."
COLOR_SCHEME="Motyw kolorystyczny"
GRADIENT="Kierunek Gradientu"
EDIT_CURRENT="Edytuj aktywny"
FOLLOW_OB="Zgodny z motywem OpenBox"
CHOOSE="Wybierz..."
RANDTHEME="Losowy"
REMOVE="Usuń to menu z panelu"
;;
es*)
TITLE="Menu/Panel lateral"
MENU_ITEMS="Menu Items"
OWN_COMMANDS="Custom Commands"
FAVORITES="Favoritos"
BELOW_APPS="(Below Apps)"
MAINMENU="Main Menu"
SEARCH_FIELD="Show Search Field"
APPS="Applicationes"
APPS_POS="Show Applications in..."
APPS_MAIN="Main (root) menu"
APPS_SUB="Submenu"
LEFTPANEL="Left panel"
RIGHTPANEL="Right panel"
EXITMENU="Logout Dialog"
JGBROWSER="File/Directory Browser"
SHOW_HIDDEN="Show hidden files"
EDIT="Editar"
FULLHEIGHT="Full Height"
TOP="TOP"
CENTER="Center"
BOTTOM="BOTTOM"
MODULES="Modules"
RESET="Reset to default"
QUICK_NAV="Navegación rápida"
BOOKMARKS="GTK Marcadores"
VBOXES="Virtual Machines"
PIPEMENUS="Menu con extras"
DESKMNGR="Desktop Session Manager"
DESKTOPS="Desktops and Windows"
DESKGRID="Desktop Grid"
POPINSTALL="Instalar Programas populares"
SYSINFO="System information"
SHORTCUTS="Atajos del teclado"
MENUPANELS="Menu/Paneles laterales"
WALLCHANGER="Wallpaper"
LOCKSCREEN="ScreenLocker"
TINT2="Tint2 panel settings"
CONKY="Conky settings"
SSH_CONN="SSH Connections"
LOOKANDFEEL="Apariencia"
BORDER="Menu Border"
PADDING="Padding"
RADIUS="Rounded Corners"
SIDEPANELS_HPOS="Panels Height/Position"
TOPMARGIN="Panels Top/Bottom Margin"
SUBSPACING="Submenu Spacing"
ICONS="Iconos"
CIRCLE="Circilo iconos (Numix)"
SQUARE="Cuadrado iconos (Numix)"
SHOW_ICONS="Mostrar iconos"
HIDE_ICONS="Ocultar iconos"
INSTALL="Instalar"
SIZE="Tamaño de Menu/Panel lateral"
FONT_FAMILY="Familia tipográfica"
FONT_SIZE="Tamaño de fuente"
ITEM_FONT="Fuente"
TITLE_FONT="Titulo/Separador de Fuente"
INCREASE="Aumentar"
DECREASE="Disminuir"
LINEHEIGHT="Altura"
FONT_CUSTOM="Seleccionar su fuente y tamaño..."
COLOR_SCHEME="Esquema de colores"
GRADIENT="Gradient"
EDIT_CURRENT="Editar el actual"
FOLLOW_OB="Similiar al de Openbox"
CHOOSE="Elegir..."
RANDTHEME="Random"
REMOVE="Eliminar este menú del panel"
;;
*)
TITLE="Menu/Panels settings"
MENU_ITEMS="Configure Menu Items"
OWN_COMMANDS="Custom Commands"
FAVORITES="Favorites (on top)"
BELOW_APPS="(below Apps)"
MAINMENU="Main Menu"
SEARCH_FIELD="Show Search Field"
APPS="Applications"
APPS_POS="Show Applications in..."
APPS_MAIN="Main (root) menu"
APPS_SUB="Submenu"
LEFTPANEL="Left Panel "
RIGHTPANEL="Right Panel"
EXITMENU="Logout Dialog"
JGBROWSER="File/Directory Browser"
SHOW_HIDDEN="Show hidden files"
EDIT="Edit"
FULLHEIGHT="Full Height"
TOP="Top"
CENTER="Center"
BOTTOM="Bottom"
MODULES="Modules"
RESET="Reset to default"
QUICK_NAV="Quick Navigation"
BOOKMARKS="GTK Bookmarks"
VBOXES="Virtual Machines"
PIPEMENUS="Pipe (dynamic) menus"
DESKMNGR="Desktop Session Manager"
DESKTOPS="Desktops and Windows"
DESKGRID="Desktop Grid"
POPINSTALL="Install popular apps"
SYSINFO="System information"
SHORTCUTS="Keyboard shortcuts"
MENUPANELS="Menu/Sidepanels settings"
WALLCHANGER="Wallpaper"
LOCKSCREEN="ScreenLocker"
TINT2="Tint2 panel settings"
CONKY="Conky settings"
SSH_CONN="SSH Connections"
LOOKANDFEEL="Look and Feel"
BORDER="Menu Border"
PADDING="Padding"
RADIUS="Rounded Corners"
SUBSPACING="Submenu Spacing"
SIDEPANELS_HPOS="Panels Height/Position"
TOPMARGIN="Panels Top/Bottom Margin"
ICONS="Icons"
CIRCLE="Circle icons (Numix)"
SQUARE="Square icons (Numix)"
SHOW_ICONS="Show icons"
HIDE_ICONS="Hide icons"
INSTALL="Install"
SIZE="Font"
FONT_FAMILY="Font Family"
FONT_SIZE="Font Size"
ITEM_FONT="Item Font"
TITLE_FONT="Title/Separator Font"
INCREASE="Increase"
DECREASE="Decrease"
LINEHEIGHT="Item height"
FONT_CUSTOM="Select custom font and size..."
COLOR_SCHEME="Color Scheme"
GRADIENT="Gradient direction"
EDIT_CURRENT="Edit current"
FOLLOW_OB="Same as OpenBox theme"
CHOOSE="Choose..."
RANDTHEME="Random"
REMOVE="Remove this menu from panel"
;;
esac
#me="mb-jgtools $jgtools_last"
if [[ $1 == "-r" ]];then
me="${0##*/} -s"
else
me="${0##*/} ${1:--s}"
fi
L="mb-jgtools places"
R="mb-jgtools right"
out+=("^sep($MENU_ITEMS)")
out+=("$MAINMENU,^checkout(mainmenu_edit)")
out+=("$LEFTPANEL,^checkout(left_edit)")
out+=("$RIGHTPANEL,^checkout(right_edit)")
out+=("$EXITMENU,^checkout(exit_edit)")
#out+=("^sep($JGBROWSER)")
#[[ $jgbrowser_show_hidden = false ]] && out+=("<i><s>$SHOW_HIDDEN</s></i>,mb-setvar jgbrowser_show_hidden=true;$me") || out+=("$SHOW_HIDDEN,mb-setvar jgbrowser_show_hidden=false;$me")
out2+=("^tag(mainmenu_edit)")
out2+=("^sep($MAINMENU)")
if [[ $search_field = "false" ]];then
out2+=("<big>󰄱</big> $SEARCH_FIELD,mb-setvar search_field=true;mb-jgtools main ipc")
else
out2+=("<big>󰄲</big> $SEARCH_FIELD,mb-setvar search_field=false;mb-jgtools main ipc")
fi
out2+=("$EDIT $FAVORITES, xdg-open $HOME/.config/mabox/favorites.csv, geany")
out2+=("$EDIT $BELOW_APPS, xdg-open $HOME/.config/mabox/mainmenu_below_apps.csv, geany")
out2+=("^sep($APPS_POS)")
[[ $apps_in_submenu == "true" ]] && out2+=("$APPS_MAIN,mb-setvar apps_in_submenu=false;mb-jgtools main ipc" "󰐾 $APPS_SUB,") || out2+=("󰐾 $APPS_MAIN," "$APPS_SUB,mb-setvar apps_in_submenu=true;mb-jgtools main ipc")
out2+=("^sep(Reset)")
out2+=("$RESET,mb-reset mainmenu")
out2+=("^tag(left_edit)")
out2+=("^sep($LEFTPANEL)")
out2+=("$EDIT $OWN_COMMANDS ($TOP), xdg-open $HOME/.config/mabox/places-prepend.csv, geany")
#out2+=("^sep()")
out2+=("^sep($MODULES)")
[[ $places_quicknav == false ]] && out2+=("<i><s>$QUICK_NAV</s></i>,mb-setvar places_quicknav=true;$L") || out2+=("$QUICK_NAV,mb-setvar places_quicknav=false;$L")
[[ $places_bookmarks == false ]] && out2+=("<i><s>$BOOKMARKS</s></i>,mb-setvar places_bookmarks=true;$L") || out2+=("$BOOKMARKS,mb-setvar places_bookmarks=false;$L")
if [[ -x "$(command -v VBoxManage)" ]]; then
[[ $places_vboxes == false ]] && out2+=("<i><s>$VBOXES</s></i>,mb-setvar places_vboxes=true;$L") || out2+=("$VBOXES,mb-setvar places_vboxes=false;$L")
fi
out2+=("^sep($PIPEMENUS)")
[[ $places_menusettingspipe = false ]] && out2+=("<i><s>$MENUPANELS</s></i>,mb-setvar places_menusettingspipe=true;$L") || out2+=("$MENUPANELS,mb-setvar places_menusettingspipe=false;$L")
[[ $places_jgwallpaperchanger = false ]] && out2+=("<i><s>$WALLCHANGER</s></i>,mb-setvar places_jgwallpaperchanger=true;$L") || out2+=("$WALLCHANGER,mb-setvar places_jgwallpaperchanger=false;$L")
[[ $places_jglockscreen = false ]] && out2+=("<i><s>$LOCKSCREEN</s></i>,mb-setvar places_jglockscreen=true;$L") || out2+=("$LOCKSCREEN,mb-setvar places_jglockscreen=false;$L")
[[ $places_jgdesktops = false ]] && out2+=("<i><s>$DESKTOPS</s></i>,mb-setvar places_jgdesktops=true;$L") || out2+=("$DESKTOPS,mb-setvar places_jgdesktops=false;$L")
[[ $places_jgdeskmngr = false ]] && out2+=("<i><s>$DESKMNGR</s></i>,mb-setvar places_jgdeskmngr=true;$L") || out2+=("$DESKMNGR,mb-setvar places_jgdeskmngr=false;$L")
[[ $places_jgdeskgrid = false ]] && out2+=("<i><s>$DESKGRID</s></i>,mb-setvar places_jgdeskgrid=true;$L") || out2+=("$DESKGRID,mb-setvar places_jgdeskgrid=false;$L")
[[ $places_sysinfopipe = false ]] && out2+=("<i><s>$SYSINFO</s></i>,mb-setvar places_sysinfopipe=true;$L") || out2+=("$SYSINFO,mb-setvar places_sysinfopipe=false;$L")
#[[ $places_keyspipe = false ]] && out2+=("<i><s>$SHORTCUTS</s></i>,mb-setvar places_keyspipe=true;$L") || out2+=("$SHORTCUTS,mb-setvar places_keyspipe=false;$L")
[[ $places_sshpipe = false ]] && out2+=("<i><s>$SSH_CONN</s></i>,mb-setvar places_sshpipe=true;$L") || out2+=("$SSH_CONN,mb-setvar places_sshpipe=false;$L")
[[ $places_softwarepipe = false ]] && out2+=("<i><s>$POPINSTALL</s></i>,mb-setvar places_softwarepipe=true;$L") || out2+=("$POPINSTALL,mb-setvar places_softwarepipe=false;$L")
[[ $places_tint2pipe = false ]] && out2+=("<i><s>$TINT2</s></i>,mb-setvar places_tint2pipe=true;$L") || out2+=("$TINT2,mb-setvar places_tint2pipe=false;$L")
[[ $places_conkypipe = false ]] && out2+=("<i><s>$CONKY</s></i>,mb-setvar places_conkypipe=true;$L") || out2+=("$CONKY,mb-setvar places_conkypipe=false;$L")
out2+=("^sep()")
out2+=("$EDIT $OWN_COMMANDS ($BOTTOM), xdg-open $HOME/.config/mabox/places-append.csv, geany")
out2+=("^sep(Reset)")
out2+=("$RESET,mb-reset leftpanel")
out2+=("^tag(right_edit)")
out2+=("^sep($RIGHTPANEL)")
out2+=("$EDIT $OWN_COMMANDS ($TOP), xdg-open $HOME/.config/mabox/right-prepend.csv, geany")
out2+=("$EDIT $OWN_COMMANDS ($BOTTOM), xdg-open $HOME/.config/mabox/right-append.csv, geany")
out2+=("^sep(Reset)")
out2+=("$RESET,mb-reset rightpanel")
out2+=("^tag(exit_edit)")
out2+=("^sep($EXITMENU)")
out2+=("$EDIT $EXITMENU, xdg-open $HOME/.config/mabox/exit.csv, geany")
out2+=("^sep(Reset)")
out2+=("$RESET,mb-reset logout")
##
out+=("^sep($LOOKANDFEEL)")
out+=("$SIDEPANELS_HPOS [ <b>${panels_heightpos:-center}</b> ],^checkout(sidepanelpos)")
out2+=("^tag(topmargin)")
for i in 0 20 30 40 50 60 80 100 120 160 200; do out2+=("$(printf "<tt>%4s</tt>,%s" "$i" "mb-setvar panels_topmargin=${i};$me")");done
#for i in 0 20 30 40 50 60 80 100; do out2+=("${i},mb-setvar panels_topmargin=${i};$me");done
out2+=("^tag(sidepanelpos)")
out2+=("^sep($SIDEPANELS_HPOS)")
out2+=("$FULLHEIGHT,mb-setvar panels_heightpos=full;$me")
out2+=("^sep()")
out2+=("$TOP,mb-setvar panels_heightpos=top;$me")
out2+=("$CENTER,mb-setvar panels_heightpos=center;$me")
out2+=("$BOTTOM,mb-setvar panels_heightpos=bottom;$me")
out2+=("^sep()")
out2+=("$TOPMARGIN [ <b>${panels_topmargin:-0}</b> ],^checkout(topmargin)")
# FONTS
out+=("^sep(<i>$SIZE</i>)")
out+=("<big>󰛖</big> $ITEM_FONT [ <b>$menu_font_family $menu_font_size</b> ],^checkout(itemfont)")
out+=("<big>󰛖</big> $TITLE_FONT [ <b>$menu_sep_font_family $menu_sep_font_size</b> ],^checkout(titlefont)")
#out+=("$FONT_FAMILY [ <b>${menu_font_family:-0}</b> ],^checkout(fonty)")
#out+=("$FONT_SIZE [ <b>${menu_font_size:-0}</b> ],^checkout(fontsize)")
out+=("$LINEHEIGHT [ <b>$item_height_factor%</b> ],^checkout(lineheight)")
case $menu_font_family in
"Noto Sans Light") nol="";;
"Noto Sans Medium") nom="";;
Deja*) de="";;
Robo*) ro="";;
Inco*) in="";;
Ubunt*) ub="";;
*);;
esac
out2+=("^tag(itemfont)")
out2+=("^sep($ITEM_FONT)")
out2+=("<big>󰛖</big> $FONT_CUSTOM,mb-setfont menu_item;$me")
out2+=("^sep()")
if [ -f "$HOME/.config/mabox/fonts.list" ];then
mapfile -t favfonts < <( grep -vE "^($|#)" ~/.config/mabox/fonts.list)
else
mapfile -t favfonts < <( grep -vE "^($|#)" /usr/share/mabox-colorizer/fonts.list)
cp /usr/share/mabox-colorizer/fonts.list ~/.config/mabox/
fi
if [ "${#favfonts[@]}" -gt 0 ];then
out2+=("^sep($FONT_FAMILY)")
for fon in "${favfonts[@]}";do
[[ "$menu_font_family" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,mb-setvar \"menu_font_family='${fon}'\";$me")
done
fi
out2+=("^sep()")
out2+=("<small> Edit favorited fonts list</small>,geany ~/.config/mabox/fonts.list")
out2+=("^sep($FONT_SIZE)")
out2+=("<big>󰧴</big> $INCREASE <b>$((menu_font_size+1)) px</b>,mb-setvar menu_font_size=$((menu_font_size+1));$me")
out2+=("<big>󰧳</big> $DECREASE <b>$((menu_font_size-1)) px</b>,mb-setvar menu_font_size=$((menu_font_size-1));$me")
out2+=("^sep()")
sizes=(14 13 12 11 10 9 8)
for i in "${sizes[@]}"
do
[[ "$menu_font_size" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,$me") || out2+=("<big>祿</big> $i px,mb-setvar menu_font_size=$i;$me")
done
out2+=("^tag(titlefont)")
out2+=("^sep($TITLE_FONT)")
out2+=("<big>󰛖</big> $FONT_CUSTOM,mb-setfont menu_sep;$me")
out2+=("^sep()")
if [ "${#favfonts[@]}" -gt 0 ];then
out2+=("^sep($FONT_FAMILY)")
for fon in "${favfonts[@]}";do
[[ "$menu_sep_font_family" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,mb-setvar \"menu_sep_font_family='${fon}'\";$me")
done
fi
out2+=("^sep()")
out2+=("<small> Edit favorited fonts list</small>,geany ~/.config/mabox/fonts.list")
out2+=("^sep($FONT_SIZE)")
out2+=("<big>󰧴</big> $INCREASE <b>$((menu_sep_font_size+1)) px</b>,mb-setvar menu_sep_font_size=$((menu_sep_font_size+1));$me")
out2+=("<big>󰧳</big> $DECREASE <b>$((menu_sep_font_size-1)) px</b>,mb-setvar menu_sep_font_size=$((menu_sep_font_size-1));$me")
out2+=("^sep()")
sizes=(14 13 12 11 10 9 8)
for i in "${sizes[@]}"
do
[[ "$menu_sep_font_size" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,$me") || out2+=("<big>祿</big> $i px,mb-setvar menu_sep_font_size=$i;$me")
done
out2+=("^tag(lineheight)")
for i in 160 180 200 240 280 300 400; do out2+=("$(printf "<tt>%4s%%</tt>,%s" "$i" "mb-setvar item_height_factor=${i};$me")");done
########## THEMES
out+=("^sep(<i>$COLOR_SCHEME</i>)")
ob_file=$HOME/.config/openbox/rc.xml
[[ -f $ob_file ]] && wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file")
if [ $jgmenu_theme != obtheme ]; then #INNY NIŻ OB THEME
. $HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc > /dev/null 2>&1 &
out+=("$CHOOSE [<b>$jgmenu_theme</b>],^checkout(motywy)")
out+=("$EDIT_CURRENT: (<b>$jgmenu_theme</b>),xdg-open $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc,geany")
out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me")
out+=("<s>$FOLLOW_OB</s>,mb-setvar jgmenu_theme=obtheme;$me
^sep()")
out+=("$GRADIENT [ <b>${menu_gradient_pos:-none}</b> ],^checkout(gradient)")
out2+=("^tag(gradient)")
for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "<tt>%14s</tt>,%s" "$i" "mb-setvar menu_gradient_pos=${i};$me")");done
out2+=("^tag(motywy)")
else
. $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc > /dev/null 2>&1 &
out+=("#${menu_gradient_pos}\n")
out+=("$CHOOSE [<b>${wm_theme// /_}</b>],^checkout(motywy)")
out+=("$EDIT_CURRENT: (<b>${wm_theme// /_}</b>),xdg-open $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc,geany")
out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me")
out+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;$me
^sep()")
out+=("$GRADIENT [ <b>${menu_gradient_pos:-none}</b> ],^checkout(gradient)")
out2+=("^tag(gradient)")
for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "<tt>%14s</tt>,%s" "$i" "mb-setvar menu_gradient_pos=${i} $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc;$me")");done
out2+=("^tag(motywy)")
fi
for item in "$HOME"/.config/mabox/jgobthemes/*colorrc; do
theme="${item##*/}"
out2+=("${theme%.*},mb-setvar jgmenu_theme=${theme%.*};$me")
done
########## ICONS
out+=("^sep(<i>$ICONS</i>)")
if [ $jgmenu_use_icons == true ]; then
out+=("$HIDE_ICONS [ <b>${jgmenu_icon_theme}</b> ],mb-setvar jgmenu_use_icons=false;$me")
else
out+=("$SHOW_ICONS [ <b>${jgmenu_icon_theme}</b> ],mb-setvar jgmenu_use_icons=true;$me")
fi
out+=("^sep()")
out+=("$SQUARE,mb-setvar jgmenu_icon_theme=Numix-Square;mb-setvar jgmenu_use_icons=true;$me")
out+=("$CIRCLE,mb-setvar jgmenu_icon_theme=Numix-Circle;mb-setvar jgmenu_use_icons=true;$me")
if [ -d /usr/share/icons/BeautyLine ];then
out+=("BeautyLine,mb-setvar jgmenu_icon_theme=BeautyLine;mb-setvar jgmenu_use_icons=true;$me")
else
out+=("$INSTALL BeautyLine icons, pamac-installer beautyline")
fi
if [ -d /usr/share/icons/Papirus ];then
out+=("Papirus,mb-setvar jgmenu_icon_theme=Papirus;mb-setvar jgmenu_use_icons=true;$me")
else
out+=("$INSTALL Papirus icons, pamac-installer papirus-icon-theme")
fi
if [ -d /usr/share/icons/Sardi-Arc ];then
out+=("^sep()")
out+=("Sardi,^checkout(sardi)")
out2+=("^tag(sardi)")
out2+=("Sardi,mb-setvar jgmenu_icon_theme=Sardi;mb-setvar jgmenu_use_icons=true;$me")
out2+=("Sardi-Orb-Colora,mb-setvar jgmenu_icon_theme=Sardi-Orb-Colora;mb-setvar jgmenu_use_icons=true;$me")
out2+=("Sardi-Flat,mb-setvar jgmenu_icon_theme=Sardi-Flat;mb-setvar jgmenu_use_icons=true;$me")
out2+=("Sardi-Flexible,mb-setvar jgmenu_icon_theme=Sardi-Flexible;mb-setvar jgmenu_use_icons=true;$me")
out2+=("Sardi-Mono,mb-setvar jgmenu_icon_theme=Sardi-Mono;mb-setvar jgmenu_use_icons=true;$me")
else
out+=("^sep()")
out+=("$INSTALL Sardi icons, pamac-installer sardi-icons")
fi
out+=("^sep(Colorizer)")
out+=("Colorizer - Menu,colorizer-menus -s")
### RUN
#if [[ $1 == "-s" ]]; then
if [[ $1 == "-s" || $1 == "-c" ]]; then
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
out+=("^sep()")
case "$1" in
-s) out+=("$LEFTPANEL,mb-jgtools places");;
-c) out+=(" ⮜ Colorizer,colorizer -s");;
esac
if [[ $panels_heightpos == "top" ]]; then
MENU_VALIGN="top"
MENU_MARGIN_Y=${panels_topmargin:-0}
elif [[ $panels_heightpos == "bottom" ]]; then
MENU_VALIGN="bottom"
MENU_MARGIN_Y=${panels_topmargin:-0}
else
MENU_VALIGN="center"
fi
MENU_PADDING_TOP=${jgtools_padding}
MENU_HALIGN="left"
jgmenu_icon_size=0
JGWIDTH=40
menu_margin_x=${submenu_spacing:-0}
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
$(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}")
$(printf '%s\n' "${out3[@]}")
EOF
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
exit 0
fi
printf '%s\n' "${out[@]}"
if [ $1 == "-r" ]; then
printf '%s\n' "^sep()"
printf '%s\n' "<i>$REMOVE</i>,mb-setvar places_menusettingspipe=false;mb-jgtools places"
fi
printf '%s\n' "${out2[@]}"
printf '%s\n' "${out3[@]}"