Skip to content

Support macOS in tmux status and bluetooth scripts#19

Merged
RWejlgaard merged 1 commit into
masterfrom
macos-tmux-status
Jun 2, 2026
Merged

Support macOS in tmux status and bluetooth scripts#19
RWejlgaard merged 1 commit into
masterfrom
macos-tmux-status

Conversation

@RWejlgaard

Copy link
Copy Markdown
Owner

Make the tmux status bar and bluetooth menu OS-aware so they work on macOS as well as Linux.

status.sh

Each gadget now branches on uname:

Gadget Linux macOS
wlan rfkill networksetup -getairportpower (auto-detects Wi-Fi device)
bluetooth rfkill system_profiler SPBluetoothDataType
battery acpi pmset -g batt
cpu /proc/stat top -l 1 idle → usage
mem /proc/meminfo memory_pressure free% → used%
temp sensors osx-cpu-temp if installed, else omitted
disk df / df / (already cross-platform)

bluetooth-menu.sh

Refactored so the menu UI is shared and the Bluetooth backend swaps by OS: bluetoothctl on Linux, blueutil on macOS. Device listing is tab-separated internally so names with spaces parse correctly. Missing backend tool shows a clear install hint and exits cleanly.

Notes

  • The macOS bluetooth menu requires blueutil (brew install blueutil). The status bar BT indicator works without it.

Testing

  • Live output verified on macOS: WLAN: ON | BT: ON | BAT: 100% | CPU: 18% | RAM: 53% | DSK: 6%
  • bash -n syntax check passes on both scripts
  • Missing-blueutil path verified

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.
@RWejlgaard RWejlgaard merged commit 1d0769b into master Jun 2, 2026
4 checks passed
@RWejlgaard RWejlgaard deleted the macos-tmux-status branch June 2, 2026 19:08
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