mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
polybar: add v4/v6 gateway ping check
This commit is contained in:
parent
30fd0b3024
commit
d54737ee28
@ -46,8 +46,8 @@ line-colour = #f00
|
|||||||
|
|
||||||
modules-left = i3
|
modules-left = i3
|
||||||
modules-center =
|
modules-center =
|
||||||
# modules-right = volume updates weather xkeyboard wlan eth memory cpu xbacklight battery temperature date
|
# modules-right = volume updates weather xkeyboard wlan gateway eth memory cpu xbacklight battery temperature date
|
||||||
modules-right = volume updates weather wlan eth memory cpu xbacklight battery temperature date
|
modules-right = volume updates weather wlan gateway eth memory cpu xbacklight battery temperature date
|
||||||
|
|
||||||
tray-position = right
|
tray-position = right
|
||||||
tray-detached = false
|
tray-detached = false
|
||||||
@ -76,6 +76,13 @@ exec = $XDG_CONFIG_HOME/polybar/weather.sh
|
|||||||
interval = 120
|
interval = 120
|
||||||
click-left = i3-msg exec "i3-sensible-terminal -r floating-term -e 'sh -c \"xdotool getactivewindow windowsize 910 680 && curl wttr.in && sleep infinity\"'"
|
click-left = i3-msg exec "i3-sensible-terminal -r floating-term -e 'sh -c \"xdotool getactivewindow windowsize 910 680 && curl wttr.in && sleep infinity\"'"
|
||||||
|
|
||||||
|
[module/gateway]
|
||||||
|
type = custom/script
|
||||||
|
exec = for v in 4 6; do ip -$v r show default | xargs -l1 sh -c 'fping --retry=1 --quiet --iface "$4" "$2"'; done && echo || echo '%{F#f41f1c}%{F-}'
|
||||||
|
interval = 2
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colours.icon}
|
||||||
|
|
||||||
[module/xkeyboard]
|
[module/xkeyboard]
|
||||||
type = internal/xkeyboard
|
type = internal/xkeyboard
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user