DamienCassou / desktop-environment

Helps you control your GNU/Linux computer from Emacs

Home Page:https://gitea.petton.fr/DamienCassou/desktop-environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Volume toggle output when there's no command output

nbarrientos opened this issue · comments

Hi,

I use pamixer so these are my settings:

  (desktop-environment-volume-get-command "pamixer --get-volume")
  (desktop-environment-volume-set-command "pamixer %s")
  (desktop-environment-volume-get-regexp "\\([0-9]+\\)")
  (desktop-environment-volume-normal-increment "-i 5 --allow-boost")
  (desktop-environment-volume-normal-decrement "-d 5")
  (desktop-environment-volume-toggle-command "pamixer -t")

After #26 I had to add:

  (desktop-environment-volume-toggle-regexp (rx ""))

as pamixer does not produce any output when toggling.

The problem is that now this prints "Sound " to the messages buffer (and hence the minibuffer) which is a bit ugly and rather not very informative.

Maybe desktop-environment could be patched to allow setting desktop-environment-volume-toggle-regexp to nil. In this case no matching will be done and either nothing will be printed or something generic like "Sound toggled".

PR sent with a PoC.