macbook m1 files for sway/wayland, initial commit

This commit is contained in:
markmental 2025-11-16 17:23:28 -05:00
commit 90f520f8e3
3 changed files with 29 additions and 4 deletions

8
i3status/update_battery.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
PERCENT=$(upower -i /org/freedesktop/UPower/devices/battery_macsmc_battery \
| awk -F: '/percentage/ {gsub(/ /,"",$2); print $2}')
# fallback so i3status never crashes
echo "${PERCENT:-N/A}" > /tmp/battery_percent