You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Command button type for displaying shell command output #82
I've been using tiny-dfr as a system monitor on my 2018 MacBook Pro — showing CPU/GPU temps, fan speed, RAM usage, etc. on the touch bar. To do this I added a Command button type that runs a shell command periodically and displays the stdout as text.
Interval — refresh interval in seconds (default 5)
Renders like a Text button, just centered stdout output
On error or timeout (3s), displays "—"
Implementation is pretty minimal:
Two new fields on ButtonConfig (command, interval)
A ButtonImage::Command variant storing the command, interval, cached output, and last-run timestamp
Refresh logic in the main loop similar to the existing time/battery refresh
displays_commands flag on FunctionLayer like displays_time/displays_battery
Commands run after privilege drop so they execute as nobody — fine for /proc, /sys, sensors, etc. Execution is synchronous with a 3s timeout so a hung command won't freeze the bar permanently.
I have a working implementation on my fork if there's interest. Wanted to check if this is something you'd consider merging before cleaning it up into a proper PR.
Wanted to check if this is something you'd consider merging before cleaning it up into a proper PR.
I am not opposed to displaying of system information on the buttons (see #75), but running a shell command is not the right approach, as it is very inefficient and the constant wakeups aren't great for battery life.
This issue was drafted with Claude Code.
The next time, send me the raw prompt instead of using this thing, i can't be bothered to read things one can't be bothered to write.
Reacted by Chris, Jeshua Lin and Jacopo Philip Moretti
Activity
WhatAmISupposedToPutHere commentedon Mar 5, 2026
I am not opposed to displaying of system information on the buttons (see #75), but running a shell command is not the right approach, as it is very inefficient and the constant wakeups aren't great for battery life.
The next time, send me the raw prompt instead of using this thing, i can't be bothered to read things one can't be bothered to write.