4

I have pulseeffects installed and running. I have created a few equalizer profiles.

How can I toggle (enable/disable) selected profile using command line options.

I know I can just click on the profile but I would like to bind that to some global key to toggle it when needed. How can I do that?

I know I can load selected preset by using (where v2 is a profile name):

   $ pulseeffects -l v2

But how can I disable (unload) this profile ?

Screenshot: enter image description here

Michal Przybylowicz
  • 3,502
  • 4
  • 30
  • 28

1 Answers1

1

For example, if you have 3 profiles like V1, V2 & V3 and you would like to select profile V1, you can run the below command

gsettings set com.github.wwmm.pulseeffects last-used-preset 'V1'

If you dont want this, you can use below command

gsettings reset com.github.wwmm.pulseeffects last-used-preset

screenshot

you can create a script with below content and call it with a shortcut you wish.

#!/usr/bin/env bash

key="com.github.wwmm.pulseeffects last-used-preset"
current=$(gsettings get "$key")

if [ "$current" == "'V1'" ]; then
  gsettings reset "$key"
else
  gsettings set "$key" "V1"
fi

screenshot

Courtesy by @MichalPrzbylowicz for toggling on and off

dconf write /com/github/wwmm/pulseeffects/sinkinputs/equalizer/state true
dconf write /com/github/wwmm/pulseeffects/sinkinputs/equalizer/state false
Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
PRATAP
  • 21,989
  • 8
  • 59
  • 121
  • Yes, this selects given profile but does not enable/disable it afterwards... Is it possible to also activate/deactivate the profile ? – Michal Przybylowicz Jan 03 '20 at 20:41
  • I mean turn on (process sounds by the equalizer preset) and turn off (do not process sounds). – Michal Przybylowicz Jan 04 '20 at 06:08
  • I have added a screenshot. Please check. So I have like two things. Loading/Unloading a preset (You have already covered that) and turning it on/off - currently I can only do that in the GUI... – Michal Przybylowicz Jan 04 '20 at 07:17
  • You can turn on and turn off using these commands: `dconf write /com/github/wwmm/pulseeffects/sinkinputs/equalizer/state true dconf write /com/github/wwmm/pulseeffects/sinkinputs/equalizer/state false` . Please add them to your answer and I will accept it. – Michal Przybylowicz Jan 10 '20 at 05:09
  • [End-users are recommended to use gsettings](https://askubuntu.com/a/249924/349837), not dconf directly: `gsettings get com.github.wwmm.pulseeffects.sinkinputs.equalizer state` – Pablo Bianchi Apr 04 '22 at 20:05