Sample Header Ad - 728x90

Switch Pulseeffects profiles on headphones connection/disconnection

0 votes
1 answer
724 views
this is related to... [https://unix.stackexchange.com/questions/25776/detecting-headphone-connection-disconnection-in-linux] as the title states, I wanted to switch pulseffects profiles on headphone connection/disconnection. I've referred to the link below for setting profiles via the terminal but these do not work on the pulseeffects flatpack. https://askubuntu.com/questions/1200332/how-can-i-toggle-selected-pulseeffects-equalizer-profile-from-command-line after a bit of googling, I figured out that i could use, flatpak run com.github.wwmm.pulseeffects -l to change the profile as necessary. I assume that I'll have to use acpid to execute the aforementioned on jack/headphone plug/unplug events. https://linux.die.net/man/8/acpid . Later, I found this link. https://unix.stackexchange.com/questions/559326/how-do-i-actually-write-acpid-event-scripts-that-detect-when-headphones-are-plug ...and have now created two events headphone-jack-plug event=jack/headphone HEADPHONE plug action=/etc/acpi/headphone-jack.sh plug headphone-jack-unplug event=jack/headphone HEADPHONE unplug action=/etc/acpi/headphone-jack.sh unplug the script, however exits with status 1 on running sudo journalctl -u acpid -f for both events. #!/bin/sh if [ "$1" = plug ]; then flatpak run com.github.wwmm.pulseeffects -l HdPhDlbCnv elif [ "$1" = unplug ]; then flatpak run com.github.wwmm.pulseeffects -l DolbConv fi on redirecting the error to a file i see... error: app/com.github.wwmm.pulseeffects/x86_64/master not installed but running the flatpak command in a terminal works... how do i fix this?
Asked by NGStaph (1 rep)
Dec 26, 2020, 03:18 PM
Last activity: Apr 10, 2024, 02:20 PM