-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Well, the script finally stopped working entirely for me and JamesDSP has one important for me feature missing. So i got around to take a few days to cleanly reimplement this. Thought i share it.
improvements:
- sinks are now reliably tracked and reset on change
- supports up to ten audio channels (left, right, center, surround) individually
- new devices.conf options:
- default-sink=sink-name: still the old same; the sink you have set as default
- <sink>-volume=50% 50%: gets added if missing; the respective sink's volume as percent per channel
- update-volume=true/false: if the channel volumes above should be updated on change
fixes:
- supports now XDG spec (XDG_CONFIG_HOME, etc)
- some pactl commands have changed/have now simpler alternatives
- only one state file with multiple values, as well as a log file for gstreamer output
- clean, declarative, shellchecked implementation in POSIX shell
pain points:
audio.conf format
The original script sources the conf, then uselessly translates each.single.value as a variable to the library-supported value. You can just cat that in a subshell instead, but since it's _ vs. -, it has to be piped through tr, which has the consequence, that IRS file paths can not contain underscores or they get translated to hyphens too and thus the path not found.
If the keys in the conf could be changed from some_key to some-key, it could just be sourced directly. This would of course break compatibiliity; with viper-gui too.