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

View file

@ -5,11 +5,21 @@ general {
# Order of modules in the bar
order += "read_file hostname"
order += "read_file battery"
order += "disk /"
order += "memory"
order += "load"
order += "tztime local"
# battery usage
read_file battery {
path = "/tmp/battery_percent"
format = "🔋 %content"
}
# Hostname shown as 🖥 debi3.lan
read_file hostname {
path = "/home/mrkmntal/.hostname_lan"

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