From f1320190786d474b9cd0b8e4b2943efa797c41cd Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Sat, 15 Oct 2022 12:19:57 +0200 Subject: [PATCH] conky contextmenu pick colors fix --- bin/conkyctl | 19 +++++++++++++++---- bin/conkymountpoints.sh | 11 +++++++++++ bin/mbclr | 2 +- 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100755 bin/conkymountpoints.sh diff --git a/bin/conkyctl b/bin/conkyctl index c0e2a31..69c65e0 100755 --- a/bin/conkyctl +++ b/bin/conkyctl @@ -242,6 +242,16 @@ restartone () { makemovableall () { echo "dupa" } +resetcolors () { + transparent_all false + win_bgcolor_all '#142c2c' + draw_borders_all true + stippled_borders_all 0 + default_color_all '#309552' + color0_all '#accdc7' + color1_all '#61c4bc' + color2_all '#61c4bc' +} languages () { case "$LANG" in @@ -335,8 +345,9 @@ single () { filename=${1##*/} name=${filename%%_mb*} title=${name//_/ } + # breaks mbclr color picking from contextmenu, leave it as "colorizer-conky -s" for now if [[ "$2" == "s" ]];then - me="" + me="colorizer-conky -s" else me="colorizer-conky -s" fi @@ -468,7 +479,7 @@ single () { out2+=("$NO,conkyctl transparent false ${1};$me") out2+=("^sep()") out2+=(" $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor '${BACKGROUND}' '$me' ${1})") - + #notify-send.sh "1" "${1}" if [[ "$1" != *"logo_mbcolor"* ]]; then if [[ "$1" != *"quoter_mbcolor"* ]]; then out+=("$FONTS [ $FONT $FONTSIZE ],^checkout(fontsingle)") @@ -580,7 +591,7 @@ contextmenu () { jgmenu_icon_size=0 mkconfigfile - single "$CONKYCFG" "s" + single "${CONKYCFG}" "s" case "$LANG" in pl*) @@ -643,6 +654,6 @@ case "$1" in contextmenu) contextmenu;; makemovableall) makemovableall;; saveposall) saveposall;; - reset) reset ;; + resetcolors) resetcolors ;; *) : ;; esac diff --git a/bin/conkymountpoints.sh b/bin/conkymountpoints.sh new file mode 100755 index 0000000..31b28d5 --- /dev/null +++ b/bin/conkymountpoints.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +getdata () { +df -h | grep -v "boot" | grep '^/dev' | while read DEVICE SIZE USED FREE PERCENT MOUNT +do +[[ "${#MOUNT}" -gt "12" ]] && MOUNTLBL=${MOUNT##*/} || MOUNTLBL=${MOUNT} +echo "$MOUNTLBL\${goto 90}\${color2}\${fs_bar 6,64 $MOUNT}\${color}\${goto 160}$USED\${goto 200}$PERCENT\${alignr}$SIZE" +done +} +echo "\${goto 160}used\${goto 200}%\${alignr}size" +getdata diff --git a/bin/mbclr b/bin/mbclr index 7e95f70..404a2f6 100755 --- a/bin/mbclr +++ b/bin/mbclr @@ -2,7 +2,7 @@ # # mbclr current polecenie funkcja argument backprg [config_file] # mbclr - +#notify-send.sh "mbclr" "${1}\n${2}\n${3}\n${4}\n${5}\n${6}" case "$LANG" in pl*) SELECT_COLOR="Wybierz kolor"