command-line control - increase/decrease volume of default output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2011-02-24 at 12:46 +0000, Colin Guthrie wrote:
> 'Twas brillig, and Ng Oon-Ee at 24/02/11 12:07 did gyre and gimble:
> > Hi all,
> > 
> > It seems the only way to achieve the above would be to script the
> > following:-
> > 
> > 1. Obtain the default device using pacmd list-sinks | grep "*" or
> > similar
> > 2. Get that device's current volume using some multi-line parsing of
> > pacmd list-sinks or pacmd info (output in %)
> > 3. Convert the given % to the hex input expected by pacmd
> > set-sink-volume
> > 4. Actually set the new volume
> > 
> > Is there an easier way to do this? pacmd isn't really VERY
> > script-friendly. To be fair that's probably not its purpose, I guess,
> > but it would be nice if Pulse as a Linux app was as scriptable as most
> > older Linux apps.
> > 
> > Alternatively, is there a 'shortcut' dbus method to do the above?
> > 
> > And yes, of course I could just use gnome volume control, not all
> > systems have gnome installed though (I'm looking at getting it off my
> > system actually, since I stopped using the DE itself).
> 
> When alsa redirection is available I find that "amixer set Master +5%"
> works fine :D
> 
> But it would be nice to have a simple cmd-line tool that did some basic
> tasks more easily... e.g. change volume of the default or a given sink,
> changed the volume of a given stream, changed the device of a given
> stream list the devices, list the streams.
> 
> If it did all this in a "consume from script" friendly kind of way, then
> I'd happily include it and ship it with PA as it's something that does
> crop up fairly often.
> 
> Patches welcome :D
> 
> Col
> 
This would have to be part of pacmd or separate? I thought this is what pactl was supposed to be for, but it seems development on that just stopped.

And yes I forgot I had alsa's ctl bound to hardware, that would be a
workaround. I still think PA should have something to cater to the
commandline, but yes it would need code of course. I may look into it
once I graduate...





[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux