Skip to content

fix: read macOS battery time from ioreg #20

Merged
RWejlgaard merged 3 commits into
masterfrom
macos-tmux-status
Jun 2, 2026
Merged

fix: read macOS battery time from ioreg #20
RWejlgaard merged 3 commits into
masterfrom
macos-tmux-status

Conversation

@RWejlgaard

Copy link
Copy Markdown
Owner

No description provided.

Make the status bar and bluetooth menu OS-aware so they work on macOS
as well as Linux. status.sh now uses networksetup, system_profiler,
pmset, top, memory_pressure and df on Darwin; temp is omitted unless
osx-cpu-temp is installed. bluetooth-menu.sh swaps bluetoothctl for
blueutil on macOS, sharing the menu UI, and degrades gracefully with
an install hint if the backend tool is missing.
pmset often reports '(no estimate)' for a while after un/plugging.
ioreg's AppleSmartBattery TimeRemaining is populated immediately, so
use it for both percent (raw capacity) and remaining minutes, treating
65535 as the not-yet-calculated sentinel.
@RWejlgaard RWejlgaard merged commit a117535 into master Jun 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant