You are not logged in.
Use this little script to control your pulseaudio volume from within xfce4 or other DE's via mapped keys on the keyboard (mine actually has keys for mute, vol+ and vol-). Mapping shortcut keys varies from DE to DE. On xfce4, the you can do this under Settings > Keyboard > Application Shortcuts.
Usage is very simple:
/usr/bin/pulseaudio-ctl mute will toggle status of mute
/usr/bin/pulseaudio-ctl up will increase vol by 5 %
/usr/bin/pulseaudio-ctl down will decrease vol by 5 %You can map these three actions to three keyboard shortcuts for quick access. My keyboard actually has discrete buttons for these actions:
http://s19.postimg.org/5lqxulqb7/keyboard.jpgIf you execute the script from the shell, it will output the above and also show the current vol level and mute status:
% pulseaudio-ctl
pulseaudio-ctl v1.45/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 : 90 %
Is sink muted : no
Is source muted : no
Detected sink : 1
Detected source : 1
Pulse version : 5.0UPDATE on 03-Nov-2014: Now uses libnotify to show vol level and mute status.
AUR: https://aur.archlinux.org/packages/pulseaudio-ctl
GitHub: https://github.com/graysky2/pulseaudio-ctl
I want to modify it to offer optional pacmd+pactl/amixer+???? control.
-p ==> Use pulseaudio control backend (default)
-a ==> Use alsa control backendThis makes the dependencies optional.
I also had a different problem:
sudo qqbuild cflags -Os aura -A pulseaudio-ctl
[sudo] password for quequotion:
aura >>= Determining dependencies...
aura >>= Repository dependencies:
libpulse
pulseaudio
aura >>= AUR Packages:
pulseaudio-ctl
aura >>= Continue? [Y/n] n
aura >>= Installation manually aborted.quequotion had alsa-utils installed.
pulseaudio-git's PKGBUILD {provides,conflicts,replaces}(libpulse pulseaudio), without even a version number.
The version number is the problem, but I removed replaces() anyway.
provides=("pulseaudio=$pkgver" "libpulse=$pkgver")
conflicts=("pulseaudio" "libpulse")
[snip]
pkgver() {
cd "$srcdir/$_pkgname"
gitver=$(git describe --always | sed "s/-/./g")
gitver=${gitver:1}
echo $gitver
}can this pkgver() be shortened?
This solves dependency problems with pusleaudio-ctl & pulseaudio-git.
Now I can get on to modifying your script ![]()
EDIT - fixed copypasta type-o; back from work; on to bashing
Last edited by quequotion (2014-12-12 22:34:09)
makepkg-optimize · indicator-powersave · pantheon-{3d,lite} · {pantheon,higan}-qq
Offline
Not sure how relevant your post is to this script ![]()
Offline
At graysky's request, I have moved this side discussion about the PKGBUILD to its own thread. Moves to AUR Issue, Discussion and PKGBUILD Requests
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Not sure how relevant your post is to this script
Not as relevant as I thought. I had in mind that it would be useful if the script supported both alsa and pulse backends (to use the same script in different setups); even though it's not really useful for me. I also have in mind to streamline the various execution calls; and make use of notification ids.
Anyway, I ended up doing nothing for now; I may come back to this later. In fact, gnome-settings-daemon should be managing these hotkeys for me, but it has proven extremely unreliable lately (some features have been moved to gnome-shell or another component without documentation; others just vanished completely).
makepkg-optimize · indicator-powersave · pantheon-{3d,lite} · {pantheon,higan}-qq
Offline