mirror of
https://github.com/ION606/config-backup.git
synced 2026-05-14 22:16:58 +00:00
added battery stuff
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# toggles display mode (percent <-> time) for the battery module
|
||||
state_file="${XDG_CACHE_HOME:-$HOME/.cache}/polybar_battery_mode";
|
||||
current="percent";
|
||||
if [[ -f "$state_file" ]]; then
|
||||
current="$(cat "$state_file" 2>/dev/null | tr -d '\n')";
|
||||
fi
|
||||
if [[ "$current" == "percent" ]]; then
|
||||
echo "time" > "$state_file";
|
||||
else
|
||||
echo "percent" > "$state_file";
|
||||
fi
|
||||
Reference in New Issue
Block a user