#!/bin/bash # jgwallpaperchanger - dynamic menu (or submenu) to configure/set wallpapers # #TODO quickly colorize OB,Conky,menus from wp-colors + apply predefined schemes if [[ $1 == "-r" || "$1" == "-d" ]];then me="${0##*/} -s" else me="${0##*/} ${1:--s}" fi #SLIDESHOW CONF CONFIG_DIR="$HOME/.config/mbwallpaper" CONF_FILE="$CONFIG_DIR/mbwallpaper.conf" WALLPAPERS_LIST="$CONFIG_DIR/wplist" ## SYSTEM AND USER SAVED THEMES OB_SYSTHEMES="/usr/share/mabox-colorizer/colorschemes/ob.csv" OB_USERTHEMES="$HOME/.config/colorizer/openbox/userthemes.csv" # Make config directory if not exist mkdir -p $CONFIG_DIR # If config file not exist create one with defaults if [ ! -f $CONF_FILE ]; then cat < ${CONF_FILE} # Directory with wallpapers wallpaper_dir=/usr/share/backgrounds/ # Rotate time in seconds interval=10 # Tint2 panel executor button left click action t2_button_lclick_action=choose EOF fi # read config variables from file source <(grep = $CONF_FILE) wallpaper_dir2=${wallpaper_dir/$HOME/\~} #notify-send.sh "Wallpaper Dir" "${wallpaper_dir}" COLORIZER_CONF="$HOME/.config/colorizer/colorizer.conf" source ${COLORIZER_CONF} #WP_DIRS CNF_FILE="$HOME/.config/mabox/wallp_dirs.conf" if [ ! -f $CNF_FILE ]; then cat < ${CNF_FILE} # User wallpapers directories - one per line # Used by "Random", "Choose wallpaper" PCmanFM wrapper, "Slideshow", Preview and set" utils # From File Manager set wallpapers using context (right click) menu ~/wallpapers/ EOF fi lclick(){ case $t2_button_lclick_action in random) mbwallpaper -o;; choose) pcmanwp;; preview) mbwallpaper -c;; menu) jgwallpaperchanger ipc;; slideshow) run_wallpaperslideshow;; window) ycolorizer;; colmenu) colorizer -s;; esac } main(){ case $LANG in pl*) _TITLE="Tapety oraz stylizacja pulpitu" _WALLPAPERS="Tapety" _RANDWALL="Losowa tapeta" _EDIT_WPDIRS="Edytuj katalogi z tapetami" _GENERATOR="Generuj (ImageMagick)..." _CHOOSE_WP="Wybierz tapetę..." _SLIDESHOW_DESC="Pokaz slajdów" _SLIDESHOW="pokaz slajdów" _ABOUT_SLIDESHOW="O pokazie slajdów" _STARTS="Uruchom Pokaz slajdów (zatrzymany)" _STOPS="Zatrzymaj Pokaz slajdów (działający - interwał: $interval sek.)" _INTERVAL="Interwał slajdów" _SEC="sekund" _WPDIR="Katalog" _WPDIRS="Katalogi z tapetami" _WPDIRS_DESC="dla losowa/podgląd/pokaz slajdów" _TOTAL="Razem" _WPS="tapety w" _DIRS="katalogach" _LEFTPANEL="Lewy panel" _OBTHEME="Motyw Openbox" _MENUPANELS="Menu i Panele" _COLORIZER_HELP="Okno główne i Pomoc" _COLORIZER_ROOT="Colorizer menu główne" _COLORIZER_FONTS="Konfiguruj Czcionki" _COLORIZER_PICOM="Kompozytor Picom" _COLORIZER_OB="Moduł Openbox" _COLORIZER_MENU="Moduł Menu" _COLORIZER_CONKY="Menadżer Conky" _COLORIZER_PYRADIO="Moduł PyRadio" _COLORIZER_CAVA="Moduł Cava" _B_LC_ACTION="Akcja (lewy klik)" _P_B_LC_ACTION="Po lewym kliku w przycisk na panelu" _RAND="losuj" _CHOOSE="wybierz" _WALL_MENU="menu tapet" _WALL_MENU_DESC="Menu Tapet" _PREVIEW="podgląd" _COL_WINDOW="okno" _COL_MENU="menu" _RANDOM_DESC="Ustaw losową tapetę" _CHOOSE_DESC="Wybierz tapetę (z menu kontekstowego)" _PREVIEW_DESC="Podgląd użyj 󱦱 󱦰 Enter Esc " _COL_WINDOW_DESC="Colorizer - okno" _COL_MENU_DESC="Colorizer - dynamiczne menu" _GOBACK="powrót" SYSTEM_THEMES="Systemowe" YOUR_THEMES="Moje motywy" SAVE_CURRTHEME="Zapisz aktualną kobfigurację jako..." OPEN_THEMEFILE="Odwórz plik z motywami w edytorze" THEME="Motyw" APPLY="Zastosuj" APPLY_THEME="Pełny motyw (kolory, czcionki i rozmiar)" APPLY_SCHEME="Tylko kolory" DELETE="Usuń" DELETE_THEME="Usuń motyw" OBTHEME_LBL="Motyw OpenBox" MONOCHROMATIC="Monochromatyczny" CHOOSE_AND_PICK="Wybierz wariant i pobierz kolor..." GENERATEFROMWP="Generuj z kolorów tapety..." LIGHTBG=" Jasne tło" DARKBG="Ciemne tło" RANDOMIZE="Generuj losowo" ;; *) _TITLE="Wallpaper & Desktop styling" _WALLPAPERS="Wallpapers" _RANDWALL="Random Wallpaper" _EDIT_WPDIRS="Edit Wallpaper dirs" _GENERATOR="Generate (ImageMagick)..." _CHOOSE_WP="Choose Wallpaper (from context menu)" _SLIDESHOW_DESC="Wallpaper Slideshow" _SLIDESHOW="slideshow" _ABOUT_SLIDESHOW="About Slideshow" _STARTS="Start Slideshow (stopped)" _STOPS="Stop Slideshow (running - interval: $interval sec.)" _INTERVAL="Interval" _SEC="seconds" _WPDIR="WP Dir" _WPDIRS="Directories with Wallpapers" _WPDIRS_DESC="for random/preview/slideshow utils" _TOTAL="Total" _WPS="wallpapers in" _DIRS="dirs" _LEFTPANEL="Left panel" _OBTHEME="Openbox Theme" _MENUPANELS="Menus/Panels" _COLORIZER_CONKY="Conky Manager" _COLORIZER_HELP="Main Window and Help" _COLORIZER_ROOT="Colorizer rootmenu" _COLORIZER_FONTS="Configure Fonts" _COLORIZER_PICOM="Compositor settings (Picom)" _B_LC_ACTION="left-click action" _P_B_LC_ACTION="Panel button left-click action" _RAND="random" _CHOOSE="choose" _WALL_MENU="wallmenu" _WALL_MENU_DESC="Wallpaper Menu" _PREVIEW="preview and set" _COL_WINDOW="window" _COL_MENU="menu" _RANDOM_DESC="Set random wallpaper" _CHOOSE_DESC="Choose wallpaper (from context menu)" _PREVIEW_DESC="Preview & set use 󱦱 󱦰 Enter Esc " _COL_WINDOW_DESC="Colorizer - window" _COL_MENU_DESC="Colorizer - dynamic menu" _GOBACK="go back" _CHANGE_THEME="Change theme" _CLICK_TO_APPLY="click to apply" SYSTEM_THEMES="System themes..." YOUR_THEMES="Your themes..." THEME="Theme" _GENERATE="Generate..." MONOCHROMATIC="Monochromatic (pick color)" CHOOSE_AND_PICK="Choose variant and pick color..." GENERATEFROMWP="...from wallpaper colors..." LIGHTBG="light variant" DARKBG="dark variant" RANDOMIZE="Random" _MORE_OPTIONS="need more options?" _COLOR_TUNING="color tuning?" _SAVE_OWN="save/delete own themes?" _USE="use..." ;; esac . $HOME/.config/mabox/mabox.conf help="\nBased on idea of Mabox forum member Shwaybo.\n\nchange wallpapers from a directory, never using the same picture twice until all the pictures have been shown, and rotating x number of seconds (configurable) before the next wallpaper change.\n" out+=("^sep($_WALLPAPERS)") [[ "$1" == "-s" || "$1" == "ipc" || "$1" == "-d" ]] && : || out+=("^sep($_WALLPAPERS)") if ! pgrep -f "mbwallpaper -s" > /dev/null; then #out+=("$NITROGEN,nitrogen") out+=(" $_RANDWALL,mbwallpaper -o;$me") out+=("󰉔 $_CHOOSE_WP,pcmanwp") out+=("^sep()") out+=(" $_PREVIEW_DESC,mbwallpaper -c") out+=("󰧸 $_SLIDESHOW_DESC,^checkout(sshow)") out+=("󱡄 $_GENERATOR,^pipe(jgwallpapergenerate)") out+=("^sep()") out+=(" $_WPDIR [ ${wallpaper_dir2} ],^checkout(wpdirs)") out2+=("^tag(wpdirs)") out2+=("^sep($_WPDIRS)") out2+=("^sep($_WPDIRS_DESC)") readarray -t wpdirs < <(grep -v '^\s*$\|^#\|^\s*\#' "$CNF_FILE") [[ -d "$(xdg-user-dir PICTURES)/imagick" ]] && wallp=$(shopt -s nullglob ; set -- $(xdg-user-dir PICTURES)/imagick/*.{jpg,JPG,jpeg,JPEG,png,PNG,avif} ; echo $#) if [[ "$wallp" -gt "1" ]];then imagickdir="$(xdg-user-dir PICTURES)/imagick" imagickdir=${imagickdir/$HOME/\~} wpdirs=("$imagickdir" "${wpdirs[@]}") fi wpdirs=("/usr/share/backgrounds/" "${wpdirs[@]}") #notify-send.sh "DIRS" "${#wpdirs[@]}" wpimgs=0 for dir in "${wpdirs[@]}" do wpdir=${dir/\~/$HOME} wallp=$(shopt -s nullglob ; set -- $wpdir/*.{jpg,JPG,jpeg,JPEG,png,PNG,avif} ; echo $#) [[ "$wallpaper_dir2" == "${dir}" ]] && out2+=(" (${wallp}) ${dir}") || out2+=(" (${wallp}) ${dir},mbwallpaper changedir ${dir};$me") wpimgs=$((wpimgs+wallp)) done out2+=("^sep($_TOTAL: $wpimgs $_WPS ${#wpdirs[@]} $_DIRS)") out2+=(" $_EDIT_WPDIRS,xdg-open $CNF_FILE") else out+=("$_STOPS,killall mbwallpaper;pkill -f 'yad --not';$me") fi out1+=("^tag(sshow)") out1+=("^sep($_SLIDESHOW_DESC)") out1+=("$_STARTS,run_wallpaperslideshow") out1+=("$_INTERVAL [ $interval ] ($_SEC),^checkout(interval)") out1+=("^sep()") #out1+=(" $EDITCONF ,xdg-open $CONF_FILE") #out1+=(" $OPENDIR,pcmanfm -n $wallpaper_dir") out1+=("$_ABOUT_SLIDESHOW,\"\"\"notify-send.sh -u critical -i mbcc 'Wallpaper Changer - rotate desktop wallpaper every n-seconds' \"$help\" \"\"\"") out2+=("^tag(interval)") out2+=("^sep($_INTERVAL)") for i in 3 5 10 30 60 120 300 600 1800 3600; do out2+=("$(printf " %4s,%s" "$i" "mb-setvar interval=${i} $CONF_FILE;$me")");done #WALLPAPER and wallpaper colors WALLPALDIR="$HOME/.cache/colorizer/palettes" read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2) THUMBDIR="$HOME/.cache/colorizer/thumbs" mkdir -p ${THUMBDIR} NAME=${WALLPATH////_} if [[ "${NAME}" =~ ^_home_.* ]]; then n=${#HOME} ((n++)) NAME=${NAME:${n}} fi THUMB="${THUMBDIR}/${NAME}.png" if [[ ! -f "$THUMB" ]] then magick convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB} fi # wp colors if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr" fi mapfile -t w < "$WALLPALDIR/$NAME.clr" if [[ "${#w[@]}" -lt 8 ]]; then w+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4") fi ### STYLES out+=("^sep(Desktop styling)") out+=(" OpenBox Windows Decoration,^root(obox)") out+=(" Mabox Menus,^root(jgmenus)") out+=(" Conky widgets,^root(conky)") case "$2" in obox)option="--checkout=obox";; jgmenus)option="--checkout=jgmenus";; conky)option="--checkout=conky";; *)option="";; esac ## OPENBOX out1+=("^tag(obox)") out1+=("^sep(OpenBox Window Decorations)") out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()") out1+=("^sep($SYSTEM_THEMES)" "^sep()") n=1 while IFS="|" read -r abg abgto afg aline nbg nbgto nfg nline grad txtjust pheight pwidth handle bord bevel buttons fsize fname ndslimc weight slant scheme_name do ((n=n+1)) out1+=(" $(printf '%-20s' "${scheme_name}") in ,obtctl applytheme sys ${n};$me obox" "^sep()") done < <(tail -n +2 "$OB_SYSTHEMES") out1+=("^sep($YOUR_THEMES)" "^sep()") n=1 while IFS="|" read -r abg abgto afg aline nbg nbgto nfg nline grad txtjust pheight pwidth handle bord bevel buttons fsize fname ndslimc weight slant scheme_name do ((n=n+1)) out1+=(" $(printf '%-20s' "${scheme_name}") in ,obtctl applytheme usr ${n};$me obox" "^sep()") done < <(tail -n +2 "$OB_USERTHEMES") out1+=("^sep($_GENERATE)") out1+=(" $RANDOMIZE,obtctl randomizer;$me obox") out1+=(" $MONOCHROMATIC,^checkout(monoch)") out2+=("^tag(monoch)") out2+=("^sep($CHOOSE_AND_PICK)") out2+=(" $LIGHTBG...,obtctl mono pick light stylemenu") out2+=(" $DARKBG...,obtctl mono pick dark stylemenu") out1+=("^sep($GENERATEFROMWP)" "^sep()") out1+=(" $LIGHTBG ,w2theme ob light;$me obox" "^sep()") out1+=(" $DARKBG ,w2theme ob dark;$me obox") out1+=("^sep()") out1+=("^sep($_MORE_OPTIONS)") out1+=("^sep($_COLOR_TUNING)" "^sep($_SAVE_OWN)") out1+=("$_USE Colorizer OpenBox,colorizer-ob -s") out1+=("^sep()") out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()") ## JGMENUS MENU_SYSSCHEMES="/usr/share/mabox-colorizer/colorschemes/menus.csv" MENU_USERSCHEMES="$HOME/.config/colorizer/menus/userschemes2.csv" JG_SYS_AMOUNT=$(cat $MENU_SYSSCHEMES |wc -l) JG_USR_AMOUNT=$(cat $MENU_USERSCHEMES |wc -l) out1+=("^tag(jgmenus)") out1+=("^sep(Menu/Panels)") out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()") out1+=("^sep($_CHANGE_THEME)") out1+=(" $SYSTEM_THEMES ($((JG_SYS_AMOUNT-1))),^checkout(jg_sys)") out2+=("^tag(jg_sys)") out2+=("^sep($_CLICK_TO_APPLY)") n=1 while IFS="|" read -r mbg mbga mbgt mbgta mborder mbordera tbg tbga tfg tfga tborder tbordera normbg normbga nfg nfga sbg sbga sfg sfga sborder sbordera sepfg sepfga b r p ss ibor irad a al sephal grad scheme_name do ((n=n+1)) case "$grad" in none)icon="󰄱";; top)icon="";; right)icon="";; bottom)icon="";; left)icon="";; top_left)icon="";; top_right)icon="";; bottom_left)icon="";; bottom_right)icon="";; esac out2+=(" $(printf '%-18s' "${scheme_name}") title [ sel ] ${icon} ,jgctl applyscheme sys $n;$me jgmenus" "^sep()") done < <(tail -n +2 "$MENU_SYSSCHEMES") out1+=(" $YOUR_THEMES ($((JG_USR_AMOUNT-1))),^checkout(jg_usr)") out2+=("^tag(jg_usr)") out2+=("^sep($_CLICK_TO_APPLY)") n=1 while IFS="|" read -r mbg mbga mbgt mbgta mborder mbordera tbg tbga tfg tfga tborder tbordera normbg normbga nfg nfga sbg sbga sfg sfga sborder sbordera sepfg sepfga b r p ss ibor irad a al sephal grad scheme_name do ((n=n+1)) case "$grad" in none)icon="󰄱";; top)icon="";; right)icon="";; bottom)icon="";; left)icon="";; top_left)icon="";; top_right)icon="";; bottom_left)icon="";; bottom_right)icon="";; esac out2+=(" $(printf '%-18s' "${scheme_name}") title [ sel ] ${icon} ,jgctl applyscheme usr ${n};$me jgmenus" "^sep()") done < <(tail -n +2 "$MENU_USERSCHEMES") out1+=("^sep($_GENERATE)") out1+=(" $RANDOMIZE,jgctl randomscheme;$me jgmenus") out1+=(" $MONOCHROMATIC,^checkout(monoch_menu)") out2+=("^tag(monoch_menu)") out2+=("^sep($CHOOSE_AND_PICK)") out2+=(" $LIGHTBG...,jgctl mono pick light stylemenu") out2+=(" $DARKBG...,jgctl mono pick dark stylemenu") out1+=("^sep($GENERATEFROMWP)") out1+=(" $LIGHTBG,w2theme menu light;$me jgmenus") out1+=(" $DARKBG,w2theme menu dark;$me jgmenus") out1+=("^sep($_MORE_OPTIONS)") out1+=("^sep($_COLOR_TUNING)" "^sep($_SAVE_OWN)") out1+=("$_USE Colorizer Menu module,colorizer-menus -s") out1+=("^sep()") out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()") ## CONKIES out1+=("^tag(conky)") out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()") out1+=("^sep(Conky)") out1+=("^sep(not implemented yet)") out1+=("$_COLORIZER_CONKY,colorizer-conky -s") out1+=("^sep()") out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()") out+=("^sep()") out+=(" $_COLORIZER_FONTS,colorizer-fonts -s") out+=("^sep()") out+=(" $_COLORIZER_PICOM,jgpicom-pipe -s") ### RUN if [[ $1 == "-s" || $1 == "-c" || $1 == "-u" || $1 == "ipc" || $1 == "-d" ]]; then . /usr/share/mb-jgtools/pipemenu-standalone.cfg case "$1" in -s) out+=(" ${arrow_string_left} $_LEFTPANEL,mb-jgtools places");; -c) out+=(" ${arrow_string_left} Colorizer,colorizer -s");; -u) out+=(" ${arrow_string_left} Settings menu,mb-jgtools settings");; -d) POSITION_MODE=pointer;; ipc) POSITION_MODE=${1:-fixed} out+=("^sep(Mabox Colorizer)") out+=("$_COLORIZER_HELP,ycolorizer") out+=("$_COLORIZER_ROOT,colorizer -s") out+=("^sep()") case $t2_button_lclick_action in random) out+=("󰳽 $_B_LC_ACTION: [ $_RAND ],^checkout(laction)");; choose) out+=("󰳽 $_B_LC_ACTION: [ $_CHOOSE ],^checkout(laction)");; preview) out+=("󰳽 $_B_LC_ACTION: [ $_PREVIEW ],^checkout(laction)");; menu) out+=("󰳽 $_B_LC_ACTION: [ $_WALL_MENU ],^checkout(laction)");; slideshow) out+=("󰳽 $_B_LC_ACTION: [ $_SLIDESHOW ],^checkout(laction)");; window) out+=("󰳽 $_B_LC_ACTION: [ $_COL_WINDOW ],^checkout(laction)");; colmenu) out+=("󰳽 $_B_LC_ACTION: [ $_COL_MENU ],^checkout(laction)");; *) out+=("󰳽 $_B_LC_ACTION: [ $_CHOOSE ],^checkout(laction)");; esac out2+=("^tag(laction)") out2+=("^sep($_P_B_LC_ACTION)") [[ "$t2_button_lclick_action" == "random" ]] && out2+=(" $_RANDOM_DESC") || out2+=(" $_RANDOM_DESC,mb-setvar t2_button_lclick_action=random $CONF_FILE") [[ "$t2_button_lclick_action" == "choose" ]] && out2+=(" $_CHOOSE_DESC") || out2+=(" $_CHOOSE_DESC,mb-setvar t2_button_lclick_action=choose $CONF_FILE") [[ "$t2_button_lclick_action" == "preview" ]] && out2+=(" $_PREVIEW_DESC") || out2+=(" $_PREVIEW_DESC,mb-setvar t2_button_lclick_action=preview $CONF_FILE") [[ "$t2_button_lclick_action" == "menu" ]] && out2+=(" $_WALL_MENU_DESC") || out2+=(" $_WALL_MENU_DESC,mb-setvar t2_button_lclick_action=menu $CONF_FILE") [[ "$t2_button_lclick_action" == "slideshow" ]] && out2+=(" $_SLIDESHOW_DESC") || out2+=(" $_SLIDESHOW_DESC,mb-setvar t2_button_lclick_action=slideshow $CONF_FILE") out2+=("^sep()") [[ "$t2_button_lclick_action" == "window" ]] && out2+=(" $_COL_WINDOW_DESC") || out2+=(" $_COL_WINDOW_DESC,mb-setvar t2_button_lclick_action=window $CONF_FILE") [[ "$t2_button_lclick_action" == "colmenu" ]] && out2+=(" $_COL_MENU_DESC") || out2+=(" $_COL_MENU_DESC,mb-setvar t2_button_lclick_action=colmenu $CONF_FILE") ;; esac #. $HOME/.config/mabox/mabox.conf 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:-0} MENU_HALIGN="left" jgmenu_icon_size=0 JGWIDTH=40 menu_margin_x=${submenu_spacing:-0} [ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius [ -z $jgmenu_use_borders ] && menu_border=0 JGWIDTH=$((jgtools_padding + 270 + jgtools_padding)) MENU_PADDING_TOP=$((jgtools_padding + 150)) # colors on image n=0 m=0 X=$((jgtools_padding + 6)) Y=$((jgtools_padding + 102)) for i in "${w[@]}" do if [[ "$n" -lt "13" ]];then dots+=("@rect,,$((X + 20*n)),$((Y)),18,18,1,left,top,#FFFFFF 80,${i} 100,") else dots+=("@rect,,$((X + 20*m)),$((Y+20)),18,18,1,left,top,#FFFFFF 80,${i} 100,") ((m=m+1)) fi ((n=n+1)) done #TEMP POSITION: MENU_VALIGN="top" MENU_MARGIN_Y="80" mkconfigfile echo menu_height_mode=dynamic >> ${CONFIG_FILE} cat < ${MENU_ITEMS} @icon,,$((jgtools_padding )),$((jgtools_padding)),270,150,4,left,top,,,${THUMB} @rect,,$((jgtools_padding)),$((jgtools_padding + 96)),270,52,0,left,top,#222222 20,#222222 70, @text,,$((jgtools_padding + 196)),$((jgtools_padding + 22)),100,28,0,left,top,#222222 30,${WINCLR}, @text,,$((jgtools_padding + 194)),$((jgtools_padding + 20)),100,28,0,left,top,#FFFFFF 45,${WINCLR}, @text,,$((jgtools_padding + 74)),$((jgtools_padding + 119)),180,28,0,left,top,#FFFFFF ,${WINCLR},$_TITLE $(printf '%s\n' "${dots[@]}") $(printf '%s\n' "${out[@]}") $(printf '%s\n' "${out1[@]}") $(printf '%s\n' "${out2[@]}") EOF jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} ${option} 2>/dev/null exit 0 fi printf '%s\n' "${out[@]}" if [[ $1 == "-r" ]]; then case $LANG in pl*) REMOVE="Usuń to menu z panelu";; es*) REMOVE="Eliminar este menú del panel";; *) REMOVE="Remove this menu from panel";; esac printf '%s\n' "^sep()" printf '%s\n' "$_REMOVE,mb-setvar places_jgwallpaperchanger=false;mb-jgtools places" fi printf '%s\n' "${out1[@]}" printf '%s\n' "${out2[@]}" } case "$1" in lclick) lclick;; *) main "$@";; esac