mbclr improvements, conkyctl fix

master 0.9.31
Daniel Napora 2023-04-22 20:49:26 +02:00
parent aad57c20d0
commit e7773f0dba
2 changed files with 35 additions and 6 deletions

View File

@ -942,6 +942,12 @@ cmdmenu () {
eval $(xdotool getwindowgeometry --shell ${WINDOW})
hexid=$(wmctrl -lpG | grep ${X} |grep ${Y}|grep ${WIDTH}|grep ${HEIGHT} |cut -d' ' -f1)
CONKYCFG=$(xprop -id ${hexid}|grep WM_COMMAND|cut -d'"' -f6)
# Fix for nonsense Conky context menu when Left Click on Root is not binded to ToogleShowDesktop
if [ ! -f "$CONKYCFG" ]; then
exit 0
fi
filename=${CONKYCFG##*/}
name=${filename%%_mb*}
title=${name//_/ }

View File

@ -25,8 +25,10 @@ case "$LANG" in
PICK_FROM_SCREEN="Pobierz kolor z ekranu"
SELECT_OR_PICK="Wybierz kolor z selektora"
OPACITY="Nieprzezroczystość"
SHADES_OF_CURRENT="odcienie bieżącego"
SHADES_OF="odcienie"
SHADES_OF_CURRENT="Oblicz z bieżącego"
SHADES_OF="Odcienie"
SATURATION="Nasycenie..."
ROTATE_HSL_HUE="Obróć kanał barwy HSL..."
WALLPAPER_COLORS="Kolory z tapety"
ACCENT_COLORS="Popularne kolory akcentu"
LIGHTCOLORS="Jasne kolory..."
@ -37,8 +39,10 @@ case "$LANG" in
PICK_FROM_SCREEN="Pick color from screen"
SELECT_OR_PICK="Select or pick from screen"
OPACITY="Opacity"
SHADES_OF_CURRENT="shades of current"
SHADES_OF="shades of"
SHADES_OF_CURRENT="Calculate from current"
SHADES_OF="Shades of"
SATURATION="Saturation..."
ROTATE_HSL_HUE="Rotate HSL hue channel..."
WALLPAPER_COLORS="Wallpaper colors"
ACCENT_COLORS="Popular accent colors"
LIGHTCOLORS="Light colors..."
@ -121,7 +125,7 @@ out+=("^sep($SELECT_COLOR)")
out+=(" $PICK_FROM_SCREEN,mbclr pixelcolor $2 $3 ${5} ${6}")
out+=(" $SELECT_OR_PICK,mbclr pick $2 $3 ${5} ${6}")
out+=("^sep()")
out+=("<tt><span bgcolor='$1'> </span></tt> $SHADES_OF_CURRENT (<small>$1</small>),^checkout(curshades)")
out+=("$SHADES_OF_CURRENT <tt><span bgcolor='$1'> </span></tt> (<small>$1</small>),^checkout(curshades)")
out+=("^sep($WALLPAPER_COLORS)")
for i in "${wallcolors[@]}"
@ -179,10 +183,29 @@ fi
done
# NOWE
out2+=("^sep(SAT)")
out2+=("^sep($SATURATION)")
for i in 9 8 7 6 5 4 3 2 1; do
clr=$(pastel desaturate 0.$i "${1}" | pastel format hex)
if [ "${clr}" != "${oldclr}" ];then
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span></tt>,$2 $3 '${clr}' ${6};${5}")
oldclr=${clr}
fi
done
for i in 1 2 3 4 5 6 7 8 9; do
clr=$(pastel saturate 0.$i "${1}" | pastel format hex)
if [ "${clr}" != "${oldclr}" ];then
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span></tt>,$2 $3 '${clr}' ${6};${5}")
oldclr=${clr}
fi
done
out2+=("^sep($ROTATE_HSL_HUE)")
for i in {135..15..15};do
clr=$(pastel rotate -- -$i "${1}" |pastel format hex)
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span> <small>-$i°</small></tt>,$2 $3 '${clr}' ${6};${5}")
done
for i in {15..135..15};do
clr=$(pastel rotate $i "${1}" |pastel format hex)
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span> <small>$i°</small></tt>,$2 $3 '${clr}' ${6};${5}")
done
# NOWE