macbook m1 files for sway/wayland, initial commit
This commit is contained in:
parent
787584b08f
commit
90f520f8e3
3 changed files with 29 additions and 4 deletions
8
i3status/update_battery.sh
Executable file
8
i3status/update_battery.sh
Executable 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue