Hacker News new | ask | show | jobs
by aleatorisch 2229 days ago
This is an awesome idea. I ended up doing it without this tool and just using pulseaudio-ctl.

1. figure out the keycode for key you want to use. for me this was Scroll_Lock, so it looked like:

  keycode 78 (keysym 0xff14, Scroll_Lock)
2. Add the following to the i3 config:

  xset -r 78 # no repeat for scroll-lock
  pulseaudio-ctl mute-input yes # mute at startup
  bindsym Scroll_Lock exec pulseaudio-ctl mute-input no
  bindsym --release Scroll_Lock exec pulseaudio-ctl mute-input yes
1 comments

I'm using Sway, therefore Wayland, no `xset` here. I'm pretty sure I tested something like this first and it did not work, which I why I went to the hassle of creating this.