diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2024-02-03 16:46:43 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2024-02-03 16:46:43 -0700 |
| commit | b7a2ff355d7734fc19e12befbd53b139661f6c32 (patch) | |
| tree | cebf61ea81ac578363f5cc862d120407d1e88b90 | |
| parent | e563fb7dfe0c43cec679deaae82bc0a1e2aa056e (diff) | |
| download | rde-b7a2ff355d7734fc19e12befbd53b139661f6c32.tar.gz rde-b7a2ff355d7734fc19e12befbd53b139661f6c32.tar.bz2 rde-b7a2ff355d7734fc19e12befbd53b139661f6c32.zip | |
Added xmobar wifi.
| -rw-r--r-- | extras/HOME/.xmobarrc | 5 | ||||
| -rwxr-xr-x | extras/HOME/.xmonad/xmobar-wifi | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/extras/HOME/.xmobarrc b/extras/HOME/.xmobarrc index 674adc6..3367918 100644 --- a/extras/HOME/.xmobarrc +++ b/extras/HOME/.xmobarrc @@ -33,8 +33,10 @@ Config " %logo% \ \%UnsafeStdinReader%}{\ \<fc=#404040>\ + \<fc=#888888>|</fc>\ + \ %wifi% \ \<action=alacritty -t 'Floating Term' -e sh -c 'curl wttr.in ; read i'>\ - \<fc=#888888>|</fc> %weather% \ + \ %weather% \ \</action>\ \</fc><fc=#a0a0a0>%media%</fc>\ \%bluetooth% %bat%<fn=3> %cpu% %memory%<fc=#8888ff> %time%</fc></fn> ", @@ -86,6 +88,7 @@ Config Run Com ".xmonad/xmobar-logo" [] "logo" 0, Run Com "uname" ["-r"] "uname" 0, Run Com ".xmonad/xmobar-bluetooth" [] "bluetooth" 50, + Run Com ".xmonad/xmobar-wifi" [] "wifi" 50, Run Com ".xmonad/xmobar-battery" [] "bat" 20 ] } diff --git a/extras/HOME/.xmonad/xmobar-wifi b/extras/HOME/.xmonad/xmobar-wifi new file mode 100755 index 0000000..bc55725 --- /dev/null +++ b/extras/HOME/.xmonad/xmobar-wifi @@ -0,0 +1,14 @@ +#!/bin/bash + +runtime_dir=$XDG_RUNTIME_DIR/rde/vars/ +mkdir -p $runtime_dir + + +wifi="$(nmcli connection show --active | grep "wifi")" + +if [[ -z "$wifi" ]] ; then + echo "<fc=#404040> </fc>" +else + name=${wifi/ */} + echo "<fc=#ffffff> $name</fc>" +fi |