Files
dots/gui/.config/hypr/battery.sh
T
coja a700e23e0a [Sync] adopt unified stow layout from the private repo
Mirrors the private dots tree at 900bdda: one shared base plus per-host
overlays, replacing the old flat .config/ layout (last synced 2026-06-28).

- packages: common/ gui/ wm/ lw/ fl/ + install.sh and bin/ tooling (dotsync,
  reconcile-hyde.sh)
- new README (layout, deploy order, HyDE dependency), plus ToDo.md and
  HYDE-UPDATE.md
- current HyDE waybar rig (layouts/, cava), pi agent extensions, claude/
  config, tmux, presenterm, aichat roles
- drops stale duplicates and generated cruft that should never have been
  tracked: the second top-level .pi/ copy, btop.log, zellij config.kdl.bak,
  fish_variables, nvim codecompanion.lua
- .pi/agent/auth.json is gitignored now; auth.json.example ships instead
- fl/ and wm/ hypr themes/ stay untracked (HyDE-generated per machine, per
  the root .gitignore)
2026-08-12 22:50:18 +02:00

12 lines
401 B
Bash
Executable File

#!/usr/bin/env bash
# Battery readout for the hyprlock label. Prints nothing on machines without a
# battery (wm desktop), so the label just stays empty there.
for bat in /sys/class/power_supply/BAT*; do
[ -r "$bat/capacity" ] || continue
cap=$(<"$bat/capacity")
glyph="󰁹"
[ "$(cat "$bat/status" 2>/dev/null)" = "Charging" ] && glyph="󰂄"
printf '%s %s%%' "$glyph" "$cap"
exit 0
done