feat(audio): Corsair VOID Elite auto-switch + portable Arch installer - #205
Merged
Merged
Conversation
codepuncher
force-pushed
the
feat/corsair-headset-autoswitch
branch
from
June 22, 2026 21:27
8e37925 to
ad057bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two related changes.
1. Portable Arch package installer (Manjaro/pamac -> any Arch + paru)
The installer hard-assumed Manjaro/pamac, so it did nothing on CachyOS (
ID=cachyos, shipsparu). Now:shell/functionshelpers:detect_aur_helper(prefersparu->pamac->yay),arch_install(paru/yay without sudo, pamac with sudo),enable_aur(pamac-only AUR config), andis_arch(true onID=archorID_LIKEcontainingarch).pamaccall sites (install_arch_packages,post_install_packages,setup_arch_system_emoji_support) route througharch_install.setup.shOS gate broadened fromID=manjarotois_arch, so the Arch path runs on CachyOS/EndeavourOS/etc. WSL (apt) and macOS paths are unaffected.2. Headset auto-switch daemon
The VOID Elite's USB dongle stays connected whether the headset is on or off, so neither udev nor PipeWire node events fire on power toggle. Detection instead polls
headsetcontrol -o jsonfor.devices[0].battery.status.bin/corsair-headset-switch: asystemd --userpoll loop (2s). On power-on it sets the VOID Elite as the default PipeWire sink; on power-off it restores the previously-default sink. Edge-detected in memory; baseline state captured at startup so a restart never hijacks audio; transient query failures hold state rather than flipping the sink.systemd/corsair-headset.serviceunit, symlinked into~/.config/systemd/user/via a newmove_linkline.headsetcontroladded to the Arch package list.Enabling
setup.shsymlinks the unit; enable it once (kept manual, by design):systemctl --user daemon-reload systemctl --user enable --now corsair-headset.serviceVerification
shell/functionsandbin/corsair-headset-switch.journalctl --user -u corsair-headset).