eb095dcb47
Includes a Python script, Waybar config snippet, and README with install instructions, usage, and optional CSS styling.
Waybar widget for the fan controller
A custom/fan Waybar module that talks to fan_controller over its Unix
socket (/tmp/fan_controller.sock) — the same protocol as FanController.qml.
Install
-
Copy the script:
mkdir -p ~/.config/waybar/scripts cp waybar/fan.py ~/.config/waybar/scripts/ chmod +x ~/.config/waybar/scripts/fan.py -
Add the
custom/fanentry fromfan.jsonto~/.config/waybar/config.json(merge it into your existing module list, e.g. undermodules-right). -
Restart Waybar.
Usage
-
Status — shows
temp / mode, e.g.48.3° auto 55°or51.0° 75%. Hover for a tooltip with temp, duty, RPM, mode and safe-mode state. -
Left click — cycles
auto → 25% → 50% → 75% → 100% → auto. -
Right click — returns to auto mode.
-
CLI equivalents:
fan.py cycle # same as left click fan.py auto # same as right click fan.py duty 75 # set manual duty (0-100) fan.py setpoint 55 # set auto setpoint (35-85)
Optional styling
The script sets CSS classes fan, plus offline when the controller is
unreachable and safe in safe mode. Example for style.css:
#waybar .fan.offline { background: #505050; }
#waybar .fan.safe { background: #e05050; }
Notes
FAN_CONTROLLER_SOCKenv var overrides the socket path if needed.- Each poll is a short-lived process (5 s interval), matching how the Quickshell widget talks to the daemon — no persistent client required.