From b7a2ff355d7734fc19e12befbd53b139661f6c32 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sat, 3 Feb 2024 16:46:43 -0700 Subject: Added xmobar wifi. --- extras/HOME/.xmobarrc | 5 ++++- extras/HOME/.xmonad/xmobar-wifi | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 extras/HOME/.xmonad/xmobar-wifi (limited to 'extras') 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%}{\ \\ + \|\ + \ %wifi% \ \\ - \| %weather% \ + \ %weather% \ \\ \%media%\ \%bluetooth% %bat% %cpu% %memory% %time% ", @@ -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 " " +else + name=${wifi/ */} + echo " $name" +fi -- cgit