Created
November 30, 2016 10:58
-
-
Save ema/04c18cfdb1e606a659d208fb898ab423 to your computer and use it in GitHub Desktop.
This file contains 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
root@orion:/etc/acpi# cat /etc/acpi/events/fucking-headphones-plugged-in | |
# Fucking headphones man | |
event=jack/headphone HEADPHONE plug | |
action=/etc/acpi/fucking-headphones-plugged-in.sh | |
root@orion:/etc/acpi# cat /etc/acpi/fucking-headphones-plugged-in.sh | |
#!/bin/sh | |
# 2 is not pulled out of my ass. See `pactl list short sinks`. | |
su ema -c 'pactl list short sink-inputs | while read x y ; do pactl move-sink-input $x 2; done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That is absolutely awesome. I wasn't aware of the ACPI events scripts, looks like it would do exactly what I need. Kudos!