Added laptop sway config to common

This commit is contained in:
2026-02-14 19:35:49 +08:00
parent f7f9289a0c
commit e0821c9ed2
3 changed files with 136 additions and 0 deletions

10
common/config/sway/status.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
while :; do
capacity=$(cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo n/a)
temp=$(awk '{printf "%d", $1/1000}' /sys/class/thermal/thermal_zone0/temp 2>/dev/null || echo n/a)
datetime=$(date +'%a %d %b %T')
echo "${capacity}% | ${temp}C | ${datetime}"
sleep 1
done