save/restore menus

master 0.9.51
Daniel Napora 2023-09-05 17:18:04 +02:00
parent 082d27f52e
commit 6482e8ddfc
11 changed files with 462 additions and 145 deletions

View File

@ -707,8 +707,8 @@ if [[ "$1" == "-s" ]]; then
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 158))
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
@ -720,8 +720,8 @@ if [[ "$1" == "-s" ]]; then
# colors
n=0
m=0
X=$((jgtools_padding + 12))
Y=$((jgtools_padding + 104))
X=$((jgtools_padding + 4))
Y=$((jgtools_padding + 100))
for i in "${w[@]}"
do
if [[ "$n" -lt "10" ]];then
@ -754,11 +754,11 @@ else
esac
fi
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 8)),270,20,0,left,top,#222222 20,#222222 70,
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 120)),270,34,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 12)),$((jgtools_padding + 2)),270,30,0,left,top,#FFFFFF ,${WINCLR}, <span size='10400' font_family='Ubuntu'><small>${THGEN}</small> <span fgcolor='$FGCOL'><b>$STATE</b></span></span>
@text,,$((jgtools_padding + 198)),$((jgtools_padding + 124)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b></span>
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding)),$((jgtools_padding + 4)),270,20,0,left,top,#222222 20,#222222 70,
@rect,,$((jgtools_padding)),$((jgtools_padding + 116)),270,34,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 12)),$((jgtools_padding)),270,30,0,left,top,#FFFFFF ,${WINCLR}, <span size='10400' font_family='Ubuntu'><small>${THGEN}</small> <span fgcolor='$FGCOL'><b>$STATE</b></span></span>
@text,,$((jgtools_padding + 194)),$((jgtools_padding + 120)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b></span>
$(printf '%s\n' "${dots[@]}")
#@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 34)),270,120,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer.png
$(printf '%s\n' "${out[@]}")

View File

@ -54,6 +54,7 @@ Możesz je więc <b>przesuwać</b> lub <b>zmieniać rozmiar</b> tak jak każde i
COLOR="Jednolity kolor"
REVERSE_GRADIENT="Odwróć kolory gradientu"
START_CAVA="Uruchom Cava"
STOP_CAVA="Zakończ Cava"
GENERATEFROMWP="Generuj z kolorów tapety..."
LIGHTBG="Jasne do ciemnego"
DARKBG="Ciemne do jesnego"
@ -82,6 +83,7 @@ So you can <b>move</b> or <b>resize</b> it like any other window\n \
COLOR="Solid Color"
REVERSE_GRADIENT="Reverse gradient's colors"
START_CAVA="Start Cava"
STOP_CAVA="Stop Cava"
GENERATEFROMWP="Generate from wallpaper colors..."
LIGHTBG="Light to Dark"
DARKBG="Dark to Light"
@ -118,8 +120,8 @@ fi
FGT=$(pastel textcolor ${FGC}|pastel format hex)
}
getvalues
pgrep -f cavatransparent > /dev/null && out+=("<big>󰺢</big> $STOP_CAVA,mb-music cavakill;$me") || out+=("<big>󰺢</big> $START_CAVA,mb-music cavastart;$me")
out+=("^sep($COLORIZE_CAVA)")
out+=("<tt><span bgcolor='$FGC' fgcolor='$FGT'> ${FGC} </span></tt> $COLOR,^pipe(mbclr '$FGC' cavactl foreground Cava_Bar_Color '$me')")
out+=("^sep($GRADIENT)")
out+=("<span bgcolor='$GR_FROM'> </span><span bgcolor='$GR_TO'> </span> $PREGRADIENT,^pipe(mbgrad cava)")
@ -167,7 +169,7 @@ if [[ "$1" == "-s" ]]; then
source "$CNF_FILE"
out+=("^sep()")
out+=(" ⮜⮜⮜ Colorizer,colorizer -s")
out+=(" ${arrow_string_left} Colorizer,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
@ -187,7 +189,7 @@ if [[ "$1" == "-s" ]]; then
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 158))
MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)

View File

@ -388,7 +388,7 @@ if [[ "$1" == "-s" ]]; then
source $HOME/.config/colorizer/colorizer.conf
out+=("^sep()")
out+=(" ⮜⮜⮜ Colorizer,colorizer -s")
out+=(" ${arrow_string_left} Colorizer,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
@ -406,8 +406,8 @@ if [[ "$1" == "-s" ]]; then
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 158))
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
@ -428,13 +428,13 @@ if [[ "$1" == "-s" ]]; then
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 120)),270,34,0,left,top,#222222 20,#222222 70,
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding)),$((jgtools_padding + 112)),270,34,0,left,top,#222222 20,#222222 70,
#@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer-conky.png
@text,,$((jgtools_padding + 158)),$((jgtools_padding + 124)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> Conky</span>
@rect,,$((jgtools_padding + 244)),$((jgtools_padding + 6)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60,
@rect,,$((jgtools_padding + 5)),$((jgtools_padding + 92)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60,
@rect,,$((jgtools_padding + 36)),$((jgtools_padding + 112)),29,40,0,left,top,#FFFFFF 30,${WINCLR} 60,
@text,,$((jgtools_padding + 154)),$((jgtools_padding + 116)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> Conky</span>
@rect,,$((jgtools_padding + 239)),$((jgtools_padding + 2)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60,
@rect,,$((jgtools_padding + 2)),$((jgtools_padding + 88)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60,
@rect,,$((jgtools_padding + 34)),$((jgtools_padding + 108)),29,40,0,left,top,#FFFFFF 30,${WINCLR} 60,
$(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}")
EOF

View File

@ -138,6 +138,12 @@ fi
read FONTDEF <<< "$(grep "font .*=.*,$" ${BASECONKY} | cut -d'=' -f2,3 |cut -d"'" -f2)"
C_FONT=${FONTDEF%:*}
C_FONTSIZE=${FONTDEF#*=}
read OUTLINE <<< "$(grep draw_outline ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)"
read SHADES <<< "$(grep draw_shades ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)"
SHADOWS="no"
[[ "$OUTLINE" == "true" ]] && SHADOWS="outline"
[[ "$SHADES" == "true" ]] && SHADOWS="shadow"
}
getvalues
@ -342,7 +348,7 @@ if [[ "$1" == "-s" ]]; then
source "$CNF_FILE"
out+=("^sep()")
out+=(" ⮜⮜⮜ Colorizer,colorizer -s")
out+=(" ${arrow_string_left} Colorizer,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
@ -361,8 +367,8 @@ if [[ "$1" == "-s" ]]; then
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 158))
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
@ -385,12 +391,12 @@ if [[ "$1" == "-s" ]]; then
[[ "$GR" == "1" ]] && clr=${GR_FROM} || clr=${FG}
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding+4)),$((jgtools_padding+4)),270,150,4,left,top,,,${THUMB}
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
#@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer-conky.png
@rect,,$((jgtools_padding+4)),$((jgtools_padding + 120)),270,28,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 14)),$((jgtools_padding + 110)),100,28,0,left,top,#FFFFFF ,${WINCLR},<span size='41600' font_family='Ubuntu'><big></big></span>
@text,,$((jgtools_padding + 132)),$((jgtools_padding + 120)),150,28,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'>Mabox <b>Fonts</b> config</span>
@rect,,$((jgtools_padding)),$((jgtools_padding + 116)),270,28,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 10)),$((jgtools_padding + 106)),100,28,0,left,top,#FFFFFF ,${WINCLR},<span size='41600' font_family='Ubuntu'><big></big></span>
@text,,$((jgtools_padding + 128)),$((jgtools_padding + 116)),150,28,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'>Mabox <b>Fonts</b> config</span>
$(printf '%s\n' "${out[@]}")

View File

@ -18,6 +18,27 @@
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"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
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"
me="colorizer-menus -s"
. $HOME/.config/mabox/mabox.conf
@ -45,6 +66,28 @@ fi
case "$LANG" in
pl*)
MENU_THEME="Motyw menu"
QUICK_TWEAKS="Ustawienia główne"
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"
GENERATEFROMWP="<i>Generuj z kolorów tapety...</i>"
LIGHTBG="Jasne tło"
DARKBG="Ciemne tło"
@ -61,10 +104,11 @@ case "$LANG" in
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)"
PRE_GRADIENTS="Gotowe gradienty"
PRE_GRADIENTS="Zastosuj gradient"
GRADIENT_REVERSE="Odwróć kolory Gradientu"
ITEM="Pozycja (element) menu "
FONT="Czcionka"
FONTS="Czcionki"
INCREASE="Powiększ do"
DECREASE="Pomniejsz do"
FONT_CUSTOM="Wybierz czcionkę i rozmiar..."
@ -73,13 +117,17 @@ case "$LANG" in
ITEM_FONT="Czcionka elementu"
TITLE_FONT="Czcionka nagłówka"
COLOR_NORM_FG="Kolor tekstu"
COLOR_SEL_BG="Tło aktywnej pozycji"
COLOR_SEL_FG="Tekst aktywnej pozycji"
COLOR_SEL_BORDER="Obramowanie akt. poz."
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"
ITEM_BORDER="Obramowanie (px)"
ITEM_RADIUS="Zaokrąglenie (px)"
COLOR_NORM_BG="Tło"
SEPARATOR_TITLE="Separator/Nagłówek"
TITLE="Nagłówek"
COLOR_TITLE_BG="Tło nagłówka"
COLOR_TITLE_FG="Kolor tekstu nagłówka"
COLOR_TITLE_BORDER="Kolor obramowania"
@ -98,11 +146,33 @@ case "$LANG" in
;;
*)
MENU_THEME="Menu theme"
QUICK_TWEAKS="Global Settings/Quick Tweaks"
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"
GENERATEFROMWP="<i>Generate from wallpaper colors...</i>"
LIGHTBG="Light Background"
DARKBG="Dark Background"
COLOR_MENU_BG="Background"
COLOR_MENU_BG_TO="Background to (gradient)"
COLOR_MENU_BG="Background (BG)"
COLOR_MENU_BG_TO="BG to (gradient)"
COLOR_MENU_BORDER="Menu Border"
GRADIENT_POS="Gradient direction"
NONE="none"
@ -114,10 +184,11 @@ case "$LANG" in
TOP_RIGHT="top_right"
BOTTOM_LEFT="bottom_left"
BOTTOM_RIGHT="bottom_right"
PRE_GRADIENTS="Predefined gradients"
PRE_GRADIENTS="Apply gradient"
GRADIENT_REVERSE="Reverse gradient colors"
ITEM="Item"
FONT="Font"
FONTS="Fonts"
INCREASE="Increase to"
DECREASE="Decrease to"
FONT_CUSTOM="Select custom font and size..."
@ -126,13 +197,17 @@ case "$LANG" in
ITEM_FONT="Item Font"
TITLE_FONT="Title Font"
COLOR_NORM_FG="Text Color"
COLOR_SEL_BG="Selected Item Background"
COLOR_SEL_FG="Selected Item Text"
COLOR_SEL_BORDER="Selected Item Border"
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"
ITEM_BORDER="Item Border (px)"
ITEM_RADIUS="Item Radius (px)"
COLOR_NORM_BG="Item Background"
SEPARATOR_TITLE="Separator/Title"
TITLE="Title"
COLOR_TITLE_BG="Title Background"
COLOR_TITLE_FG="Title Foreground"
COLOR_TITLE_BORDER="Title Border color "
@ -175,35 +250,155 @@ getvalues () {
}
getvalues
# Current colors to file
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
out+=("^sep($MENU_THEME: <i>${jgmenu_theme}</i>)")
out+=("Quick Menu tweaks,^checkout(tweaks)")
out+=("$QUICK_TWEAKS,^checkout(tweaks)")
out2+=("^tag(tweaks)")
out2+=("^sep(Overall style)")
######
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)")
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" "mb-setvar jgtools_border=${i};$me")") || out3+=("<big>祿</big> $(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_border=${i};$me")");done
out3+=("^tag(mpadding)")
out3+=("^sep($PADDING)")
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" "mb-setvar jgtools_padding=${i};$me")") || out3+=("<big>祿</big> $(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_padding=${i};$me")");done
#out3+=("^tag(mradius)")
#out3+=("^sep($RADIUS)")
#for i in 0 1 2 3 4 6 8 12 14 16 18 20 40; do out3+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_radius=${i};$me")");done
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>&gt;&gt; </tt>$i<tt> &lt;&lt;</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>&gt;&gt; </tt>$i<tt> &lt;&lt;</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(Opacity)")
out2+=("100% Opaque,jgctl tweak opacity 100;$me")
out2+=("80%,jgctl tweak opacity 80;$me")
out2+=("60%,jgctl tweak opacity 60;$me")
out2+=("40%,jgctl tweak opacity 40;$me")
out2+=("30%,jgctl tweak opacity 30;$me")
out2+=("20%,jgctl tweak opacity 20;$me")
out2+=("10%,jgctl tweak opacity 10;$me")
out2+=("0% Fully transparent,jgctl tweak opacity 0;$me")
out2+=("^sep(MENU_PADDING)")
out2+=("wide,jgctl tweak padding wide;$me")
out2+=("normal,jgctl tweak padding normal;$me")
out2+=("tight,jgctl tweak padding tight;$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")
#### COLOR SCHEMES
out+=("$SCHEMES,^checkout(schemes)")
out2+=("^tag(schemes)")
out2+=("^sep($SCHEMES)")
out2+=("^sep($SYSTEM_SCHEMES)")
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")
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")
out+=("^sep(Menu)")
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')")
if [[ "$jgtools_border" != "0" ]];then
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')")
fi
out+=("^sep()")
case "$GRADIENT" in
none)icon="";;
none)icon="󰄱";;
top)icon="";;
right)icon="";;
bottom)icon="";;
@ -214,34 +409,41 @@ case "$GRADIENT" in
bottom_right)icon="";;
esac
out+=("$icon $GRADIENT_POS [ <b>$GRADIENT</b> ],^checkout(gradientpos)")
#for i in $(pastel gradient "$MBGT" "$MBG" -n 13|pastel format hex)
#do
#gradrev+=("<span bgcolor='$i'> </span>")
#done
out+=("<big>$icon</big> $GRADIENT_POS [ <b>$GRADIENT</b> ],^checkout(gradientpos)")
#out+=("<tt>$(printf '%s' "${gradrev[@]}")</tt> 凌 $GRADIENT_REVERSE,jgctl gradient '${MBGT}' '${MBG}';$me")
out+=(" 凌 $GRADIENT_REVERSE,jgctl gradient '${MBGT}' '${MBG}';$me")
out+=("<big>凌</big> $GRADIENT_REVERSE,jgctl gradient '${MBGT}' '${MBG}';$me")
#for i in $(pastel gradient "$MBG" "$MBGT" -n 13|pastel format hex)
#do
#grad+=("<span bgcolor='$i'> </span>")
#done
#out+=("<tt>$(printf '%s' "${grad[@]}")</tt> $PRE_GRADIENTS,^pipe(mbgrad menu)")
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)")
out+=("^sep($ITEM)")
out+=("<big>󰛖</big> $FONT [ <b>$menu_font_family $menu_font_size</b> ],^checkout(mitemfont)")
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+=("<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')")
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')")
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+=("$ITEM_BORDER [ <b>$IBORDER</b> ],^checkout(itemborder)")
out+=("$ITEM_RADIUS [ <b>$IRADIUS</b> ],^checkout(itemradius)")
out+=("$I_BORDER [ <b>$IBORDER</b> ] $I_RADIUS [ <b>$IRADIUS</b> ],^checkout(itemborder_radius)")
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 ~/.config/mabox/menu_accents.csv)
out2+=("${out21[@]}")
# Item font submenu
out2+=("^tag(mitemfont)")
@ -264,19 +466,16 @@ else
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")
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
out+=("^sep($SEPARATOR_TITLE)")
out+=("<big>󰛖</big> $FONT [ <b>$menu_sep_font_family $menu_sep_font_size</b> ],^checkout(mtitlefont)")
out2+=("^tag(mtitlefont)")
out2+=("^sep($TITLE_FONT)")
@ -293,17 +492,12 @@ for i in "${sizes[@]}"
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
out2+=("^sep()")
out2+=("<small> Edit favorited fonts list</small>,geany ~/.config/mabox/fonts.list")
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
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')")
@ -315,13 +509,22 @@ case "$SEPHALIGN" in
right) icon="";;
esac
out+=("$icon $SEP_HALIGN [ <b>$SEPHALIGN</b> ],^checkout(sephalign)")
out+=("<big>$icon</big> $SEP_HALIGN [ <b>$SEPHALIGN</b> ],^checkout(sephalign)")
out+=("^sep()")
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')")
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)")
out2+=("^tag(gradientpos)")
out2+=("^sep($GRADIENT_POS <small>$GRADIENT</small>)")
out2+=("$NONE,jgctl menu_gradient_pos none;$me")
out2+=("󰄱 $NONE,jgctl menu_gradient_pos none;$me")
out2+=("^sep()")
out2+=(" $TOP,jgctl menu_gradient_pos top;$me")
out2+=(" $RIGHT,jgctl menu_gradient_pos right;$me")
@ -334,39 +537,32 @@ out2+=(" $BOTTOM_RIGHT,jgctl menu_gradient_pos bottom_right;$me")
out2+=("^tag(sephalign)")
out2+=("^sep($SEP_HALIGN)")
out2+=(" $H_LEFT,jgctl sep_halign left;$me")
out2+=(" $H_CENTER,jgctl sep_halign center;$me")
out2+=(" $H_RIGHT,jgctl sep_halign right;$me")
out2+=("^tag(itemborder)")
[[ "$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)")
out2+=("^sep($ITEM_BORDER)")
out2+=("0,jgctl item_border 0;$me")
[[ "$IBORDER" == 0 ]] && out2+=("<big>綠</big> 0 px,jgctl item_border 0;$me") || out2+=("<big>祿</big> 0 px,jgctl item_border 0;$me")
out2+=("^sep()")
out2+=("1,jgctl item_border 1;$me")
out2+=("2,jgctl item_border 2;$me")
out2+=("^tag(itemradius)")
out2+=("^sep($ITEM_RADIUS)")
out2+=("0,jgctl item_radius 0;$me")
out2+=("^sep()")
out2+=("1,jgctl item_radius 1;$me")
out2+=("2,jgctl item_radius 2;$me")
out2+=("3,jgctl item_radius 3;$me")
out2+=("4,jgctl item_radius 4;$me")
out2+=("5,jgctl item_radius 5;$me")
out2+=("6,jgctl item_radius 6;$me")
[[ "$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")
out2+=("^sep($ITEM_RADIUS)")
[[ "$IRADIUS" == 0 ]] && out2+=("<big>綠</big> 0 px,jgctl item_radius 0;$me") || out2+=("<big>祿</big> 0 px,jgctl item_radius 0;$me")
out2+=("^sep()")
[[ "$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")
out+=("^sep($GENERATEFROMWP)")
out+=("$LIGHTBG,w2theme menu light;$me")
out+=("$DARKBG,w2theme menu dark;$me")
out+=("^sep($MORE_MENU_SETTINGS)")
out+=(" $GLOBAL_MENU_SETTINGS,jgmenusettings-pipe -c")
#out+=("$GLOBAL_MENU_SETTINGS,^pipe(jgmenusettings-pipe -r)")
out+=("^sep()")
if [ -f "${THEMERC}.bak" ]; then
out+=("󰁯 $RESET <i>${jgmenu_theme}</i> $TO_DEFAULT,jgctl reset;$me")
fi
out+=(" $EDIT <i>${jgmenu_theme}</i> $FILE,xdg-open $THEMERC")
### We don't need many menu themes anymore
#out+=(" $SET_RANDOM,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me")
@ -380,7 +576,7 @@ if [[ "$1" == "-s" ]]; then
source "$CNF_FILE"
out+=("^sep()")
out+=(" ⮜⮜⮜ Colorizer,colorizer -s")
out+=(" ${arrow_string_left} Colorizer,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
@ -400,8 +596,8 @@ if [[ "$1" == "-s" ]]; then
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 158))
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs"
@ -421,14 +617,15 @@ JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
@icon,,$((jgtools_padding )),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 120)),270,30,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 158)),$((jgtools_padding + 120)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> Menus</span>
@rect,,$((jgtools_padding + 14)),$((jgtools_padding + 22)),35,80,2,left,top,${MBORDER} ${MBORDERA},${MBG} ${MBGA},
@rect,,$((jgtools_padding + 50)),$((jgtools_padding + 72)),35,60,2,left,top,${MBORDER} ${MBORDERA},${MBG} ${MBGA},
@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},
$(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
@ -436,3 +633,4 @@ EOF
fi
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"
printf '%s\n' "${out3[@]}"

View File

@ -509,7 +509,7 @@ if [[ "$1" == "-s" ]]; then
source $HOME/.config/colorizer/colorizer.conf
out+=("^sep()")
out+=(" ⮜⮜⮜ Colorizer,colorizer -s")
out+=(" ${arrow_string_left} Colorizer,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
@ -530,8 +530,8 @@ JGWIDTH=40
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 158))
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
# WALLPAPER IMAGE
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
@ -552,10 +552,10 @@ fi
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer-ob.png
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 128)),270,22,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 138)),$((jgtools_padding + 124)),130,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> Openbox</span>
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer-ob.png
@rect,,$((jgtools_padding)),$((jgtools_padding + 124)),270,22,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 138)),$((jgtools_padding + 120)),130,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> Openbox</span>
$(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}")
EOF

View File

@ -111,7 +111,8 @@ read MB1 MB2 MBFG<<< "$(grep '^Messages Border ' ${THEMERC})"
if pgrep -f "/usr/bin/python /usr/bin/pyradio" >/dev/null ;then
:
else
out+=("PYRADIO <span bgcolor='#333333' color='#d3d3d3'> <small>W + r</small> </span>,gtk-launch pyradio;sleep 1;$me")
out+=("$START_PYRADIO <span bgcolor='#333333' color='#d3d3d3'> <small>W + r</small> </span>,xdotool key super+r;$me")
#out+=("PYRADIO <span bgcolor='#333333' color='#d3d3d3'> <small>W + r</small> </span>,gtk-launch pyradio;sleep 1;$me")
fi
@ -184,7 +185,7 @@ if [[ "$1" == "-s" ]]; then
source "$CNF_FILE"
out+=("^sep()")
out+=(" ⮜⮜⮜ Colorizer,colorizer -s")
out+=(" ${arrow_string_left} Colorizer,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
@ -203,8 +204,8 @@ if [[ "$1" == "-s" ]]; then
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 158))
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
@ -225,10 +226,10 @@ if [[ "$1" == "-s" ]]; then
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
#@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer-conky.png
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 120)),270,34,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 148)),$((jgtools_padding + 124)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> PyRadio</span>
@rect,,$((jgtools_padding)),$((jgtools_padding + 116)),270,34,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 144)),$((jgtools_padding + 120)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> PyRadio</span>
$(printf '%s\n' "${out[@]}")

View File

@ -898,7 +898,7 @@ contextmenu () {
out+=("^sep()")
out+=("<small>$EDIT_CUSTOMCOMMANDS</small>,conkyctl cmdmenu_edit ${name}")
out+=("^sep()")
out+=(" ⮜⮜⮜ Conky Manager (Colorizer),colorizer-conky -s")
out+=(" ${arrow_string_left} Conky Manager (Colorizer),colorizer-conky -s")
if [[ "$CONKYCFG" =~ "mount_points" ]]; then
out+=("^sep($MOUNTPOINTS)")

View File

@ -233,8 +233,13 @@ color_sel_border () {
sd "color_sel_border.*$" "color_sel_border = $SBORDER $1" ${THEMERC}
;;
esac
read IBOR<<< "$(grep 'item_border' ${THEMERC} | cut -d'=' -f2)"
[[ ${IBOR} == "0" ]] && item_border 1
#read IBOR<<< "$(grep 'item_border' ${THEMERC} | cut -d'=' -f2)"
#[[ ${IBOR} == "0" ]] && item_border 1
}
accent () {
color_sel_bg "${1}"
color_sel_fg "${2}"
color_sel_border "${2}"
}
tweak () {
case "$1" in
@ -257,16 +262,22 @@ tweak () {
opacity color_menu_bg "$2"
opacity color_menu_bg_to "$2"
;;
padding)
sizing)
case "$2" in
tight)
mb-setvar jgtools_padding=0
mb-setvar jgtools_border=0
mb-setvar submenu_spacing=1
;;
normal)
mb-setvar jgtools_padding=8
mb-setvar jgtools_border=0
mb-setvar submenu_spacing=2
;;
wide)
mb-setvar jgtools_padding=20
mb-setvar jgtools_border=4
mb-setvar submenu_spacing=4
;;
esac
;;
@ -281,6 +292,52 @@ opacity () {
sd "$1 .*= $COLOR.*$" "$FUNC = $COLOR $2 $REST" ${THEMERC}
}
savescheme () {
# ask for scheme name
schemename=$(yad --center --width=300 --title "SAVE_AS" --entry --entry-label="LABEL" --entry-text="NAME") || exit 1
echo "${1}${schemename}" >> "$HOME/.config/colorizer/menus/userschemes.csv"
#echo "${1}"
}
applyscheme () {
line=$(awk 'NR == n' n=$1 "$HOME/.config/colorizer/menus/userschemes.csv")
#notify-send.sh "$1" "${line}"
case "$1" in
sys) SCHEMEFILE="/usr/share/mabox-colorizer/colorschemes/menus.csv";;
usr) SCHEMEFILE="$HOME/.config/colorizer/menus/userschemes.csv";;
esac
while IFS="|" read -r mbg mbgt mborder tbg tfg tborder normbg nfg sbg sfg sborder sepfg grad scheme_name
do
mb-setvar jgmenu_theme=MBcolors
color_menu_bg "${mbg}"
color_menu_bg_to "${mbgt}"
color_menu_border "${mborder}"
color_title_bg "${tbg}"
color_title_fg "${tfg}"
color_title_border "${tborder}"
color_norm_bg "${normbg}"
color_norm_fg "${nfg}"
color_sel_bg "${sbg}"
color_sel_fg "${sfg}"
color_sel_border "${sborder}"
color_sep_fg "${sepfg}"
menu_gradient_pos "${grad}"
item_border 0
color_title_bg 100
color_menu_bg 100
color_menu_bg_to 100
color_norm_bg 0
#notify-send.sh "${scheme_name}" "${mbg}"
done < <(awk 'NR == n' n=$2 "$SCHEMEFILE")
}
delscheme() {
sed -i ${1}d "$HOME/.config/colorizer/menus/userschemes.csv"
}
case "$1" in
theme) theme "$2";;
reset) reset ;;
@ -302,7 +359,11 @@ case "$1" in
color_sel_bg) color_sel_bg "$2";;
color_sel_fg) color_sel_fg "$2";;
color_sel_border) color_sel_border "$2";;
accent) accent "$2" "$3";;
tweak) tweak "$2" "$3";;
opacity) opacity "$2" "$3";;
savescheme) savescheme "$2";;
applyscheme) applyscheme "$2" "$3";;
delscheme) delscheme "$2";;
*) : ;;
esac

View File

@ -0,0 +1,45 @@
#!/bin/bash
#: Usage: transparent-cava (height in pixels) (width full or half)
#: example transparent-cava 100 full
#: default is 200px height and half width
CONFIG_DIR="$HOME/.config/terminator"
CONFIG_FILE="$CONFIG_DIR/cava-transparent"
if [ ! -f $CONFIG_FILE ]; then
cat <<EOF > ${CONFIG_FILE}
[global_config]
dbus = False
[keybindings]
[profiles]
[[default]]
allow_bold = False
background_darkness = 0.0
background_type = transparent
cursor_blink = False
cursor_color = "#aaaaaa"
font = Sans 4
show_titlebar = False
scrollbar_position = hidden
scroll_on_keystroke = False
use_custom_command = True
custom_command = cava
use_system_font = False
[layouts]
[plugins]
EOF
fi
CAVA_HEIGHT=${1:-200}
CAVA_WIDTH=${2:-half}
WIDTH=$(wmctrl -d|grep "*"|awk '{print $4}'|cut -d'x' -f1)
HEIGHT=$(wmctrl -d|grep "*"|awk '{print $4}'|cut -d'x' -f2)
TOP=$((HEIGHT-CAVA_HEIGHT))
LEFT=0
if [ "$CAVA_WIDTH" != "full" ];then
LEFT=$((WIDTH/4))
WIDTH=$((WIDTH/2))
else
:
fi
terminator -b -g "${CONFIG_FILE}" -T cavatransparent --geometry "${WIDTH}x${CAVA_HEIGHT}+${LEFT}+${TOP}" -i amarok_playcount

View File

@ -0,0 +1,4 @@
MBG | MBGT |MBORDER| TBG | TFG |TBORDER|NORMBG | NFG | SBG | SFG |SBORDER| SEPFG |GRADIENT|scheme_name
#383838|#222222|#eeeeee|#325a52|#d3d4bf|#579c8e|#2b303b|#dadada|#579c8e|#ffffff|#579c8e|#4f4f4f|none|Istredd
#1E1E1E|#262626|#333333|#383838|#BBBBBB|#222222|#1e1e1e|#9b9b9b|#000000|#FFCC66|#FFCC66|#363636|right|Jaskier
#d3d4bf|#d2cda1|#cdc76d|#cdc76d|#0c1d23|#c6b76b|#d3d4bf|#0c1d23|#a29d62|#060b0a|#c6b76b|#a29d62|top_right|Jaskier Light
1 MBG MBGT MBORDER TBG TFG TBORDER NORMBG NFG SBG SFG SBORDER SEPFG GRADIENT scheme_name
2 #383838 #222222 #eeeeee #325a52 #d3d4bf #579c8e #2b303b #dadada #579c8e #ffffff #579c8e #4f4f4f none Istredd
3 #1E1E1E #262626 #333333 #383838 #BBBBBB #222222 #1e1e1e #9b9b9b #000000 #FFCC66 #FFCC66 #363636 right Jaskier
4 #d3d4bf #d2cda1 #cdc76d #cdc76d #0c1d23 #c6b76b #d3d4bf #0c1d23 #a29d62 #060b0a #c6b76b #a29d62 top_right Jaskier Light