2022-05-15 03:25:01 +02:00
|
|
|
#!/bin/bash
|
2023-01-18 23:58:47 +01:00
|
|
|
#
|
|
|
|
# colorizer - set of tools for Mabox (auto)theming
|
|
|
|
# Copyright (C) 2022-2023 Daniel Napora <napcok@gmail.com>
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-05 17:18:04 +02:00
|
|
|
SYSSCHEMES="/usr/share/mabox-colorizer/colorschemes/menus.csv"
|
|
|
|
USERSCHEMES="$HOME/.config/colorizer/menus/userschemes.csv"
|
|
|
|
|
|
|
|
|
|
|
|
### Wallpaper colors
|
|
|
|
WALLPALDIR="$HOME/.cache/colorizer/palettes"
|
|
|
|
mkdir -p "$WALLPALDIR"
|
2024-08-13 22:44:32 +02:00
|
|
|
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2)
|
2023-09-05 17:18:04 +02:00
|
|
|
NAME=${WALLPATH////_}
|
|
|
|
if [[ "${NAME}" =~ ^_home_.* ]]; then
|
|
|
|
n=${#HOME}
|
|
|
|
((n++))
|
|
|
|
NAME=${NAME:${n}}
|
|
|
|
fi
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
2023-01-18 23:58:47 +01:00
|
|
|
|
2022-05-15 03:25:01 +02:00
|
|
|
me="colorizer-menus -s"
|
|
|
|
. $HOME/.config/mabox/mabox.conf
|
|
|
|
case "$jgmenu_theme" in
|
|
|
|
obtheme)
|
|
|
|
OBTHEME=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/))
|
|
|
|
{l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$HOME/.config/openbox/rc.xml");
|
|
|
|
#echo "$OBTHEME"
|
|
|
|
THEMERC="$HOME/.config/mabox/jgobthemes/${OBTHEME}.colorrc"
|
|
|
|
jgmenu_theme="$OBTHEME";; #only to show real theme name in menu
|
|
|
|
*)
|
|
|
|
THEMERC="$HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc";;
|
|
|
|
esac
|
|
|
|
|
2022-09-19 20:59:26 +02:00
|
|
|
GRADIENT_FILE="$HOME"/.config/colorizer/gradients_menu.inc
|
|
|
|
|
|
|
|
if [ ! -f "$GRADIENT_FILE" ]; then
|
|
|
|
cp /usr/share/mabox-colorizer/gradients_menu.inc "$GRADIENT_FILE"
|
|
|
|
fi
|
|
|
|
|
2022-05-15 03:25:01 +02:00
|
|
|
# Backup original theme file
|
|
|
|
if [ ! -f "${THEMERC}.bak" ]; then
|
|
|
|
cp ${THEMERC} ${THEMERC}.bak
|
|
|
|
fi
|
2022-07-06 08:41:00 +02:00
|
|
|
case "$LANG" in
|
|
|
|
pl*)
|
2022-08-27 18:52:55 +02:00
|
|
|
MENU_THEME="Motyw menu"
|
2023-09-05 17:18:04 +02:00
|
|
|
QUICK_TWEAKS="Ustawienia główne"
|
2023-09-11 18:59:49 +02:00
|
|
|
OVERALL_STYLE="Ogólny styl"
|
2023-09-05 17:18:04 +02:00
|
|
|
SCHEMES="Motywy kolorystycznie"
|
|
|
|
SYSTEM_SCHEMES="Systemowe"
|
|
|
|
YOUR_SCHEMES="Moje motywy"
|
|
|
|
SAVE_CURRSCHEME="Zapisz aktualną kolorystykę jako..."
|
|
|
|
OPEN_SCHEMEFILE="Odwórz plik ze schematami w edytorze"
|
|
|
|
COLORSCHEME="Schemat kolorów"
|
|
|
|
APPLY_SCHEME="Zastosuj"
|
|
|
|
DELETE="Usuń"
|
|
|
|
DELETE_SCHEME="Usuń schemat kolorów"
|
|
|
|
BORDER="Obramowanie"
|
|
|
|
PADDING="Margines wewnętrzny"
|
|
|
|
RADIUS="Zaokrąglone rogi"
|
|
|
|
SUBSPACING="Odstęp submenu"
|
|
|
|
LINE_HEIGHT="Wysokość lini"
|
|
|
|
ARROW_STRING="Znak strzałki"
|
|
|
|
ARROW_STRING_LEFT="Znak strzałki lewej"
|
|
|
|
MBG_OPACITY="(Nie)przeźroczystość Menu"
|
|
|
|
SIZING="Rozmiar menu"
|
|
|
|
WIDE="szerokie"
|
|
|
|
NORMAL="normalne"
|
|
|
|
TIGHT="wąskie"
|
2024-02-22 14:24:51 +01:00
|
|
|
MONOCHROMATIC="Monochromatyczny"
|
|
|
|
CHOOSE_AND_PICK="Wybierz wariant i pobierz kolor..."
|
2022-07-06 08:41:00 +02:00
|
|
|
GENERATEFROMWP="<i>Generuj z kolorów tapety...</i>"
|
|
|
|
LIGHTBG="Jasne tło"
|
|
|
|
DARKBG="Ciemne tło"
|
2022-08-27 18:52:55 +02:00
|
|
|
COLOR_MENU_BG="Tło menu"
|
|
|
|
COLOR_MENU_BG_TO="Tło menu 2 (gradient)"
|
|
|
|
COLOR_MENU_BORDER="Obramowanie menu"
|
|
|
|
GRADIENT_POS="Kierunek gradientu"
|
|
|
|
NONE="brak gradientu (none)"
|
|
|
|
TOP="od góry (top)"
|
|
|
|
RIGHT="od prawej (right)"
|
|
|
|
BOTTOM="z dołu (bottom)"
|
|
|
|
LEFT="od lewej (left)"
|
|
|
|
TOP_LEFT="od góry z lewej (top_left)"
|
|
|
|
TOP_RIGHT="od góry z prawej (top_right)"
|
|
|
|
BOTTOM_LEFT="z dołu od lewej (bottom_left)"
|
|
|
|
BOTTOM_RIGHT="z dołu od prawej (bottom_right)"
|
2023-09-05 17:18:04 +02:00
|
|
|
PRE_GRADIENTS="Zastosuj gradient"
|
2022-09-21 13:37:15 +02:00
|
|
|
GRADIENT_REVERSE="Odwróć kolory Gradientu"
|
2023-05-09 16:45:54 +02:00
|
|
|
ITEM="Pozycja (element) menu "
|
2023-08-30 14:00:09 +02:00
|
|
|
FONT="Czcionka"
|
2023-09-05 17:18:04 +02:00
|
|
|
FONTS="Czcionki"
|
2023-08-30 14:00:09 +02:00
|
|
|
INCREASE="Powiększ do"
|
|
|
|
DECREASE="Pomniejsz do"
|
|
|
|
FONT_CUSTOM="Wybierz czcionkę i rozmiar..."
|
|
|
|
FONT_FAMILY="rodzina"
|
|
|
|
FONT_SIZE="rozmiar"
|
|
|
|
ITEM_FONT="Czcionka elementu"
|
|
|
|
TITLE_FONT="Czcionka nagłówka"
|
2022-08-27 18:52:55 +02:00
|
|
|
COLOR_NORM_FG="Kolor tekstu"
|
2023-09-05 17:18:04 +02:00
|
|
|
SEL_ITEM="Aktywny element (akcent)"
|
|
|
|
COLOR_SEL_BG="Tło"
|
|
|
|
COLOR_SEL_FG="Tekst"
|
|
|
|
COLOR_SEL_BORDER="Obramowanie"
|
|
|
|
I_BORDER="Obramowanie"
|
|
|
|
I_RADIUS="i Zaokrąglenie"
|
2022-08-27 18:52:55 +02:00
|
|
|
ITEM_BORDER="Obramowanie (px)"
|
|
|
|
ITEM_RADIUS="Zaokrąglenie (px)"
|
|
|
|
COLOR_NORM_BG="Tło"
|
2023-05-09 16:45:54 +02:00
|
|
|
SEPARATOR_TITLE="Separator/Nagłówek"
|
2023-09-05 17:18:04 +02:00
|
|
|
TITLE="Nagłówek"
|
2022-08-27 18:52:55 +02:00
|
|
|
COLOR_TITLE_BG="Tło nagłówka"
|
|
|
|
COLOR_TITLE_FG="Kolor tekstu nagłówka"
|
|
|
|
COLOR_TITLE_BORDER="Kolor obramowania"
|
|
|
|
SEP_HALIGN="Wyrównanie nagłówka"
|
|
|
|
H_LEFT="do lewej"
|
|
|
|
H_CENTER="po środku"
|
|
|
|
H_RIGHT="do prawej"
|
|
|
|
COLOR_SEP_FG="Kolor separatora (linii)"
|
|
|
|
MORE_MENU_SETTINGS="więcej ustawień menu"
|
|
|
|
GLOBAL_MENU_SETTINGS="Globalne Ustawienia Menu"
|
|
|
|
RESET="Resetuj motyw"
|
|
|
|
TO_DEFAULT=""
|
|
|
|
EDIT="Edytuj plik "
|
2023-05-09 16:45:54 +02:00
|
|
|
FILE="plik"
|
2022-08-27 18:52:55 +02:00
|
|
|
SET_RANDOM="Ustaw losowy motyw menu"
|
2023-09-06 16:13:11 +02:00
|
|
|
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
|
2024-09-26 07:54:43 +02:00
|
|
|
_LEFTSIDEPANEL="Lewy panel boczny"
|
2022-07-06 08:41:00 +02:00
|
|
|
;;
|
|
|
|
*)
|
2022-08-27 18:52:55 +02:00
|
|
|
MENU_THEME="Menu theme"
|
2023-09-05 17:18:04 +02:00
|
|
|
QUICK_TWEAKS="Global Settings/Quick Tweaks"
|
2023-09-11 18:59:49 +02:00
|
|
|
OVERALL_STYLE="Overall style"
|
2023-09-05 17:18:04 +02:00
|
|
|
SCHEMES="Color Schemes"
|
|
|
|
SYSTEM_SCHEMES="System colorschemes"
|
|
|
|
YOUR_SCHEMES="My colorschemes"
|
|
|
|
SAVE_CURRSCHEME="Save current colors as..."
|
|
|
|
OPEN_SCHEMEFILE="Open schemes file in editor"
|
|
|
|
COLORSCHEME="Color Scheme"
|
|
|
|
APPLY_SCHEME="Apply colorscheme"
|
|
|
|
DELETE="Delete"
|
|
|
|
DELETE_SCHEME="Delete colorscheme"
|
|
|
|
BORDER="Menu Border"
|
|
|
|
PADDING="Padding"
|
|
|
|
RADIUS="Rounded Corners"
|
|
|
|
SUBSPACING="Submenu Spacing"
|
|
|
|
LINE_HEIGHT="Line height"
|
|
|
|
ARROW_STRING="Arrow string"
|
|
|
|
ARROW_STRING_LEFT="Left Arrow string"
|
|
|
|
MBG_OPACITY="Menu BG Opacity"
|
|
|
|
SIZING="Menu sizing"
|
|
|
|
WIDE="wide"
|
|
|
|
NORMAL="normal"
|
|
|
|
TIGHT="tight"
|
2024-02-22 14:24:51 +01:00
|
|
|
MONOCHROMATIC="Monochromatic"
|
|
|
|
CHOOSE_AND_PICK="Choose variant and pick color..."
|
2022-07-06 08:41:00 +02:00
|
|
|
GENERATEFROMWP="<i>Generate from wallpaper colors...</i>"
|
|
|
|
LIGHTBG="Light Background"
|
|
|
|
DARKBG="Dark Background"
|
2023-09-05 17:18:04 +02:00
|
|
|
COLOR_MENU_BG="Background (BG)"
|
|
|
|
COLOR_MENU_BG_TO="BG to (gradient)"
|
2022-08-27 18:52:55 +02:00
|
|
|
COLOR_MENU_BORDER="Menu Border"
|
|
|
|
GRADIENT_POS="Gradient direction"
|
|
|
|
NONE="none"
|
|
|
|
TOP="top"
|
|
|
|
RIGHT="right"
|
|
|
|
BOTTOM="bottom"
|
|
|
|
LEFT="left"
|
|
|
|
TOP_LEFT="top_left"
|
|
|
|
TOP_RIGHT="top_right"
|
|
|
|
BOTTOM_LEFT="bottom_left"
|
|
|
|
BOTTOM_RIGHT="bottom_right"
|
2023-09-05 17:18:04 +02:00
|
|
|
PRE_GRADIENTS="Apply gradient"
|
2023-05-09 14:14:23 +02:00
|
|
|
GRADIENT_REVERSE="Reverse gradient colors"
|
2023-05-09 16:45:54 +02:00
|
|
|
ITEM="Item"
|
2023-08-30 14:00:09 +02:00
|
|
|
FONT="Font"
|
2023-09-05 17:18:04 +02:00
|
|
|
FONTS="Fonts"
|
2023-08-30 14:00:09 +02:00
|
|
|
INCREASE="Increase to"
|
|
|
|
DECREASE="Decrease to"
|
|
|
|
FONT_CUSTOM="Select custom font and size..."
|
|
|
|
FONT_FAMILY="font family"
|
|
|
|
FONT_SIZE="font size"
|
|
|
|
ITEM_FONT="Item Font"
|
|
|
|
TITLE_FONT="Title Font"
|
2022-08-27 18:52:55 +02:00
|
|
|
COLOR_NORM_FG="Text Color"
|
2023-09-05 17:18:04 +02:00
|
|
|
SEL_ITEM="Selected Item (accent)"
|
|
|
|
COLOR_SEL_BG="Background"
|
|
|
|
COLOR_SEL_FG="Text"
|
|
|
|
COLOR_SEL_BORDER="Border"
|
|
|
|
I_BORDER="Item Border"
|
|
|
|
I_RADIUS="and Radius"
|
2022-08-27 18:52:55 +02:00
|
|
|
ITEM_BORDER="Item Border (px)"
|
|
|
|
ITEM_RADIUS="Item Radius (px)"
|
|
|
|
COLOR_NORM_BG="Item Background"
|
2023-05-09 16:45:54 +02:00
|
|
|
SEPARATOR_TITLE="Separator/Title"
|
2023-09-05 17:18:04 +02:00
|
|
|
TITLE="Title"
|
2022-08-27 18:52:55 +02:00
|
|
|
COLOR_TITLE_BG="Title Background"
|
|
|
|
COLOR_TITLE_FG="Title Foreground"
|
|
|
|
COLOR_TITLE_BORDER="Title Border color "
|
|
|
|
SEP_HALIGN="Title alignment"
|
|
|
|
H_LEFT="left"
|
|
|
|
H_CENTER="center"
|
|
|
|
H_RIGHT="right"
|
|
|
|
COLOR_SEP_FG="Separator (line) color"
|
|
|
|
MORE_MENU_SETTINGS="more menu settings"
|
|
|
|
GLOBAL_MENU_SETTINGS="Global Menu Settings"
|
|
|
|
RESET="Reset"
|
|
|
|
TO_DEFAULT="to default"
|
|
|
|
EDIT="Edit"
|
|
|
|
FILE="file"
|
|
|
|
SET_RANDOM="Set random menu theme"
|
2023-09-06 16:13:11 +02:00
|
|
|
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
|
2024-09-26 07:54:43 +02:00
|
|
|
_LEFTSIDEPANEL="Left Sidepanel"
|
2022-07-06 08:41:00 +02:00
|
|
|
;;
|
|
|
|
esac
|
2022-05-15 03:25:01 +02:00
|
|
|
|
|
|
|
getvalues () {
|
|
|
|
read MBG MBGA<<< "$(grep 'color_menu_bg ' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read MBGT MBGTA<<< "$(grep 'color_menu_bg_to' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read MBORDER MBORDERA<<< "$(grep 'color_menu_border' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read GRADIENT<<< "$(grep 'menu_gradient_pos' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
if [ "$GRADIENT" == "" ]; then
|
|
|
|
mb-setvar menu_gradient_pos=none ${THEMERC}
|
|
|
|
read GRADIENT<<< "$(grep 'menu_gradient_pos' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
fi
|
|
|
|
read SEPHALIGN<<< "$(grep 'sep_halign' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read SEPFG SEPFGA<<< "$(grep 'color_sep_fg' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read TBG TBGA<<< "$(grep 'color_title_bg' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read TFG TFGA<<< "$(grep 'color_title_fg' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read TBORDER TBORDERA<<< "$(grep 'color_title_border' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read NORMBG NORMBGA<<< "$(grep color_norm_bg ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read NFG NFGA<<< "$(grep color_norm_fg ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read SBG SBGA<<< "$(grep 'color_sel_bg' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read SFG SFGA<<< "$(grep 'color_sel_fg' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read SBORDER SBORDERA<<< "$(grep 'color_sel_border' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read IBORDER<<< "$(grep 'item_border' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
read IRADIUS<<< "$(grep 'item_radius' ${THEMERC} | cut -d'=' -f2)"
|
|
|
|
}
|
|
|
|
getvalues
|
|
|
|
|
2023-09-08 12:34:28 +02:00
|
|
|
# Current colors
|
2023-09-05 17:18:04 +02:00
|
|
|
currcolors="${MBG}|${MBGT}|${MBORDER}|${TBG}|${TFG}|${TBORDER}|${NORMBG}|${NFG}|${SBG}|${SFG}|${SBORDER}|${SEPFG}|${GRADIENT}|"
|
|
|
|
#echo "${currcolors}" > ~/.config/mabox/.menu_colors
|
|
|
|
if [ ! -f "$USERSCHEMES" ]; then
|
|
|
|
mkdir -p "$HOME/.config/colorizer/menus/"
|
|
|
|
echo " MBG | MBGT |MBORDER| TBG | TFG |TBORDER|NORMBG | NFG | SBG | SFG |SBORDER| SEPFG |GRADIENT|scheme_name" > "$USERSCHEMES"
|
|
|
|
fi
|
2022-05-15 03:25:01 +02:00
|
|
|
|
2022-08-27 18:52:55 +02:00
|
|
|
out+=("^sep($MENU_THEME: <i>${jgmenu_theme}</i>)")
|
2023-09-23 13:57:32 +02:00
|
|
|
out+=("<big></big> $QUICK_TWEAKS,^checkout(tweaks)")
|
2023-09-05 17:18:04 +02:00
|
|
|
|
2023-09-09 16:01:49 +02:00
|
|
|
out2+=("^tag(tweaks)")
|
2023-09-11 18:59:49 +02:00
|
|
|
out2+=("^sep($OVERALL_STYLE)")
|
2023-09-09 16:01:49 +02:00
|
|
|
######
|
|
|
|
out2+=("$BORDER [ <b>${jgtools_border:-0}px</b> ],^checkout(mborder)")
|
|
|
|
out2+=("$PADDING [ <b>${jgtools_padding:-0}px</b> ],^checkout(mpadding)")
|
|
|
|
#out2+=("$RADIUS [ <b>${jgtools_radius:-0}</b> ],^checkout(mradius)")
|
|
|
|
out2+=("$SUBSPACING [ <b>${submenu_spacing:-0}px</b> ],^checkout(subspacing)")
|
|
|
|
out2+=("^sep()")
|
|
|
|
out2+=("$LINE_HEIGHT [ <b>$item_height_factor%</b> ],^checkout(lineheight)")
|
|
|
|
out2+=("^sep()")
|
|
|
|
out2+=("$ARROW_STRING [ <b>$arrow_string</b> ],^checkout(arrow)")
|
|
|
|
out2+=("$ARROW_STRING_LEFT [ <b>$arrow_string_left</b> ],^checkout(arrowleft)")
|
|
|
|
|
|
|
|
|
|
|
|
out3+=("^tag(mborder)")
|
|
|
|
out3+=("^sep($BORDER)")
|
2024-02-22 14:24:51 +01:00
|
|
|
for i in 0 1 2 3 4 5 6 8 10 12; do [[ "$jgtools_border" == $i ]] && out3+=("<big>綠</big> $(printf "<b><tt>%3s</tt></b>,%s" "$i" "jgctl border ${i}")") || out3+=("<big>祿</big> $(printf "<tt>%3s</tt>,%s" "$i" "jgctl border ${i}")");done
|
2023-09-09 16:01:49 +02:00
|
|
|
|
|
|
|
out3+=("^tag(mpadding)")
|
|
|
|
out3+=("^sep($PADDING)")
|
2024-02-22 14:24:51 +01:00
|
|
|
for i in 0 2 4 6 8 10 12 14 16 18 20 22 24 28 32 40; do [[ "$jgtools_padding" == $i ]] && out3+=("<big>綠</big> $(printf "<b><tt>%3s</tt></b>,%s" "$i" "jgctl padding ${i}")") || out3+=("<big>祿</big> $(printf "<tt>%3s</tt>,%s" "$i" "jgctl padding ${i}")");done
|
2023-09-09 16:01:49 +02:00
|
|
|
|
|
|
|
out3+=("^tag(subspacing)")
|
|
|
|
out3+=("^sep($SUBSPACING)")
|
|
|
|
for i in -20 -12 -10 -8 -6 -4 -2 0 1 2 4 6 8 10 12 14 16 18 20; do [[ "$submenu_spacing" == $i ]] && out3+=("<big>綠</big> $(printf "<b><tt>%4s</tt></b>,%s" "$i" "mb-setvar submenu_spacing=${i};$me")") || out3+=("<big>祿</big> $(printf "<tt>%4s</tt>,%s" "$i" "mb-setvar submenu_spacing=${i};$me")");done
|
|
|
|
|
|
|
|
out3+=("^tag(lineheight)")
|
|
|
|
out3+=("^sep($LINE_HEIGHT)")
|
|
|
|
for i in 160 180 200 220 240 280 300; do [[ "$item_height_factor" == $i ]] && out3+=("<big>綠</big> $(printf "<b><tt>%4s%%</tt></b>,%s" "$i" "mb-setvar item_height_factor=${i};$me")") || out3+=("<big>祿</big> $(printf "<tt>%4s%%</tt>,%s" "$i" "mb-setvar item_height_factor=${i};$me")");done
|
|
|
|
|
|
|
|
out3+=("^tag(arrow)")
|
|
|
|
out3+=("^sep($ARROW_STRING)")
|
|
|
|
for i in "" "" "" "" "" "" "" "" "" "壟" "" "" "" "" "" "" "..." ":." "." "+" "^" "-" "_" "" "" "" "" ""; do [[ "$arrow_string" == $i ]] && out3+=("<tt>>> </tt>$i<tt> <<</tt>,$me") || out3+=("<tt> </tt>$i,mb-setvar arrow_string=${i};$me");done
|
|
|
|
|
|
|
|
out3+=("^tag(arrowleft)")
|
|
|
|
out3+=("^sep($ARROW_STRING_LEFT)")
|
|
|
|
for i in "" "" "" "" "" "" "" "" "" "鹿" "" "" "" "" "" ""; do [[ "$arrow_string_left" == $i ]] && out3+=("<tt>>> </tt>$i<tt> <<</tt>,$me") || out3+=("<tt> </tt>$i,mb-setvar arrow_string_left=${i};$me");done
|
|
|
|
|
|
|
|
out2+=("^sep()")
|
|
|
|
out2+=("$MBG_OPACITY,^checkout(mbgopacity")
|
|
|
|
out3+=("^tag(mbgopacity)")
|
|
|
|
out3+=("^sep(mbgopacity)")
|
|
|
|
out3+=("100% Opaque,jgctl tweak opacity 100;$me")
|
|
|
|
out3+=("90%,jgctl tweak opacity 90;$me")
|
|
|
|
out3+=("80%,jgctl tweak opacity 80;$me")
|
|
|
|
out3+=("60%,jgctl tweak opacity 60;$me")
|
|
|
|
out3+=("50%,jgctl tweak opacity 50;$me")
|
|
|
|
out3+=("40%,jgctl tweak opacity 40;$me")
|
|
|
|
out3+=("30%,jgctl tweak opacity 30;$me")
|
|
|
|
out3+=("20%,jgctl tweak opacity 20;$me")
|
|
|
|
out3+=("10%,jgctl tweak opacity 10;$me")
|
|
|
|
out3+=("0% Fully transparent,jgctl tweak opacity 0;$me")
|
|
|
|
|
|
|
|
out2+=("^sep()")
|
|
|
|
out2+=("Solid Color,jgctl tweak solid;$me")
|
|
|
|
out2+=("Gradient,jgctl tweak gradient;$me")
|
|
|
|
|
|
|
|
|
|
|
|
out2+=("^sep($SIZING)")
|
|
|
|
out2+=("$WIDE,jgctl tweak sizing wide;$me")
|
|
|
|
out2+=("$NORMAL,jgctl tweak sizing normal;$me")
|
|
|
|
out2+=("$TIGHT,jgctl tweak sizing tight;$me")
|
2023-09-05 17:18:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-09 09:18:19 +02:00
|
|
|
#### COLOR SCHEMES
|
|
|
|
out+=("<big><span bgcolor='${MBG}'> <span fgcolor='${TBG}'></span> <span fgcolor='${SFG}'></span> <span fgcolor='${SBG}'></span> </span></big> $SCHEMES,^checkout(schemes)")
|
2023-09-09 16:01:49 +02:00
|
|
|
out2+=("^tag(schemes)")
|
|
|
|
out2+=("^sep($SCHEMES)")
|
2024-02-22 14:24:51 +01:00
|
|
|
out2+=("^sep($MONOCHROMATIC)")
|
|
|
|
out2+=("^sep(<i>$CHOOSE_AND_PICK</i>)")
|
|
|
|
out2+=("<big></big> $LIGHTBG...,jgctl mono pick light")
|
|
|
|
out2+=("<big></big> $DARKBG...,jgctl mono pick dark")
|
|
|
|
out2+=("^sep($GENERATEFROMWP)")
|
|
|
|
out2+=("<big><span bgcolor='${w[-3]}'> <span bgcolor='${w[-5]}'> <span bgcolor='${w[-1]}' fgcolor='${w[1]}'> $LIGHTBG </span> </span> </span></big>,w2theme menu light;$me")
|
|
|
|
out2+=("<big><span bgcolor='${w[1]}'> <span bgcolor='${w[4]}'> <span bgcolor='${w[2]}' fgcolor='${w[-2]}'> $DARKBG </span> </span> </span></big>,w2theme menu dark;$me")
|
2023-09-09 16:01:49 +02:00
|
|
|
out2+=("^sep($SYSTEM_SCHEMES)")
|
2023-09-05 17:18:04 +02:00
|
|
|
|
2023-09-09 16:01:49 +02:00
|
|
|
n=1
|
|
|
|
while IFS="|" read -r mbg mbgt mborder tbg tfg tborder normbg nfg sbg sfg sborder sepfg 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+=("<tt>$(printf '%-20s' "${scheme_name}")</tt><big><span bgcolor='${mbg}' fgcolor='${nfg}'> <small>item</small> <span bgcolor='${tbg}' fgcolor='${tfg}'> <small><b>title</b></small> </span> <span bgcolor='${sbg}' fgcolor='${sfg}'> <small>[ sel ]</small> </span> <span bgcolor='${mbgt}'> <small>${icon}</small> </span></span></big>,jgctl applyscheme sys $n;$me")
|
|
|
|
done < <(tail -n +2 "$SYSSCHEMES")
|
|
|
|
|
|
|
|
out2+=("^sep($YOUR_SCHEMES)")
|
|
|
|
out2+=("<big></big> $SAVE_CURRSCHEME,jgctl savescheme '${currcolors}';$me")
|
|
|
|
out2+=("<big></big> $OPEN_SCHEMEFILE,xdg-open $USERSCHEMES")
|
|
|
|
out2+=("^sep()")
|
|
|
|
n=1
|
|
|
|
while IFS="|" read -r mbg mbgt mborder tbg tfg tborder normbg nfg sbg sfg sborder sepfg 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+=("<tt>$(printf '%-20s' "${scheme_name}")</tt><big><span bgcolor='${mbg}' fgcolor='${nfg}'> <small>item</small> <span bgcolor='${tbg}' fgcolor='${tfg}'> <small><b>title</b></small> </span> <span bgcolor='${sbg}' fgcolor='${sfg}'> <small>[ sel ]</small> </span> <span bgcolor='${mbgt}'> <small>${icon}</small> </span></span></big>,^checkout(sch${n})")
|
|
|
|
out3+=("^tag(sch${n}")
|
|
|
|
out3+=("^sep($COLORSCHEME: ${scheme_name})")
|
|
|
|
out3+=("<big></big> $APPLY_SCHEME,jgctl applyscheme usr ${n};$me")
|
|
|
|
out3+=("^sep($DELETE)")
|
|
|
|
out3+=("<big></big> $DELETE_SCHEME ${scheme_name},jgctl delscheme ${n};$me")
|
|
|
|
done < <(tail -n +2 "$USERSCHEMES")
|
|
|
|
|
|
|
|
|
|
|
|
out+=("^sep($FONTS)")
|
|
|
|
out+=("<big></big> $TITLE [ <b>$menu_sep_font_family $menu_sep_font_size</b> ],^checkout(mtitlefont)")
|
|
|
|
out+=("<big></big> $ITEM [ <b>$menu_font_family $menu_font_size</b> ],^checkout(mitemfont)")
|
|
|
|
|
|
|
|
# Item font submenu
|
|
|
|
out2+=("^tag(mitemfont)")
|
|
|
|
out2+=("^sep($ITEM_FONT)")
|
|
|
|
out2+=("<big></big> $FONT_CUSTOM,mb-setfont menu_item;$me")
|
|
|
|
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
|
|
|
|
|
|
|
|
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+=("^tag(mtitlefont)")
|
|
|
|
out2+=("^sep($TITLE_FONT)")
|
|
|
|
out2+=("<big></big> $FONT_CUSTOM,mb-setfont menu_sep;$me")
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
### MENU
|
2023-05-09 16:45:54 +02:00
|
|
|
out+=("^sep(Menu)")
|
2022-08-27 18:52:55 +02:00
|
|
|
out+=("<tt><small>$(printf '%3s' "$MBGA")</small> <span bgcolor='$MBG' bgalpha='${MBGA/#[0]/1}%'> </span><span bgcolor='$MBG'> </span></tt> $COLOR_MENU_BG,^pipe(mbclr '$MBG' jgctl color_menu_bg '${COLOR_MENU_BG}' '$me')")
|
|
|
|
out+=("<tt><small>$(printf '%3s' "$MBGTA")</small> <span bgcolor='$MBGT' bgalpha='${MBGTA/#[0]/1}%'> </span><span bgcolor='$MBGT'> </span></tt> $COLOR_MENU_BG_TO,^pipe(mbclr '$MBGT' jgctl color_menu_bg_to '${COLOR_MENU_BG_TO}' '$me')")
|
2023-09-05 17:18:04 +02:00
|
|
|
if [[ "$jgtools_border" != "0" ]];then
|
2022-08-27 18:52:55 +02:00
|
|
|
out+=("<tt><small>$(printf '%3s' "$MBORDERA")</small> <span bgcolor='$MBORDER' bgalpha='${MBORDERA/#[0]/1}%'> </span><span bgcolor='$MBORDER'> </span></tt> $COLOR_MENU_BORDER,^pipe(mbclr '$MBORDER' jgctl color_menu_border '${COLOR_MENU_BORDER}' '$me')")
|
2023-09-05 17:18:04 +02:00
|
|
|
fi
|
2022-05-15 03:25:01 +02:00
|
|
|
out+=("^sep()")
|
2023-05-09 14:14:23 +02:00
|
|
|
|
|
|
|
case "$GRADIENT" in
|
2023-09-05 17:18:04 +02:00
|
|
|
none)icon="";;
|
2023-05-09 14:14:23 +02:00
|
|
|
top)icon="";;
|
|
|
|
right)icon="";;
|
|
|
|
bottom)icon="";;
|
|
|
|
left)icon="";;
|
|
|
|
top_left)icon="";;
|
|
|
|
top_right)icon="";;
|
|
|
|
bottom_left)icon="";;
|
|
|
|
bottom_right)icon="";;
|
|
|
|
esac
|
|
|
|
|
2023-09-09 16:01:49 +02:00
|
|
|
out+=("<big>$icon</big> $GRADIENT_POS [ <b>$GRADIENT</b> ],^checkout(gradientpos)")
|
2023-09-23 13:57:32 +02:00
|
|
|
out+=("<big></big> $GRADIENT_REVERSE,jgctl gradient '${MBGT}' '${MBG}';$me")
|
2022-12-08 17:48:55 +01:00
|
|
|
out+=("<tt><span bgcolor='#16a084'> </span><span bgcolor='#43a480'> </span><span bgcolor='#5da97b'> </span><span bgcolor='#72ad77'> </span><span bgcolor='#84b171'> </span><span bgcolor='#95b66c'> </span><span bgcolor='#a5ba66'> </span><span bgcolor='#b5be61'> </span><span bgcolor='#c3c15a'> </span><span bgcolor='#d1c753'> </span><span bgcolor='#dfc94c'> </span><span bgcolor='#edce44'> </span><span bgcolor='#f4d03f'> </span></tt> $PRE_GRADIENTS,^pipe(mbgrad menu)")
|
2023-05-09 14:14:23 +02:00
|
|
|
|
2023-09-09 16:01:49 +02:00
|
|
|
### TITLE/SEPARATOR
|
2022-08-27 18:52:55 +02:00
|
|
|
out+=("^sep($SEPARATOR_TITLE)")
|
|
|
|
out+=("<tt><small>$(printf '%3s' "$TBGA")</small> <span bgcolor='$TBG' bgalpha='${TBGA}%'> </span><span bgcolor='$TBG'> </span></tt> $COLOR_TITLE_BG,^pipe(mbclr '$TBG' jgctl color_title_bg '${COLOR_TITLE_BG}' '$me')")
|
|
|
|
out+=("<tt><small>$(printf '%3s' "$TFGA")</small> <span weight='bold' bgcolor='$TBG' bgalpha='${TBGA/#[0]/1}%' fgcolor='$TFG' fgalpha='${TFGA}%'> AbCd </span></tt> $COLOR_TITLE_FG,^pipe(mbclr '$TFG' jgctl color_title_fg '${COLOR_TITLE_FG}' '$me')")
|
|
|
|
out+=("<tt><small>$(printf '%3s' "$TBORDERA")</small> <span bgcolor='$TBORDER' bgalpha='${TBORDERA/#[0]/1}%'> </span><span bgcolor='$TBORDER'> </span></tt> $COLOR_TITLE_BORDER,^pipe(mbclr '$TBORDER' jgctl color_title_border '${COLOR_TITLE_BORDER}' '$me')")
|
2022-05-19 14:50:08 +02:00
|
|
|
out+=("^sep()")
|
2023-05-09 14:14:23 +02:00
|
|
|
|
|
|
|
case "$SEPHALIGN" in
|
|
|
|
left) icon="";;
|
|
|
|
center) icon="";;
|
|
|
|
right) icon="";;
|
|
|
|
esac
|
|
|
|
|
2023-09-05 17:18:04 +02:00
|
|
|
out+=("<big>$icon</big> $SEP_HALIGN [ <b>$SEPHALIGN</b> ],^checkout(sephalign)")
|
2022-05-19 14:50:08 +02:00
|
|
|
out+=("^sep()")
|
2022-08-27 18:52:55 +02:00
|
|
|
out+=("<tt><small>$(printf '%3s' "$SEPFGA")</small> <span fgcolor='$SEPFG' fgalpha='${SEPFGA/#[0]/1}%'>------</span></tt> ${COLOR_SEP_FG},^pipe(mbclr '$SEPFG' jgctl color_sep_fg '${COLOR_SEP_FG}' '$me')")
|
2022-05-19 14:50:08 +02:00
|
|
|
|
2023-09-05 17:18:04 +02:00
|
|
|
|
2023-09-09 16:01:49 +02:00
|
|
|
### SELECTED ITEM (ACCENT)
|
|
|
|
out+=("^sep($SEL_ITEM)")
|
|
|
|
out+=("<tt><small>$(printf '%3s' "$SBGA")</small> <span bgcolor='$SBG' bgalpha='${SBGA/#[0]/1}%'> </span><span bgcolor='$SBG'> </span></tt> $COLOR_SEL_BG,^pipe(mbclr '$SBG' jgctl color_sel_bg '${COLOR_SEL_BG}' '$me')")
|
|
|
|
out+=("<tt><small>$(printf '%3s' "$SFGA")</small> <span weight='bold' bgcolor='$SBG' bgalpha='${SBGA/#[0]/1}%' fgcolor='$SFG' fgalpha='${SFGA/#[0]/1}%'> AbCd </span></tt> $COLOR_SEL_FG,^pipe(mbclr '$SFG' jgctl color_sel_fg '${COLOR_SEL_FG}' '$me')")
|
|
|
|
if [[ "$IBORDER" != "0" ]];then
|
|
|
|
out+=("<tt><small>$(printf '%3s' "$SBORDERA")</small> <span bgcolor='$SBORDER' bgalpha='${SBORDERA/#[0]/1}%'> </span><span bgcolor='$SBORDER'> </span></tt> $COLOR_SEL_BORDER,^pipe(mbclr '$SBORDER' jgctl color_sel_border '${COLOR_SEL_BORDER}' '$me')")
|
|
|
|
fi
|
|
|
|
out+=("^sep()")
|
|
|
|
out+=("Apply <big><span bgcolor='${SBG}' fgcolor='${SFG}'> accent </span></big> preset,^checkout(sel_accents)")
|
|
|
|
|
|
|
|
out2+=("^tag(sel_accents)")
|
|
|
|
out2+=("^sep(Accent presets)")
|
|
|
|
while IFS="," read -r BG FG BGNAME FGNAME
|
|
|
|
do
|
|
|
|
[[ "$BGNAME" == "" ]] && BGNAME=${BG}
|
|
|
|
[[ "$FGNAME" == "" ]] && FGNAME=${FG}
|
|
|
|
out2+=("<big><span bgcolor='${FG}'> <span bgcolor='${BG}' fgcolor='${FG}'><small><tt>$(printf '%*s' 25 "${FGNAME} on ${BGNAME}")</tt></small> </span> </span></big>,jgctl accent '${BG}' '${FG}';$me")
|
|
|
|
out21+=("<big><span bgcolor='${BG}'> <span bgcolor='${FG}' fgcolor='${BG}'><small><tt>$(printf '%*s' 25 "${BGNAME} on ${FGNAME}")</tt></small> </span> </span></big>,jgctl accent '${FG}' '${BG}';$me")
|
|
|
|
done < <(tail -n +2 /usr/share/mabox-colorizer/readable_colors.csv)
|
|
|
|
out2+=("${out21[@]}")
|
|
|
|
|
|
|
|
### ITEM
|
|
|
|
out+=("^sep($ITEM)")
|
|
|
|
out+=("<tt><small>$(printf '%3s' "$NFGA")</small> <span weight='bold' fgcolor='$NFG' fgalpha='${NFGA/#[0]/1}%'> AbCd </span></tt> $COLOR_NORM_FG,^pipe(mbclr '$NFG' jgctl color_norm_fg '${COLOR_NORM_FG}' '$me')")
|
|
|
|
out+=("^sep()")
|
|
|
|
[[ ! -z "$NORMBG" ]] && out+=("<tt><small>$(printf '%3s' "$NORMBGA")</small> <span bgcolor='${NORMBG}' bgalpha='${NORMBGA/#[0]/1}%'> </span><span bgcolor='${NORMBG}'> </span></tt> $COLOR_NORM_BG,^pipe(mbclr '$NORMBG' jgctl color_norm_bg '${COLOR_NORM_BG}' '$me')" "^sep()")
|
|
|
|
out+=("$I_BORDER [ <b>$IBORDER</b> ] $I_RADIUS [ <b>$IRADIUS</b> ],^checkout(itemborder_radius)")
|
|
|
|
|
2023-09-05 17:18:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-15 03:25:01 +02:00
|
|
|
out2+=("^tag(gradientpos)")
|
2022-08-27 18:52:55 +02:00
|
|
|
out2+=("^sep($GRADIENT_POS <small>$GRADIENT</small>)")
|
2023-09-05 17:18:04 +02:00
|
|
|
out2+=(" $NONE,jgctl menu_gradient_pos none;$me")
|
2022-05-15 03:25:01 +02:00
|
|
|
out2+=("^sep()")
|
2022-12-17 12:50:10 +01:00
|
|
|
out2+=(" $TOP,jgctl menu_gradient_pos top;$me")
|
|
|
|
out2+=(" $RIGHT,jgctl menu_gradient_pos right;$me")
|
|
|
|
out2+=(" $BOTTOM,jgctl menu_gradient_pos bottom;$me")
|
|
|
|
out2+=(" $LEFT,jgctl menu_gradient_pos left;$me")
|
|
|
|
out2+=(" $TOP_LEFT,jgctl menu_gradient_pos top_left;$me")
|
|
|
|
out2+=(" $TOP_RIGHT,jgctl menu_gradient_pos top_right;$me")
|
|
|
|
out2+=(" $BOTTOM_LEFT,jgctl menu_gradient_pos bottom_left;$me")
|
|
|
|
out2+=(" $BOTTOM_RIGHT,jgctl menu_gradient_pos bottom_right;$me")
|
2022-05-15 03:25:01 +02:00
|
|
|
|
|
|
|
out2+=("^tag(sephalign)")
|
2022-08-27 18:52:55 +02:00
|
|
|
out2+=("^sep($SEP_HALIGN)")
|
2023-09-05 17:18:04 +02:00
|
|
|
[[ "$SEPHALIGN" == "left" ]] && out2+=("<big>綠</big> $H_LEFT,jgctl sep_halign left;$me") || out2+=("<big>祿</big> $H_LEFT,jgctl sep_halign left;$me")
|
|
|
|
[[ "$SEPHALIGN" == "center" ]] && out2+=("<big>綠</big> $H_CENTER,jgctl sep_halign center;$me") || out2+=("<big>祿</big> $H_CENTER,jgctl sep_halign center;$me")
|
|
|
|
[[ "$SEPHALIGN" == "right" ]] && out2+=("<big>綠</big> $H_RIGHT,jgctl sep_halign right;$me") || out2+=("<big>祿</big> $H_RIGHT,jgctl sep_halign right;$me")
|
|
|
|
out2+=("^tag(itemborder_radius)")
|
2022-09-19 20:59:26 +02:00
|
|
|
out2+=("^sep($ITEM_BORDER)")
|
2023-09-05 17:18:04 +02:00
|
|
|
[[ "$IBORDER" == 0 ]] && out2+=("<big>綠</big> 0 px,jgctl item_border 0;$me") || out2+=("<big>祿</big> 0 px,jgctl item_border 0;$me")
|
2022-05-15 03:25:01 +02:00
|
|
|
out2+=("^sep()")
|
2023-09-05 17:18:04 +02:00
|
|
|
[[ "$IBORDER" == 1 ]] && out2+=("<big>綠</big> 1 px,jgctl item_border 1;$me") || out2+=("<big>祿</big> 1 px,jgctl item_border 1;$me")
|
|
|
|
[[ "$IBORDER" == 2 ]] && out2+=("<big>綠</big> 2 px,jgctl item_border 2;$me") || out2+=("<big>祿</big> 2 px,jgctl item_border 2;$me")
|
|
|
|
|
2022-09-19 20:59:26 +02:00
|
|
|
out2+=("^sep($ITEM_RADIUS)")
|
2023-09-05 17:18:04 +02:00
|
|
|
[[ "$IRADIUS" == 0 ]] && out2+=("<big>綠</big> 0 px,jgctl item_radius 0;$me") || out2+=("<big>祿</big> 0 px,jgctl item_radius 0;$me")
|
2022-05-15 03:25:01 +02:00
|
|
|
out2+=("^sep()")
|
2023-09-05 17:18:04 +02:00
|
|
|
[[ "$IRADIUS" == 1 ]] && out2+=("<big>綠</big> 1 px,jgctl item_radius 1;$me") || out2+=("<big>祿</big> 1 px,jgctl item_radius 1;$me")
|
|
|
|
[[ "$IRADIUS" == 2 ]] && out2+=("<big>綠</big> 2 px,jgctl item_radius 2;$me") || out2+=("<big>祿</big> 2 px,jgctl item_radius 2;$me")
|
|
|
|
[[ "$IRADIUS" == 3 ]] && out2+=("<big>綠</big> 3 px,jgctl item_radius 3;$me") || out2+=("<big>祿</big> 3 px,jgctl item_radius 3;$me")
|
|
|
|
[[ "$IRADIUS" == 4 ]] && out2+=("<big>綠</big> 4 px,jgctl item_radius 4;$me") || out2+=("<big>祿</big> 4 px,jgctl item_radius 4;$me")
|
|
|
|
[[ "$IRADIUS" == 5 ]] && out2+=("<big>綠</big> 5 px,jgctl item_radius 5;$me") || out2+=("<big>祿</big> 5 px,jgctl item_radius 5;$me")
|
|
|
|
[[ "$IRADIUS" == 6 ]] && out2+=("<big>綠</big> 6 px,jgctl item_radius 6;$me") || out2+=("<big>祿</big> 6 px,jgctl item_radius 6;$me")
|
2022-05-15 03:25:01 +02:00
|
|
|
|
2022-05-19 14:50:08 +02:00
|
|
|
|
2023-09-11 18:59:49 +02:00
|
|
|
#out+=("^sep($MORE_MENU_SETTINGS)")
|
|
|
|
#out+=(" $GLOBAL_MENU_SETTINGS,jgmenusettings-pipe -c")
|
2022-08-27 18:52:55 +02:00
|
|
|
#out+=("$GLOBAL_MENU_SETTINGS,^pipe(jgmenusettings-pipe -r)")
|
2022-05-15 03:25:01 +02:00
|
|
|
|
|
|
|
### RUN
|
|
|
|
if [[ "$1" == "-s" ]]; then
|
|
|
|
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
|
|
|
|
. $HOME/.config/mabox/mabox.conf
|
2022-08-16 16:50:11 +02:00
|
|
|
|
|
|
|
CNF_DIR="$HOME/.config/colorizer"
|
|
|
|
CNF_FILE="$CNF_DIR/colorizer.conf"
|
|
|
|
source "$CNF_FILE"
|
2022-05-15 03:25:01 +02:00
|
|
|
|
|
|
|
out+=("^sep()")
|
2023-09-06 16:13:11 +02:00
|
|
|
out+=(" ${arrow_string_left} $_COLORIZER_ROOT,colorizer -s")
|
2024-09-26 07:54:43 +02:00
|
|
|
out+=(" ${arrow_string_left} ${arrow_string_left} $_LEFTSIDEPANEL,mb-jgtools places")
|
2022-05-15 03:25:01 +02:00
|
|
|
|
2022-08-16 16:50:11 +02:00
|
|
|
if [[ "$colorizer_size" == "full" ]];then
|
|
|
|
eval $(xdotool getdisplaygeometry --shell)
|
|
|
|
MENU_HEIGHT_MIN="$HEIGHT"
|
|
|
|
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
|
2022-12-03 18:44:36 +01:00
|
|
|
jgtools_radius=0
|
2022-08-16 16:50:11 +02:00
|
|
|
menu_margin_x="0"
|
|
|
|
else
|
|
|
|
MENU_VALIGN="center"
|
|
|
|
menu_margin_x=${submenu_spacing:-0}
|
2022-05-15 03:25:01 +02:00
|
|
|
fi
|
2022-08-16 16:50:11 +02:00
|
|
|
|
2022-05-15 03:25:01 +02:00
|
|
|
MENU_PADDING_TOP=${jgtools_padding:-0}
|
|
|
|
MENU_HALIGN="left"
|
|
|
|
jgmenu_icon_size=0
|
|
|
|
JGWIDTH=40
|
2022-08-16 16:50:11 +02:00
|
|
|
|
2022-05-15 03:25:01 +02:00
|
|
|
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
|
|
|
|
[ -z $jgmenu_use_borders ] && menu_border=0
|
2023-09-05 17:18:04 +02:00
|
|
|
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
|
|
|
|
MENU_PADDING_TOP=$((jgtools_padding + 150))
|
2022-05-15 03:25:01 +02:00
|
|
|
#WALLPAPER
|
2024-08-13 22:44:32 +02:00
|
|
|
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2)
|
2023-01-18 23:58:47 +01:00
|
|
|
THUMBDIR="$HOME/.cache/colorizer/thumbs"
|
2022-05-15 03:25:01 +02:00
|
|
|
mkdir -p ${THUMBDIR}
|
2023-01-18 23:58:47 +01:00
|
|
|
NAME=${WALLPATH////_}
|
|
|
|
if [[ "${NAME}" =~ ^_home_.* ]]; then
|
|
|
|
n=${#HOME}
|
|
|
|
((n++))
|
|
|
|
NAME=${NAME:${n}}
|
|
|
|
fi
|
|
|
|
THUMB="${THUMBDIR}/${NAME}.png"
|
2022-05-15 03:25:01 +02:00
|
|
|
if [[ ! -f "$THUMB" ]]
|
|
|
|
then
|
2023-01-18 23:58:47 +01:00
|
|
|
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
|
2022-05-15 03:25:01 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
mkconfigfile
|
|
|
|
|
|
|
|
cat <<EOF > ${MENU_ITEMS}
|
2023-09-05 17:18:04 +02:00
|
|
|
@icon,,$((jgtools_padding )),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
|
2023-05-09 14:14:23 +02:00
|
|
|
|
2023-09-05 17:18:04 +02:00
|
|
|
@rect,,$((jgtools_padding)),$((jgtools_padding + 116)),270,30,0,left,top,#222222 20,#222222 70,
|
|
|
|
@text,,$((jgtools_padding + 158)),$((jgtools_padding + 116)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> Menus</span>
|
|
|
|
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 22)),35,80,2,left,top,${MBORDER} ${MBORDERA},${MBG} ${MBGA},
|
|
|
|
@rect,,$((jgtools_padding + 40)),$((jgtools_padding + 72)),35,60,2,left,top,${MBORDER} ${MBORDERA},${MBG} ${MBGA},
|
2022-05-15 03:25:01 +02:00
|
|
|
$(printf '%s\n' "${out[@]}")
|
|
|
|
$(printf '%s\n' "${out2[@]}")
|
2023-09-05 17:18:04 +02:00
|
|
|
$(printf '%s\n' "${out3[@]}")
|
2022-05-15 03:25:01 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
printf '%s\n' "${out[@]}"
|
|
|
|
printf '%s\n' "${out2[@]}"
|
2023-09-05 17:18:04 +02:00
|
|
|
printf '%s\n' "${out3[@]}"
|