repos / dotfiles

my dotfiles

commit
e3c9b14
parent
329522c
author
Eric Bower
date
2025-10-24 15:18:54 -0400 EDT
chore: status script
3 files changed,  +75, -5
A bin/status.fish
+42, -0
 1@@ -0,0 +1,42 @@
 2+#!/usr/bin/env fish
 3+
 4+function display_status
 5+    # Date and Time
 6+    set -l time_str (date "+%I:%M")
 7+    set -l date_str (date "+%m-%d")
 8+
 9+    # Battery
10+    set -l battery_info "N/A"
11+    set -l battery_paths (/bin/ls /sys/class/power_supply/ 2>/dev/null | /bin/grep '^BAT')
12+    if test -n "$battery_paths"
13+        set -l battery_path $battery_paths[1]
14+        set -l capacity (cat "/sys/class/power_supply/$battery_path/capacity")
15+        set battery_info "$capacity%"
16+    end
17+
18+    # Volume
19+    set -l volume_info "N/A"
20+    set -l volume_output (wpctl get-volume @DEFAULT_AUDIO_SINK@ 2>/dev/null)
21+    if test $status -eq 0
22+        set -l volume_str (echo "$volume_output" | /usr/bin/awk '{print $2}')
23+        set -l volume_percent (math -s0 "$volume_str * 100")
24+        set volume_info "$volume_percent%"
25+    end
26+
27+    # Brightness
28+    set -l brightness_info "N/A"
29+    set -l backlight_dirs (/bin/ls /sys/class/backlight/ 2>/dev/null)
30+    if test -n "$backlight_dirs"
31+        set -l backlight_dir $backlight_dirs[1]
32+        set -l brightness (cat "/sys/class/backlight/$backlight_dir/brightness")
33+        set -l max_brightness (cat "/sys/class/backlight/$backlight_dir/max_brightness")
34+        if test $max_brightness -gt 0
35+            set -l brightness_percent (math -s0 "$brightness * 100 / $max_brightness")
36+            set brightness_info "$brightness_percent%"
37+        end
38+    end
39+
40+    echo "$time_str $date_str | Bat: $battery_info | Vol: $volume_info | Bri: $brightness_info" | xargs -I {} notify-send "status" "{}"
41+end
42+
43+display_status
M dot_config/waybar/config
+10, -5
 1@@ -1,8 +1,8 @@
 2 {
 3 	"layer": "top",
 4   "position": "bottom",
 5-	"modules-left": ["sway/workspaces"],
 6-	"modules-center": ["sway/window"],
 7+	"modules-left": ["dwl/tags", "sway/workspaces"],
 8+	"modules-center": ["dwl/window", "sway/window"],
 9 	"modules-right": ["battery", "backlight", "pulseaudio", "network", "clock"],
10 
11 	"pulseaudio": {
12@@ -16,9 +16,14 @@
13 		}
14 	},
15   "sway/workspaces": {
16-      "disable-scroll": true,
17-      "all-outputs": true,
18-      "format": "{name}"
19+    "disable-scroll": true,
20+    "all-outputs": true,
21+    "format": "{name}"
22+  },
23+  "dwl/tags": {
24+    "num-tags": 9,
25+    "tag-labels": [ "1", "2", "3", "4", "5", "6", "7", "8", "9" ],
26+    "disable-click": false
27   },
28 	"network": {
29 		"tooltip": false,
M dot_config/waybar/style.css
+23, -0
 1@@ -18,6 +18,29 @@ window#waybar.hidden {
 2 #window {
 3 }
 4 
 5+#tags {
 6+	background: #161320;
 7+}
 8+
 9+#tags button {
10+  padding: 0;
11+	color: #B5E8E0;
12+	background: transparent;
13+  border: 2px solid black;
14+}
15+
16+#tags button.focused {
17+	color: #ABE9B3;
18+  border: 2px solid #ABE9B3;
19+}
20+
21+#tags button:hover {
22+	box-shadow: inherit;
23+	text-shadow: inherit;
24+  border: 2px solid #E8A2AF;
25+  color: #E8A2AF;
26+}
27+
28 #workspaces {
29 	background: #161320;
30 }