conky module update
This commit is contained in:
parent
b39ca72853
commit
37a0fcb5e4
@ -221,7 +221,7 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then
|
|||||||
out2+=("$YES,rm $BASECONKY;$me")
|
out2+=("$YES,rm $BASECONKY;$me")
|
||||||
out2+=("^tag(resetcolors)")
|
out2+=("^tag(resetcolors)")
|
||||||
out2+=("^sep($AREYOUSURE)")
|
out2+=("^sep($AREYOUSURE)")
|
||||||
out2+=("$YES,conkyctl resetcolors;$me")
|
out2+=("$YES,conkyctl resetcolorsall;$me")
|
||||||
|
|
||||||
else
|
else
|
||||||
out+=("^sep(No supported Conky running)")
|
out+=("^sep(No supported Conky running)")
|
||||||
|
27
bin/conky_getactiveinet.sh
Executable file
27
bin/conky_getactiveinet.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CFGFILE="$HOME/.config/conky/Network_mbcolor.conkyrc"
|
||||||
|
rm /tmp/xx*
|
||||||
|
cd /tmp
|
||||||
|
|
||||||
|
csplit -s ${CFGFILE} /conky.text/
|
||||||
|
|
||||||
|
|
||||||
|
#IFACE=$(ip route get 8.8.8.8 | awk -- '{printf $5}')
|
||||||
|
IFACE=$(ip route get 8.8.8.8 | awk '{for(i=1; i<NF; i++) {if($i=="dev") dev=i+1} print $dev}')
|
||||||
|
|
||||||
|
|
||||||
|
cat <<EOF >> /tmp/xx00
|
||||||
|
conky.text = [[
|
||||||
|
\${color}NETWORK
|
||||||
|
\${color}Device \${alignr}$IFACE
|
||||||
|
\${color}IP \${alignr}\${addr $IFACE}
|
||||||
|
\${color}Download \$color0\${downspeed $IFACE} \${alignr}\${color0}\${upspeed $IFACE}\${color} Upload
|
||||||
|
\${color2}\${downspeedgraph $IFACE 30,100 -t} \${alignr} \${upspeedgraph $IFACE 30,100 -t}
|
||||||
|
\${color}Total Down \${color0}\${totaldown $IFACE} \${alignr}\${color0}\${totalup $IFACE}\${color} Total Up
|
||||||
|
\${color}\${hr}
|
||||||
|
\${execi 30 netstat -ept | grep ESTAB | awk '{print \$9}' | cut -d/ -f2 | sort | uniq -c | sort -nr}
|
||||||
|
]];
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat /tmp/xx00 > ${CFGFILE}
|
126
bin/conkyctl
126
bin/conkyctl
@ -239,18 +239,47 @@ restartone () {
|
|||||||
kill ${1}
|
kill ${1}
|
||||||
startone ${1}
|
startone ${1}
|
||||||
}
|
}
|
||||||
makemovableall () {
|
makemoveableall () {
|
||||||
echo "dupa"
|
sd "own_window_type.*$" "own_window_type = 'normal'," ${CONKYDIR}/*mbcolor.conkyrc
|
||||||
|
cmd=(
|
||||||
|
yad --center --borders=20
|
||||||
|
--title="Move Conkies where you want"
|
||||||
|
--text="Move Conkies to desired locations now...\n Hold <b>Alt</b> and drag Conkies one by one.\n"
|
||||||
|
--button="Cancel":1
|
||||||
|
--button="Save new positions":0
|
||||||
|
)
|
||||||
|
"${cmd[@]}"
|
||||||
|
exval=$?
|
||||||
|
case $exval in
|
||||||
|
1) makedesktoptypeall;;
|
||||||
|
0) saveposall;;
|
||||||
|
252) makedesktoptypeall;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
resetcolors () {
|
saveposall () {
|
||||||
|
# save new positions here
|
||||||
|
makedesktoptypeall
|
||||||
|
}
|
||||||
|
makedesktoptypeall () {
|
||||||
|
sd "own_window_type.*$" "own_window_type = 'desktop'," ${CONKYDIR}/*mbcolor.conkyrc
|
||||||
|
}
|
||||||
|
resetcolorsall () {
|
||||||
transparent_all false
|
transparent_all false
|
||||||
win_bgcolor_all '#142c2c'
|
win_bgcolor_all '#142c2c'
|
||||||
draw_borders_all true
|
#draw_borders_all true
|
||||||
stippled_borders_all 0
|
#stippled_borders_all 0
|
||||||
default_color_all '#309552'
|
default_color_all '#309552'
|
||||||
color0_all '#accdc7'
|
color0_all '#accdc7'
|
||||||
color1_all '#61c4bc'
|
color1_all '#61c4bc'
|
||||||
color2_all '#61c4bc'
|
color2_all '#3dd425'
|
||||||
|
}
|
||||||
|
resetcolorsone () {
|
||||||
|
transparent false "${1}"
|
||||||
|
win_bgcolor '#142c2c' "${1}"
|
||||||
|
default_color '#309552' "${1}"
|
||||||
|
color0 '#accdc7' "${1}"
|
||||||
|
color1 '#61c4bc' "${1}"
|
||||||
|
color2 '#3dd425' "${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
languages () {
|
languages () {
|
||||||
@ -276,6 +305,11 @@ languages () {
|
|||||||
COLOR_1="Kolor 1 <small>(większy tekst)</small>"
|
COLOR_1="Kolor 1 <small>(większy tekst)</small>"
|
||||||
COLOR_2="Kolor 2 <small>(pasek/graf)</small>"
|
COLOR_2="Kolor 2 <small>(pasek/graf)</small>"
|
||||||
BACKGROUND="Kolor tła"
|
BACKGROUND="Kolor tła"
|
||||||
|
REGENERATE="(Re)Generuj kolory"
|
||||||
|
LIGHTBG="<b>light</b> - jasne tło"
|
||||||
|
DARKBG="<b>dark</b> - ciemne tło"
|
||||||
|
RESETCOLORS="Przywróć domyślne kolory"
|
||||||
|
GENFROMWP="Generuj z kolorów tapety"
|
||||||
TRANSPARENT="Przezroczyste?"
|
TRANSPARENT="Przezroczyste?"
|
||||||
YES="Tak"
|
YES="Tak"
|
||||||
NO="Nie"
|
NO="Nie"
|
||||||
@ -288,6 +322,7 @@ languages () {
|
|||||||
DRAW="Rysuj"
|
DRAW="Rysuj"
|
||||||
BORDERS="Obramowanie"
|
BORDERS="Obramowanie"
|
||||||
EDIT="Edytuj plik"
|
EDIT="Edytuj plik"
|
||||||
|
RELOAD="Przeładuj"
|
||||||
KILL="Zabij"
|
KILL="Zabij"
|
||||||
LOGOSIZE="Rozmiar logo"
|
LOGOSIZE="Rozmiar logo"
|
||||||
SMALL="Małe"
|
SMALL="Małe"
|
||||||
@ -318,6 +353,11 @@ languages () {
|
|||||||
COLOR_1="Color 1 <small>(bigger text)</small>"
|
COLOR_1="Color 1 <small>(bigger text)</small>"
|
||||||
COLOR_2="Color 2 <small>(bars/graphs)</small>"
|
COLOR_2="Color 2 <small>(bars/graphs)</small>"
|
||||||
BACKGROUND="Background color"
|
BACKGROUND="Background color"
|
||||||
|
REGENERATE="(Re)Generate colors"
|
||||||
|
LIGHTBG="<b>light</b>"
|
||||||
|
DARKBG="<b>dark</b>"
|
||||||
|
RESETCOLORS="Restore default colors"
|
||||||
|
GENFROMWP="Generate from wallpaper"
|
||||||
TRANSPARENT="Transparent?"
|
TRANSPARENT="Transparent?"
|
||||||
YES="Yes"
|
YES="Yes"
|
||||||
NO="No"
|
NO="No"
|
||||||
@ -330,6 +370,7 @@ languages () {
|
|||||||
DRAW="Deaw"
|
DRAW="Deaw"
|
||||||
BORDERS="Borders"
|
BORDERS="Borders"
|
||||||
EDIT="Edit file"
|
EDIT="Edit file"
|
||||||
|
RELOAD="Reload"
|
||||||
KILL="Kill"
|
KILL="Kill"
|
||||||
LOGOSIZE="Logo size"
|
LOGOSIZE="Logo size"
|
||||||
SMALL="Small"
|
SMALL="Small"
|
||||||
@ -388,32 +429,35 @@ single () {
|
|||||||
if [[ "$1" =~ "etwork_mbcolor" ]]; then
|
if [[ "$1" =~ "etwork_mbcolor" ]]; then
|
||||||
out+=("$NOT_WORKING,conkyctl netdevice")
|
out+=("$NOT_WORKING,conkyctl netdevice")
|
||||||
fi
|
fi
|
||||||
out+=("^sep($POSITION)")
|
#out+=("^sep($POSITION)")
|
||||||
out+=(" $MARKNEWPOS,conkyctl setpos ${1};$me")
|
out+=(" $POSITION,^checkout(position)")
|
||||||
out+=("^sep()")
|
out2+=("^tag(position)")
|
||||||
out+=("$ALIGNMENT [ <b>$POS</b> ],^checkout(pos)")
|
|
||||||
out2+=("^tag(pos)")
|
|
||||||
out2+=("^sep($POSITION)")
|
out2+=("^sep($POSITION)")
|
||||||
out2+=(" $TOPLEFT,conkyctl pos top_left ${1};$me")
|
out2+=(" $MARKNEWPOS,conkyctl setpos ${1};$me")
|
||||||
out2+=(" $TOP,conkyctl pos top_middle ${1};$me")
|
out2+=("^sep()")
|
||||||
out2+=(" $TOPRIGHT,conkyctl pos top_right ${1};$me")
|
out2+=("$ALIGNMENT [ <b>$POS</b> ],^checkout(posi)")
|
||||||
out2+=(" $LEFT,conkyctl pos middle_left ${1};$me")
|
out3+=("^tag(posi)")
|
||||||
out2+=("$CENTER,conkyctl pos middle_middle ${1};$me")
|
out3+=("^sep($POSITION)")
|
||||||
out2+=(" $RIGHT,conkyctl pos middle_right ${1};$me")
|
out3+=(" $TOPLEFT,conkyctl pos top_left ${1};$me")
|
||||||
out2+=(" $BOTTOMLEFT,conkyctl pos bottom_left ${1};$me")
|
out3+=(" $TOP,conkyctl pos top_middle ${1};$me")
|
||||||
out2+=(" $BOTTOM,conkyctl pos bottom_middle ${1};$me")
|
out3+=(" $TOPRIGHT,conkyctl pos top_right ${1};$me")
|
||||||
out2+=(" $BOTTOMRIGHT,conkyctl pos bottom_right ${1};$me")
|
out3+=(" $LEFT,conkyctl pos middle_left ${1};$me")
|
||||||
out+=("$HORIZONTAL_GAP [ <b>$GAPX</b> ],^checkout(gapx)")
|
out3+=("$CENTER,conkyctl pos middle_middle ${1};$me")
|
||||||
out2+=("^tag(gapx)")
|
out3+=(" $RIGHT,conkyctl pos middle_right ${1};$me")
|
||||||
out2+=("^sep($HORIZONTAL_GAP)")
|
out3+=(" $BOTTOMLEFT,conkyctl pos bottom_left ${1};$me")
|
||||||
|
out3+=(" $BOTTOM,conkyctl pos bottom_middle ${1};$me")
|
||||||
|
out3+=(" $BOTTOMRIGHT,conkyctl pos bottom_right ${1};$me")
|
||||||
|
out2+=("$HORIZONTAL_GAP [ <b>$GAPX</b> ],^checkout(gapx)")
|
||||||
|
out3+=("^tag(gapx)")
|
||||||
|
out3+=("^sep($HORIZONTAL_GAP)")
|
||||||
for i in 0 10 20 30 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360; do
|
for i in 0 10 20 30 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360; do
|
||||||
out2+=("${i},conkyctl gap_x ${i} ${1};$me")
|
out3+=("${i},conkyctl gap_x ${i} ${1};$me")
|
||||||
done
|
done
|
||||||
out+=("$VERTICAL_GAP [ <b>$GAPY</b> ],^checkout(gapy)")
|
out2+=("$VERTICAL_GAP [ <b>$GAPY</b> ],^checkout(gapy)")
|
||||||
out2+=("^tag(gapy)")
|
out3+=("^tag(gapy)")
|
||||||
out2+=("^sep($VERTICAL_GAP)")
|
out3+=("^sep($VERTICAL_GAP)")
|
||||||
for i in 0 10 20 30 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360; do
|
for i in 0 10 20 30 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360; do
|
||||||
out2+=("${i},conkyctl gap_y ${i} ${1};$me")
|
out3+=("${i},conkyctl gap_y ${i} ${1};$me")
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$1" =~ "logo_mbcolor" ]]; then
|
if [[ "$1" =~ "logo_mbcolor" ]]; then
|
||||||
@ -478,6 +522,16 @@ single () {
|
|||||||
out+=("<small><span>transparent </span></small> $BACKGROUND,^checkout(transsingle)")
|
out+=("<small><span>transparent </span></small> $BACKGROUND,^checkout(transsingle)")
|
||||||
fi
|
fi
|
||||||
out+=("^sep()")
|
out+=("^sep()")
|
||||||
|
if [[ "$1" != *"logo_mbcolor"* ]]; then
|
||||||
|
out+=("$REGENERATE,^checkout(regensingle)")
|
||||||
|
out2+=("^tag(regensingle)")
|
||||||
|
out2+=("^sep($REGENERATE)")
|
||||||
|
out2+=("$RESETCOLORS,conkyctl resetcolorsone ${1}")
|
||||||
|
out2+=("^sep($GENFROMWP)")
|
||||||
|
out2+=("$LIGHTBG,w2theme conkyone light ${1}")
|
||||||
|
out2+=("$DARKBG,w2theme conkyone dark ${1}")
|
||||||
|
out+=("^sep()")
|
||||||
|
fi
|
||||||
out2+=("^tag(transsingle)")
|
out2+=("^tag(transsingle)")
|
||||||
out2+=("^sep($TRANSPARENT)")
|
out2+=("^sep($TRANSPARENT)")
|
||||||
out2+=("$YES,conkyctl transparent true ${1};$me")
|
out2+=("$YES,conkyctl transparent true ${1};$me")
|
||||||
@ -520,6 +574,7 @@ single () {
|
|||||||
|
|
||||||
out+=("^sep()")
|
out+=("^sep()")
|
||||||
out+=(" $EDIT ${title^},xdg-open ${1}")
|
out+=(" $EDIT ${title^},xdg-open ${1}")
|
||||||
|
out+=(" $RELOAD ${title^},conkyctl restartone ${1}")
|
||||||
out+=("^sep()")
|
out+=("^sep()")
|
||||||
out+=(" $KILL ${title^},conkyctl kill ${1##*/};${me}")
|
out+=(" $KILL ${title^},conkyctl kill ${1##*/};${me}")
|
||||||
}
|
}
|
||||||
@ -527,6 +582,7 @@ pipemenu () {
|
|||||||
single "$1"
|
single "$1"
|
||||||
printf '%s\n' "${out[@]}"
|
printf '%s\n' "${out[@]}"
|
||||||
printf '%s\n' "${out2[@]}"
|
printf '%s\n' "${out2[@]}"
|
||||||
|
printf '%s\n' "${out3[@]}"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -618,6 +674,7 @@ ${CUSTOMCOMMANDS}
|
|||||||
$(printf '%s\n' "${out[@]}")
|
$(printf '%s\n' "${out[@]}")
|
||||||
⮜⮜⮜ Colorizer Conky,colorizer-conky -s
|
⮜⮜⮜ Colorizer Conky,colorizer-conky -s
|
||||||
$(printf '%s\n' "${out2[@]}")
|
$(printf '%s\n' "${out2[@]}")
|
||||||
|
$(printf '%s\n' "${out3[@]}")
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
cat <<EOF > ${MENU_ITEMS}
|
cat <<EOF > ${MENU_ITEMS}
|
||||||
@ -628,6 +685,7 @@ $(printf '%s\n' "${out[@]}")
|
|||||||
${CUSTOMCOMMANDS}
|
${CUSTOMCOMMANDS}
|
||||||
<small>$EDIT_CUSTOMCOMMANDS</small>,touch ~/.config/mabox/${name}.csv;sleep 1;xdg-open ~/.config/mabox/${name}.csv
|
<small>$EDIT_CUSTOMCOMMANDS</small>,touch ~/.config/mabox/${name}.csv;sleep 1;xdg-open ~/.config/mabox/${name}.csv
|
||||||
$(printf '%s\n' "${out2[@]}")
|
$(printf '%s\n' "${out2[@]}")
|
||||||
|
$(printf '%s\n' "${out3[@]}")
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -639,6 +697,7 @@ $(printf '%s\n' "${out[@]}")
|
|||||||
${CUSTOMCOMMANDS}
|
${CUSTOMCOMMANDS}
|
||||||
<small>$EDIT_CUSTOMCOMMANDS</small>,touch ~/.config/mabox/${name}.csv;sleep 1;xdg-open ~/.config/mabox/${name}.csv
|
<small>$EDIT_CUSTOMCOMMANDS</small>,touch ~/.config/mabox/${name}.csv;sleep 1;xdg-open ~/.config/mabox/${name}.csv
|
||||||
$(printf '%s\n' "${out2[@]}")
|
$(printf '%s\n' "${out2[@]}")
|
||||||
|
$(printf '%s\n' "${out3[@]}")
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -672,12 +731,12 @@ esac
|
|||||||
cat <<EOF >> /tmp/xx00
|
cat <<EOF >> /tmp/xx00
|
||||||
conky.text = [[
|
conky.text = [[
|
||||||
\${color}$NETWORK
|
\${color}$NETWORK
|
||||||
\${color}$DEVICE \${alignr}$IFACE
|
\${color}$DEVICE \${alignr}\${color0}$IFACE
|
||||||
\${color}$IP \${alignr}\${addr $IFACE}
|
\${color}$IP \${alignr}\${color0}\${addr $IFACE}
|
||||||
\${color}$DOWNLOAD \$color0\${downspeed $IFACE} \${alignr}\${color0}\${upspeed $IFACE}\${color} Upload
|
\${color}$DOWNLOAD \$color0\${downspeed $IFACE} \${alignr}\${color0}\${upspeed $IFACE}\${color} Upload
|
||||||
\${color2}\${downspeedgraph $IFACE 30,100 -t} \${alignr} \${upspeedgraph $IFACE 30,100 -t}
|
\${color2}\${downspeedgraph $IFACE 30,100 -t} \${alignr} \${upspeedgraph $IFACE 30,100 -t}
|
||||||
\${color}Total Down \${color0}\${totaldown $IFACE} \${alignr}\${color0}\${totalup $IFACE}\${color} Total Up
|
\${color}Total Down \${color0}\${totaldown $IFACE} \${alignr}\${color0}\${totalup $IFACE}\${color} Total Up
|
||||||
\${color}\${hr}
|
\${color0}\${hr}
|
||||||
\${execi 30 netstat -ept | grep ESTAB | awk '{print \$9}' | cut -d/ -f2 | sort | uniq -c | sort -nr}
|
\${execi 30 netstat -ept | grep ESTAB | awk '{print \$9}' | cut -d/ -f2 | sort | uniq -c | sort -nr}
|
||||||
]];
|
]];
|
||||||
EOF
|
EOF
|
||||||
@ -721,9 +780,10 @@ case "$1" in
|
|||||||
kill) kill "$2";;
|
kill) kill "$2";;
|
||||||
restartone) restartone "$2";;
|
restartone) restartone "$2";;
|
||||||
contextmenu) contextmenu;;
|
contextmenu) contextmenu;;
|
||||||
makemovableall) makemovableall;;
|
makemoveableall) makemoveableall;;
|
||||||
saveposall) saveposall;;
|
saveposall) saveposall;;
|
||||||
resetcolors) resetcolors ;;
|
resetcolorsall) resetcolorsall ;;
|
||||||
|
resetcolorsone) resetcolorsone "$2";;
|
||||||
netdevice) netdevice ;;
|
netdevice) netdevice ;;
|
||||||
*) : ;;
|
*) : ;;
|
||||||
esac
|
esac
|
||||||
|
@ -11,7 +11,7 @@ case "$LANG" in
|
|||||||
pl*)
|
pl*)
|
||||||
MOUNTPOINTS="Punkty montowania"
|
MOUNTPOINTS="Punkty montowania"
|
||||||
USED="użyte"
|
USED="użyte"
|
||||||
SIZE="rozmir"
|
SIZE="rozmiar"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
MOUNTPOINTS="MOUNT POINTS"
|
MOUNTPOINTS="MOUNT POINTS"
|
||||||
|
20
bin/w2theme
20
bin/w2theme
@ -77,6 +77,25 @@ conky_colors() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
conky_colorsone () {
|
||||||
|
source ~/.config/colorizer/colorizer.conf
|
||||||
|
case "$1" in
|
||||||
|
dark) #dark bg
|
||||||
|
conkyctl win_bgcolor "${w[0]}" "${2}"
|
||||||
|
conkyctl default_color "${w[-1]}" "${2}"
|
||||||
|
conkyctl color0 "${w[-3]}" "${2}"
|
||||||
|
conkyctl color1 "${w[-4]}" "${2}"
|
||||||
|
conkyctl color2 "${w[-5]}" "${2}"
|
||||||
|
;;
|
||||||
|
*) #light bg
|
||||||
|
conkyctl win_bgcolor "${w[-1]}" "${2}"
|
||||||
|
conkyctl default_color "${w[0]}" "${2}"
|
||||||
|
conkyctl color0 "${w[2]}" "${2}"
|
||||||
|
conkyctl color1 "${w[4]}" "${2}"
|
||||||
|
conkyctl color2 "${w[6]}" "${2}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
pyradio_theme() {
|
pyradio_theme() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
dark) #dark bg
|
dark) #dark bg
|
||||||
@ -295,6 +314,7 @@ case "$1" in
|
|||||||
ob) obtheme "$2";;
|
ob) obtheme "$2";;
|
||||||
menu) menu_theme "$2";;
|
menu) menu_theme "$2";;
|
||||||
conky) conky_colors "$2";;
|
conky) conky_colors "$2";;
|
||||||
|
conkyone) conky_colorsone "$2" "$3";;
|
||||||
pyradio) pyradio_theme "$2";;
|
pyradio) pyradio_theme "$2";;
|
||||||
accent) accent "$2";;
|
accent) accent "$2";;
|
||||||
gradient) gradient "$2" "$3";;
|
gradient) gradient "$2" "$3";;
|
||||||
|
Loading…
Reference in New Issue
Block a user