repos / dotfiles

my dotfiles

commit
fc418b2
parent
e3c9b14
author
Eric Bower
date
2025-10-24 15:46:16 -0400 EDT
chore: status script
1 files changed,  +13, -1
M bin/status.fish
+13, -1
 1@@ -5,6 +5,18 @@ function display_status
 2     set -l time_str (date "+%I:%M")
 3     set -l date_str (date "+%m-%d")
 4 
 5+    # Network
 6+    set -l network_info "N/A"
 7+    set -l ssid (iwgetid -r) # pacman -S wireless_tools
 8+    if test $status -eq 0
 9+        set network_info "WiFi: $ssid"
10+    else
11+        set -l eth_device (ip route get 1.1.1.1 | awk '{print $5}')
12+        if test -n "$eth_device"
13+            set network_info "Eth: $eth_device"
14+        end
15+    end
16+
17     # Battery
18     set -l battery_info "N/A"
19     set -l battery_paths (/bin/ls /sys/class/power_supply/ 2>/dev/null | /bin/grep '^BAT')
20@@ -36,7 +48,7 @@ function display_status
21         end
22     end
23 
24-    echo "$time_str $date_str | Bat: $battery_info | Vol: $volume_info | Bri: $brightness_info" | xargs -I {} notify-send "status" "{}"
25+    notify-send "Status" "$date_str $time_str | $network_info | Bat: $battery_info | Vol: $volume_info | Bri: $brightness_info"
26 end
27 
28 display_status