You are not logged in.

#26 2014-11-25 00:19:02

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

@emacs- Not sure what is causing the problem... when you say, "when I try to connect to the autostarted pulseaudio daemon" what exactly does that mean?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#27 2014-11-28 15:16:45

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

orschiro wrote:

Great improvement to provide notifications, thanks! Can they be tweaked to look more like the ones from Xfce4 Volume Manager, which I find produces very simple but appealing messages?
Example: http://i.imgur.com/7Hx89mk.png

Best I can do is add support for the built-in icons, see version 1.46-1.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#28 2014-11-29 10:51:03

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

Best I can do is add support for the built-in icons, see version 1.46-1.

Looks very appealing. Many thanks!

Offline

#29 2014-11-29 20:30:59

emacsomancer
Member
Registered: 2014-09-20
Posts: 202

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

graysky wrote:

@emacs- Not sure what is causing the problem... when you say, "when I try to connect to the autostarted pulseaudio daemon" what exactly does that mean?


When I start up my system (or perhaps when I connect to a program that has audio output?) pulseaudio is started.  That daemon.  As opposed to me killing the existing pulseaudio daemon and manually starting it from the commandline with `pulseaudio --start`. 

Though I must amend my statement - in fact I seem to have kill and restart the pulseaudio daemon frequently in order to get pulseaudio-ctl to work.  That is, if I kill the existing daemon and restart, then the pulseaudio-ctl module will work for a while, but I have to go through the process again after a while.

I suspect it has something to do with default syncs - though I'm not sure exactly what or how to fix it....

Offline

#30 2014-11-29 20:39:49

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

No idea.  All the script does is simple to parse the output of the running pa sever and issue trivial commands.  I think your problem is more involved.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#31 2014-12-03 02:03:06

emacsomancer
Member
Registered: 2014-09-20
Posts: 202

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

graysky wrote:

No idea.  All the script does is simple to parse the output of the running pa sever and issue trivial commands.  I think your problem is more involved.

I think the issue is this: I'm using a combined digital+analogue channel (the digital is an HDMI connection to my monitor('s speaker); the analogue is a connection to separate speakers).  It seems to lose the connection to pulseaudio-ctl after my monitor has gone to sleep and been re-awaked.

Offline

#32 2014-12-03 12:21:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

I don't have multiple connections on my machine (monitor is via displayport not HDMI).  My script [pulseaudio-ctl] simply looks to see which is the active sink simply by inspecting the output of `pacmd list-sinks` and then selects the number of the one PA has denoted with an asterisk.  There is no connection.  Test it:

1) Reboot your machine so everything is fresh.
2) Run pulseaudio-ctl with no arguments and it will show you the values it has detected.
3) Let the monitor go to sleep and awake it up.
4) Repeat step 2 and see how it changed.

Example on my system:

% pulseaudio-ctl
pulseaudio-ctl v1.46

 /usr/bin/pulseaudio-ctl {up,down,mute,mute-input,set,atmost} [n]

 Where up and down adjust volume in ±5 % increments.
 Where mute toggles the mute status on/off.
 Where mute-input toggles the input status on/off.
 Where set takes a % value.
 Where atmost only takes effect if current volume is higher than this.

 Optionally, redefine an upper threshold in /home/facade/.config/pulseaudio-ctl/config

 Volume level     : 95 %
 Is sink muted    : no
 Is source muted  : no
 Detected sink    : 1
 Detected source  : 2
 Pulse version    : 5.0

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#33 2014-12-08 21:49:18

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

orschiro wrote:

Great improvement to provide notifications, thanks! Can they be tweaked to look more like the ones from Xfce4 Volume Manager, which I find produces very simple but appealing messages?
Example: http://i.imgur.com/7Hx89mk.png

OK.. I believe the current version does what you asked for graphically thanks to a contributor (ntrp).
2chnpls.jpg

Last edited by graysky (2014-12-08 21:49:34)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#34 2014-12-09 06:14:49

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

@graysky & ntrp

I noticed the improvement already with v1.48. This is perfect, thank you very much for the effort.

Now I can finally ditch xfce4-volumed which I just used for its neat notifications. smile

Offline

#35 2014-12-11 19:04:31

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

Glad you like it.  Enjoy.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#36 2014-12-20 18:49:57

geo909
Member
Registered: 2008-09-07
Posts: 301

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

Hi and thank you for this nice little tool!

I just installed pulseaudio-ctl and use it with xbindkeys. The notification lasts 10 seconds. If I press the volume down button 3 times quickly, the notification will last 10 seconds for each of the -5%. The sound will go down -5% though.

I strongly suspect that this is not related to pulseaudio-ctl, and it has to do with libnotify, but any points to the right direction would be appreciated.

Offline

#37 2014-12-20 20:59:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

If you look at the code, it should be only 1 sec for everything but simply running the script with no args in which case it's 8 sec:

% grep 'send -t' /usr/bin/pulseaudio-ctl
      notify-send -t 1000 -i multimedia-volume-control --hint=int:transient:1 --hint=int:value:$CURVOL --hint=string:synchronous:volume "Volume up $PERC %" "" ||
      notify-send -t 1000 --hint=int:transient:1 "Volume up $PERC%" "Current is $CURVOL %" --icon=multimedia-volume-control
      notify-send -t 1000 -i multimedia-volume-control --hint=int:transient:1 --hint=int:value:$CURVOL --hint=string:synchronous:volume "Volume down $PERC %" "" ||
      notify-send -t 1000 --hint=int:transient:1 "Volume down $PERC%" "Current is $CURVOL %" --icon=multimedia-volume-control
      notify-send -t 1000 --hint=int:transient:1 "Mute toggle" "Muted: $MUTED" --icon=audio-volume-muted
      notify-send -t 1000 --hint=int:transient:1 "Mute toggle" "Muted: $SOURCE_MUTED" --icon=audio-volume-muted
      notify-send -t 1000 --hint=int:transient:1 "Volume set" "Level: $CURVOL" --icon=multimedia-volume-control
      notify-send -t 1000 --hint=int:transient:1 "Atmost set" "Level: $CURVOL" --icon=multimedia-volume-control
      notify-send -t 8000 --hint=int:transient:1 "Pulseaudio Settings" "Volume level     : $CURVOL %\nIs sink muted    : $MUTED\nIs source muted  : $SOURCE_MUTED\nDetected sink    : $SINK\nDetected source  : $SOURCE\nPulse version    : $PAVERSION" --icon=multimedia-volume-control

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#38 2014-12-21 00:31:05

geo909
Member
Registered: 2008-09-07
Posts: 301

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

graysky wrote:

If you look at the code, it should be only 1 sec for everything but simply running the script with no args in which case it's 8 sec:

% grep 'send -t' /usr/bin/pulseaudio-ctl
      notify-send -t 1000 -i multimedia-volume-control --hint=int:transient:1 --hint=int:value:$CURVOL --hint=string:synchronous:volume "Volume up $PERC %" "" ||
      notify-send -t 1000 --hint=int:transient:1 "Volume up $PERC%" "Current is $CURVOL %" --icon=multimedia-volume-control
      notify-send -t 1000 -i multimedia-volume-control --hint=int:transient:1 --hint=int:value:$CURVOL --hint=string:synchronous:volume "Volume down $PERC %" "" ||
      notify-send -t 1000 --hint=int:transient:1 "Volume down $PERC%" "Current is $CURVOL %" --icon=multimedia-volume-control
      notify-send -t 1000 --hint=int:transient:1 "Mute toggle" "Muted: $MUTED" --icon=audio-volume-muted
      notify-send -t 1000 --hint=int:transient:1 "Mute toggle" "Muted: $SOURCE_MUTED" --icon=audio-volume-muted
      notify-send -t 1000 --hint=int:transient:1 "Volume set" "Level: $CURVOL" --icon=multimedia-volume-control
      notify-send -t 1000 --hint=int:transient:1 "Atmost set" "Level: $CURVOL" --icon=multimedia-volume-control
      notify-send -t 8000 --hint=int:transient:1 "Pulseaudio Settings" "Volume level     : $CURVOL %\nIs sink muted    : $MUTED\nIs source muted  : $SOURCE_MUTED\nDetected sink    : $SINK\nDetected source  : $SOURCE\nPulse version    : $PAVERSION" --icon=multimedia-volume-control

Thanks a lot, I understand how it works now, I didn't know about the notify-send command. The problem is indeed not related to pulseaudio-ctl. I ran

notify-send -t 1000 "hello"

with different number of miliseconds, and I always see the notification for 10 seconds exactly. I'll look into it.

Last edited by geo909 (2014-12-21 00:31:28)

Offline

#39 2014-12-27 19:03:49

emacsomancer
Member
Registered: 2014-09-20
Posts: 202

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

Latest update didn't seem to work for me - volume up and down no longer changed anything.

Offline

#40 2014-12-27 19:05:26

kalsan
Member
Registered: 2011-10-10
Posts: 118

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

I confirm - since latest update (today), volume keys are dead.

Offline

#41 2014-12-27 21:21:34

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

Grrr... Are you both running the standard version from [extra]?  For me, 1.55-1 works just fine hmm  Can you post the output of:

% pactl --version                                                                                           :(
pactl 5.0
Compiled with libpulse 5.0.0
Linked with libpulse 5.0.0

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#42 2014-12-27 21:53:26

kalsan
Member
Registered: 2011-10-10
Posts: 118

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

$ pactl --version    
pactl 5.0
Kompiliert mit libpulse 5.0.0
Gelinkt mit libpulse 5.0.0

EDIT:

$ yaourt pulseaudio-ctl
1 aur/pulseaudio-ctl 1.55-1 [installed] (121)
    Control pulseaudio volume from the shell or mapped to keyboard shortcuts.

Last edited by kalsan (2014-12-27 21:54:05)

Offline

#43 2014-12-28 00:02:16

emacsomancer
Member
Registered: 2014-09-20
Posts: 202

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

graysky wrote:

Grrr... Are you both running the standard version from [extra]?  For me, 1.55-1 works just fine hmm  Can you post the output of:

% pactl --version                                                                                           :(
pactl 5.0
Compiled with libpulse 5.0.0
Linked with libpulse 5.0.0

Standard version of pulseaudio?   Yes, the one from [extra]. The only pulse-related things I'm running that are not from [extra] is pulseaudio-ctl itself.

output you asked for:

pactl --version
pactl 5.0
Compiled with libpulse 5.0.0

Edit: In case it's relevant, here are the other pulseaudio-related packages I have installed:

extra/libao 1.2.0-1 [installed]
    Cross-platform audio output library and plugins
extra/libcanberra-pulse 0.30-4 [installed]
    PulseAudio plugin for libcanberra
extra/libpulse 5.0-1 [installed]
    A featureful, general-purpose sound server (client library)
extra/paprefs 0.9.10-3 [installed]
    A simple GTK-based configuration dialog for PulseAudio
extra/pavucontrol 2.0-2 [installed]
    A GTK volume control for PulseAudio
extra/pulseaudio 5.0-1 [installed]
    A featureful, general-purpose sound server
extra/pulseaudio-alsa 2-3 [installed]
    ALSA Configuration for PulseAudio

Last edited by emacsomancer (2014-12-28 00:04:17)

Offline

#44 2014-12-28 01:22:08

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,366

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

Since upgrading to 1.55-1, when I run

pulseaudio-ctl down

I get this error

pactl: invalid option -- '5'

up, mute work fine

Offline

#45 2014-12-28 01:23:24

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

For what ever reason, my system likes 1.55 just fine, but your two systems do not.  I will therefore revert.  There is a user out there who can't run the 1.54 code (the code that contains the -- in the pactl line).  For reasons that are not known to me at this point.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#46 2014-12-28 01:32:02

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

Reverted, please try 1.56-1.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#47 2014-12-28 01:34:46

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,366

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

Thanks, down option works again with 1.56-1

Offline

#48 2014-12-28 03:50:06

emacsomancer
Member
Registered: 2014-09-20
Posts: 202

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

Yes, everything's working again with 1.56-1

Offline

#49 2014-12-28 08:01:10

kalsan
Member
Registered: 2011-10-10
Posts: 118

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

Yap, works :-)

Offline

#50 2014-12-28 15:55:43

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,828
Website

Re: pulseaudio-ctl: vol+/- and mute from the shell or shortcut keys

OK all.  Problem is that PA in [testing] is version 5.99.x while [extra] holds 5.0 and there are differences in how these two version accept commands.  I just released 1.57-1 which should support both versions.  Please try it.

https://github.com/graysky2/pulseaudio- … 56...v1.57


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB