aboutsummaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2024-03-15 11:02:29 -0600
committerJosh Rahm <rahm@google.com>2024-03-15 11:02:29 -0600
commit8ddcf499ce97be0aa607677cbca52d810c969684 (patch)
tree2204886b18985849b18e9fd9545971485c2956d1 /extras
parentb1bd3547e761d61f8d0ce96d55ab1fd92ed8ce19 (diff)
downloadrde-wip_mapping_keycodes.tar.gz
rde-wip_mapping_keycodes.tar.bz2
rde-wip_mapping_keycodes.zip
Add some keybindings. Add some manage hooks.wip_mapping_keycodes
Diffstat (limited to 'extras')
-rwxr-xr-xextras/HOME/.xmonad/xmobar-wifi8
1 files changed, 6 insertions, 2 deletions
diff --git a/extras/HOME/.xmonad/xmobar-wifi b/extras/HOME/.xmonad/xmobar-wifi
index bc55725..0422cc5 100755
--- a/extras/HOME/.xmonad/xmobar-wifi
+++ b/extras/HOME/.xmonad/xmobar-wifi
@@ -4,11 +4,15 @@ runtime_dir=$XDG_RUNTIME_DIR/rde/vars/
mkdir -p $runtime_dir
+ethernet="$(nmcli connection show --active | grep "ethernet")"
wifi="$(nmcli connection show --active | grep "wifi")"
-if [[ -z "$wifi" ]] ; then
+if [[ -z "$wifi" && -z "$ethernet" ]] ; then
echo "<fc=#404040> </fc>"
-else
+elif [[ -z "$ethernet" ]] ; then
name=${wifi/ */}
echo "<fc=#ffffff> $name</fc>"
+else
+ devname=$(echo "$ethernet" | awk '{print $4}')
+ echo "<fc=#ffffff> $devname</fc>"
fi