wobmon watches the volume of the default WirePlumber audio sink and sends
it to wob as an integer from 0 to 100.
It is meant to run in the background, so changing the volume with the normal
media keys (or anything else) automatically displays the wob bar without
extra Hyprland keybind configuration.
- PipeWire + WirePlumber (
pw-dumpandwpctlinPATH) - Python 3
- wob running and listening on its FIFO/socket
wpctl is only needed for the --poll fallback.
$ ./wobmonThe wob socket path is resolved in this order:
- the command-line argument:
./wobmon /path/to/wob.sock(or./wobmon --socket /path/to/wob.sock) $WOBSOCK$XDG_RUNTIME_DIR/wob.sock
Other options:
$ ./wobmon --help
$ ./wobmon --verbose # log every value that is sent
$ ./wobmon --mute-as-zero # show 0 while the sink is muted
$ ./wobmon --skip-initial # don't show the volume at startup
$ ./wobmon --poll --interval 0.05 # poll wpctl instead of using pw-dumpBy default wobmon reads pw-dump --monitor events, so it reacts immediately
and does not spawn wpctl for every volume change. It automatically follows
changes to the default sink.
Download the wobmon executable and place it somewhere in your path.
Add one line to your Hyprland config:
exec-once = wobmonwob itself still has to be started (for example as a systemd socket-activated user service). wobmon does not need any volume keybinds.
A systemd user service is also fine:
[Unit]
Description=Show WirePlumber volume in wob
After=graphical-session.target
PartOf=graphical-session.target
[Service]
ExecStart=%h/.local/bin/wobmon
Restart=on-failure
[Install]
WantedBy=graphical-session.targetThe repository is a flake with these outputs:
packages.<system>.default/packages.<system>.wobmonoverlays.defaulthomeModules.default(alias:homeModules.wobmon)
Add the flake input and make its nixpkgs follow yours:
{
inputs.wobmon.url = "github:sstark/wobmon";
inputs.wobmon.inputs.nixpkgs.follows = "nixpkgs";
}Import the module and enable the service:
{
imports = [ inputs.wobmon.homeModules.default ];
services.wobmon = {
enable = true;
# Defaults:
# socket = "%t/wob.sock";
# wobUnit = "wob.service";
# muteAsZero = false;
# skipInitial = false;
# poll = false;
# interval = null;
# extraArgs = [ ];
};
}The module creates systemd.user.services.wobmon with this shape:
[Unit]
After=graphical-session.target wob.service
BindsTo=wob.service
PartOf=graphical-session.target
[Service]
ExecStart=.../bin/wobmon
Environment=WOBSOCK=%t/wob.sock
Restart=on-failure
RestartSec=2
[Install]
WantedBy=graphical-session.targetSet wobUnit = null if you do not want the module to bind wobmon to your wob
service. Set socket = null to let wobmon use its own socket resolution.
| Option | Default | Description |
|---|---|---|
services.wobmon.enable |
false |
Enable the systemd user service. |
services.wobmon.package |
flake package | wobmon package to use. |
services.wobmon.socket |
"%t/wob.sock" |
WOBSOCK value; null uses wobmon's default. |
services.wobmon.wobUnit |
"wob.service" |
Unit that owns the FIFO; null disables After/BindsTo. |
services.wobmon.muteAsZero |
false |
Pass --mute-as-zero. |
services.wobmon.skipInitial |
false |
Pass --skip-initial; don't show the volume at startup. |
services.wobmon.poll |
false |
Pass --poll. |
services.wobmon.interval |
null |
Pass --interval SECONDS. |
services.wobmon.extraArgs |
[] |
Extra command-line arguments. |
$ nix build .
$ ./result/bin/wobmon --help