upd
This commit is contained in:
parent
df900b8961
commit
9ea2e57349
@ -288,7 +288,7 @@ out+=("^sep()")
|
|||||||
out+=(" $COLORIZE,^pipe(randomizer c)")
|
out+=(" $COLORIZE,^pipe(randomizer c)")
|
||||||
out+=("^sep($MODULES)")
|
out+=("^sep($MODULES)")
|
||||||
out+=("$OBTHEME,^pipe(colorizer-ob)")
|
out+=("$OBTHEME,^pipe(colorizer-ob)")
|
||||||
out+=("Conky,^pipe(colorizer-conky)")
|
out+=("Conky Manager,^pipe(colorizer-conky)")
|
||||||
out+=("$MENUPANELS,^pipe(colorizer-menus)")
|
out+=("$MENUPANELS,^pipe(colorizer-menus)")
|
||||||
#out+=("TINT2,^pipe(colorizer-tint2)")
|
#out+=("TINT2,^pipe(colorizer-tint2)")
|
||||||
#out+=("Systray HW monitor,^pipe(colorizer-phwmon)")
|
#out+=("Systray HW monitor,^pipe(colorizer-phwmon)")
|
||||||
|
@ -30,7 +30,7 @@ fi
|
|||||||
|
|
||||||
case "$LANG" in
|
case "$LANG" in
|
||||||
pl*)
|
pl*)
|
||||||
COLORIZECONKY="Conky Colorizer"
|
COLORIZECONKY="Conky Manager"
|
||||||
NO_CONKY_RUNNING="Brak uruchomionych Conky"
|
NO_CONKY_RUNNING="Brak uruchomionych Conky"
|
||||||
RUN_CONKY_SESSION="Uruchom zapisaną sesję"
|
RUN_CONKY_SESSION="Uruchom zapisaną sesję"
|
||||||
MOVEABLEALL="Ustaw wszystkie (<i>przeciągaj</i>)..."
|
MOVEABLEALL="Ustaw wszystkie (<i>przeciągaj</i>)..."
|
||||||
@ -70,7 +70,7 @@ case "$LANG" in
|
|||||||
AREYOUSURE="Czy aby napewno?"
|
AREYOUSURE="Czy aby napewno?"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
COLORIZECONKY="Colorize Conky"
|
COLORIZECONKY="Conky Manager"
|
||||||
NO_CONKY_RUNNING="No Conky running"
|
NO_CONKY_RUNNING="No Conky running"
|
||||||
RUN_CONKY_SESSION="Run Conky session"
|
RUN_CONKY_SESSION="Run Conky session"
|
||||||
MOVEABLEALL="Make moveable all..."
|
MOVEABLEALL="Make moveable all..."
|
||||||
@ -153,15 +153,21 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then
|
|||||||
#done < <(pgrep -af "conky.*mbcolor")
|
#done < <(pgrep -af "conky.*mbcolor")
|
||||||
|
|
||||||
# array with running conkies - only filenames with full path
|
# array with running conkies - only filenames with full path
|
||||||
readarray -t running < <(pgrep -af "conky -c.*mbcolor" | cut -d' ' -f4)
|
readarray -t running < <(pgrep -af "conky -c " | cut -d' ' -f4)
|
||||||
|
|
||||||
#array with all supported conkies
|
#array with all supported conkies
|
||||||
for i in "$CONKYDIR"/*_mbcolor*; do
|
for i in "$CONKYDIR"/*.con* "$CONKYDIR"/**/*.con*; do
|
||||||
|
if [[ "$i" == *mbcolor* ]];then
|
||||||
supported+=("$i")
|
supported+=("$i")
|
||||||
|
else
|
||||||
|
unsupported+=("$i")
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
#array with not started conkies
|
#array with not started conkies
|
||||||
notstarted=($(echo ${running[@]} ${supported[@]} | tr ' ' '\n' | sort | uniq -u))
|
notstarted=($(echo ${running[@]} ${supported[@]} ${unsupported[@]} ${unsupported[@]}| tr ' ' '\n' | sort | uniq -u))
|
||||||
|
notstarted_unsupported=($(echo ${running[@]} ${supported[@]} ${supported[@]} ${unsupported[@]} | tr ' ' '\n' | sort | uniq -u))
|
||||||
|
|
||||||
|
|
||||||
if [[ ${#running[@]} > 0 ]];then
|
if [[ ${#running[@]} > 0 ]];then
|
||||||
out+=("^sep($RUNNING_CONKIES)")
|
out+=("^sep($RUNNING_CONKIES)")
|
||||||
@ -173,7 +179,8 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then
|
|||||||
done
|
done
|
||||||
out+=("^sep()")
|
out+=("^sep()")
|
||||||
out+=("$STOP_ALL (${#running[@]}),conky_toggle;sleep .5;$me")
|
out+=("$STOP_ALL (${#running[@]}),conky_toggle;sleep .5;$me")
|
||||||
if [[ ${#notstarted[@]} > 0 ]];then
|
fi
|
||||||
|
if [[ ${#notstarted[@]} > 0 ]];then
|
||||||
out+=("^sep($MORECONKIES)")
|
out+=("^sep($MORECONKIES)")
|
||||||
out+=("^sep(<small><i>$CLICKTOSTART</i></small>)")
|
out+=("^sep(<small><i>$CLICKTOSTART</i></small>)")
|
||||||
for c in ${notstarted[@]};do
|
for c in ${notstarted[@]};do
|
||||||
@ -181,13 +188,25 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then
|
|||||||
name=${filename%%_mb*}
|
name=${filename%%_mb*}
|
||||||
title=${name//_/ }
|
title=${name//_/ }
|
||||||
out+=("${title^},conkyctl startone ${c};$me")
|
out+=("${title^},conkyctl startone ${c};$me")
|
||||||
done
|
done
|
||||||
if [[ ${#notstarted[@]} > 1 ]];then
|
if [[ ${#notstarted[@]} > 1 ]];then
|
||||||
out+=("^sep()")
|
out+=("^sep()")
|
||||||
out+=("$STARTALL (${#notstarted[@]}),conkyctl startall;$me")
|
out+=("$STARTALL (${#notstarted[@]}),conkyctl startall;$me")
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
if [[ ${#notstarted_unsupported[@]} > 0 ]];then
|
||||||
|
out+=("^sep()")
|
||||||
|
out+=("UNSUPPORTED,^checkout(unsup)")
|
||||||
|
out2+=("^tag(unsup)")
|
||||||
|
out2+=("^sep(UNSUPPORTED)")
|
||||||
|
for c in ${notstarted_unsupported[@]};do
|
||||||
|
filename=${c##*/}
|
||||||
|
name=${filename%%_mb*}
|
||||||
|
title=${name//_/ }
|
||||||
|
out2+=("${title^},conkyctl startone ${c};$me")
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#GLOBAL START
|
#GLOBAL START
|
||||||
out+=("^sep($GLOBALSETTINGS)")
|
out+=("^sep($GLOBALSETTINGS)")
|
||||||
|
@ -193,12 +193,12 @@ out+=("^sep(<i>$GENERATEFROMWP</i>)")
|
|||||||
out+=("$LIGHTBG,w2theme ob light;$me")
|
out+=("$LIGHTBG,w2theme ob light;$me")
|
||||||
out+=("$DARKBG,w2theme ob dark;$me")
|
out+=("$DARKBG,w2theme ob dark;$me")
|
||||||
out+=("^sep($TITLEBAR)")
|
out+=("^sep($TITLEBAR)")
|
||||||
out+=("<tt><span bgcolor='$ABG'> </span></tt> $ACTIVE_BG,^pipe(mbclr '$ABG' obtctl clractivebg '${ACTIVE_BG}' '$me')")
|
out+=("<tt><span bgcolor='$ABG'> </span></tt> $ACTIVE_BG,^pipe(mbclr '$ABG' obtctl clractivebg_only '${ACTIVE_BG}' '$me')")
|
||||||
[[ ! -z "$ABGTO" ]] && out+=("<tt><span bgcolor='$ABG'> </span><span bgcolor='$ABGTO'> </span></tt> $ACTIVE_BG_TO,^pipe(mbclr '$ABGTO' obtctl clractivebgto '${ACTIVE_BG_TO}' '$me')")
|
[[ ! -z "$ABGTO" ]] && out+=("<tt><span bgcolor='$ABG'> </span><span bgcolor='$ABGTO'> </span></tt> $ACTIVE_BG_TO,^pipe(mbclr '$ABGTO' obtctl clractivebgto '${ACTIVE_BG_TO}' '$me')")
|
||||||
out+=("<tt><span bgcolor='$ABG' fgcolor='$AFG'> <b>AbCd</b> </span></tt> $TITLEBAR_TEXT,^checkout(titletext)")
|
out+=("<tt><span bgcolor='$ABG' fgcolor='$AFG'> <b>AbCd</b> </span></tt> $TITLEBAR_TEXT,^checkout(titletext)")
|
||||||
out+=("^sep()")
|
out+=("^sep()")
|
||||||
|
|
||||||
out+=("<tt><span bgcolor='$NBG'> </span></tt> $INACTIVE_BG,^pipe(mbclr '$NBG' obtctl clrnormalbg '${INACTIVE_BG}' '$me')")
|
out+=("<tt><span bgcolor='$NBG'> </span></tt> $INACTIVE_BG,^pipe(mbclr '$NBG' obtctl clrnormalbg_only '${INACTIVE_BG}' '$me')")
|
||||||
[[ ! -z "$ABGTO" ]] && out+=("<tt><span bgcolor='$NBG'> </span><span bgcolor='$NBGTO'> </span></tt> $INACTIVE_BG_TO,^pipe(mbclr '$NBGTO' obtctl clrnormalbgto '${INACTIVE_BG_TO}' '$me')")
|
[[ ! -z "$ABGTO" ]] && out+=("<tt><span bgcolor='$NBG'> </span><span bgcolor='$NBGTO'> </span></tt> $INACTIVE_BG_TO,^pipe(mbclr '$NBGTO' obtctl clrnormalbgto '${INACTIVE_BG_TO}' '$me')")
|
||||||
|
|
||||||
out+=("^sep()")
|
out+=("^sep()")
|
||||||
|
18
bin/conkyctl
18
bin/conkyctl
@ -18,7 +18,9 @@ update_session () {
|
|||||||
while read -r pid b c confpath
|
while read -r pid b c confpath
|
||||||
do
|
do
|
||||||
echo "$b $c ${confpath} & sleep .5" >> ${SESSIONFILE}
|
echo "$b $c ${confpath} & sleep .5" >> ${SESSIONFILE}
|
||||||
done < <(pgrep -af "conky .*mbcolor")
|
done < <(pgrep -af "conky -c ")
|
||||||
|
# Remove duplicates
|
||||||
|
awk -i inplace '!seen[$0]++' ${SESSIONFILE}
|
||||||
}
|
}
|
||||||
|
|
||||||
transparent_all () {
|
transparent_all () {
|
||||||
@ -35,6 +37,7 @@ win_bgcolor_all () {
|
|||||||
win_bgcolor () {
|
win_bgcolor () {
|
||||||
sd "own_window_colour .*=.*$" "own_window_colour = '${1}'," ${2}
|
sd "own_window_colour .*=.*$" "own_window_colour = '${1}'," ${2}
|
||||||
sd "own_window_transparent.*$" "own_window_transparent = false," ${2}
|
sd "own_window_transparent.*$" "own_window_transparent = false," ${2}
|
||||||
|
#notify-send.sh "${2}" aaa
|
||||||
|
|
||||||
}
|
}
|
||||||
draw_borders_all () {
|
draw_borders_all () {
|
||||||
@ -234,7 +237,7 @@ fi
|
|||||||
}
|
}
|
||||||
|
|
||||||
startone () {
|
startone () {
|
||||||
conky -c "${1}"
|
conky -c "${1}" &
|
||||||
update_session
|
update_session
|
||||||
}
|
}
|
||||||
startall () {
|
startall () {
|
||||||
@ -242,7 +245,7 @@ startall () {
|
|||||||
if pgrep -af "conky .*${i}" >/dev/null; then
|
if pgrep -af "conky .*${i}" >/dev/null; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
conky -c "${i}"
|
conky -c "${i}" &
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
update_session
|
update_session
|
||||||
@ -554,7 +557,14 @@ single () {
|
|||||||
|
|
||||||
[[ "$WINTRANS" == false ]] && BG="bgcolor='$WINCLR'" || BG=""
|
[[ "$WINTRANS" == false ]] && BG="bgcolor='$WINCLR'" || BG=""
|
||||||
|
|
||||||
|
if [[ "$filename" == *"mbcolor"* ]];then
|
||||||
out+=("^sep(Conky: [ ${title^} ])")
|
out+=("^sep(Conky: [ ${title^} ])")
|
||||||
|
else
|
||||||
|
out+=("^sep(Conky: [ ${title^} ]")
|
||||||
|
out+=("^sep(<span bgcolor='red'> unsupported!!! </span>)")
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
out+=(" $POSITION,^checkout(position)")
|
out+=(" $POSITION,^checkout(position)")
|
||||||
if [[ "$1" =~ "etwork_mbcolor" ]]; then
|
if [[ "$1" =~ "etwork_mbcolor" ]]; then
|
||||||
out+=("$NOT_WORKING,conkyctl netdevice")
|
out+=("$NOT_WORKING,conkyctl netdevice")
|
||||||
@ -819,7 +829,7 @@ contextmenu () {
|
|||||||
out+=("^sep()")
|
out+=("^sep()")
|
||||||
out+=("<small>$EDIT_CUSTOMCOMMANDS</small>,touch ${CONKYDIR}/menuscripts/${name}.csv;sleep 1;xdg-open ${CONKYDIR}/menuscripts/${name}.csv")
|
out+=("<small>$EDIT_CUSTOMCOMMANDS</small>,touch ${CONKYDIR}/menuscripts/${name}.csv;sleep 1;xdg-open ${CONKYDIR}/menuscripts/${name}.csv")
|
||||||
out+=("^sep()")
|
out+=("^sep()")
|
||||||
out+=(" ⮜⮜⮜ Colorizer Conky,colorizer-conky -s")
|
out+=(" ⮜⮜⮜ Conky Manager (Colorizer),colorizer-conky -s")
|
||||||
|
|
||||||
if [[ "$CONKYCFG" =~ "mount_points" ]]; then
|
if [[ "$CONKYCFG" =~ "mount_points" ]]; then
|
||||||
out+=("^sep($MOUNTPOINTS)")
|
out+=("^sep($MOUNTPOINTS)")
|
||||||
|
19
bin/obtctl
19
bin/obtctl
@ -238,7 +238,20 @@ activehandle () {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
clractivebg_only () {
|
||||||
|
sd "^window.active.title.bg.color:.*$" "window.active.title.bg.color: ${1}" ${THEMERC}
|
||||||
|
# calculate color for title.fg and buttons
|
||||||
|
TITLE_FG=$(pastel textcolor ${1}|pastel format hex)
|
||||||
|
if [[ "${TITLE_FG}" == *"ffffff"* ]];then
|
||||||
|
TITLE_FG="#EEEEEE"
|
||||||
|
else
|
||||||
|
TITLE_FG="#111111"
|
||||||
|
fi
|
||||||
|
sd "\.active.label.text.color:.*$" ".active.label.text.color: ${TITLE_FG}" ${THEMERC}
|
||||||
|
|
||||||
|
# Button colors
|
||||||
|
activebuttonscolors "${TITLE_FG}"
|
||||||
|
}
|
||||||
clractivebg () {
|
clractivebg () {
|
||||||
colorTo=$(pastel darken 0.1 "${1}"|pastel format hex)
|
colorTo=$(pastel darken 0.1 "${1}"|pastel format hex)
|
||||||
#activehandle?
|
#activehandle?
|
||||||
@ -275,6 +288,10 @@ clractivebg () {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clrnormalbg_only () {
|
||||||
|
sd "^window.inactive.title.bg.color:.*$" "window.inactive.title.bg.color: ${1}" ${THEMERC}
|
||||||
|
}
|
||||||
|
|
||||||
clrnormalbg () {
|
clrnormalbg () {
|
||||||
colorTo=$(pastel darken 0.1 "${1}"|pastel format hex)
|
colorTo=$(pastel darken 0.1 "${1}"|pastel format hex)
|
||||||
#normalhandle?
|
#normalhandle?
|
||||||
@ -532,8 +549,10 @@ case "$1" in
|
|||||||
random_gradient) random_gradient;;
|
random_gradient) random_gradient;;
|
||||||
activegradient) activegradient "$2" "$3";;
|
activegradient) activegradient "$2" "$3";;
|
||||||
activehandle) activehandle "$2";;
|
activehandle) activehandle "$2";;
|
||||||
|
clractivebg_only) clractivebg_only "$2";; #ADVANCED - do not calculate colorTo
|
||||||
clractivebg) clractivebg "$2";;
|
clractivebg) clractivebg "$2";;
|
||||||
clractivebgto) clractivebgto "$2";;
|
clractivebgto) clractivebgto "$2";;
|
||||||
|
clrnormalbg_only) clrnormalbg_only "$2";;
|
||||||
clrnormalbg) clrnormalbg "$2";;
|
clrnormalbg) clrnormalbg "$2";;
|
||||||
clrnormalbgto) clrnormalbgto "$2";;
|
clrnormalbgto) clrnormalbgto "$2";;
|
||||||
activetextcolor) activetextcolor "$2";;
|
activetextcolor) activetextcolor "$2";;
|
||||||
|
Loading…
Reference in New Issue
Block a user