You are not logged in.

#1 2011-07-09 06:38:10

tomek@vz
Member
Registered: 2009-07-20
Posts: 33

XFCE+Pulseaudio+ALSA=volume control?

Hy,

I gave up on OSS with my card so i'm have setup ALSA+Pulseadio on my Arch system. I'm folowing wiki on how to setup pulseaudio on my system however i stumbled on this:

and you can change the volume using this script.

#!/bin/bash
device="alsa_output.pci-0000_00_14.2.analog-stereo"
case "$1" in
    "up")    # increase volume by 1000
        pacmd dump | awk --non-decimal-data '$1~/set-sink-volume/{if ($2~/'${device}'/) {if ($3+1000 > 65535) {system ("pactl "$1" '${device}' "65535)} else {system ("pactl "$1" '${device}' "$3+1000)}}}'
        ;;
    "down")  # decrease volume by 1000
        pacmd dump | awk --non-decimal-data '$1~/set-sink-volume/{if ($2~/'${device}'/) {if ($3-1000 < 0) {system ("pactl "$1" '${device}' "0)} else {system ("pactl "$1" '${device}' "$3-1000)}}}'
        ;;
    "mute")  # toggle mute
        pacmd dump|awk --non-decimal-data '$1~/set-sink-mute/{if ($2~/'${device}'/) {system ("pactl "$1" '${device}' "($3=="yes"?"no":"yes"))}}'
        ;;
esac

Where do i need to put this script for multimedia keys to work?

Last edited by tomek@vz (2011-07-10 06:36:12)


For some tasks, the CLI is quicker. That's not elitism nor arrogance, that's just a fact of life.

Offline

#2 2015-06-12 01:10:31

Kremador
Member
Registered: 2015-06-12
Posts: 1

Re: XFCE+Pulseaudio+ALSA=volume control?

Well this is old but just in case someone else stumbles across this problem I would recommend installing xfce4-mixer for volume control and then setting Pulseaudio Mixer for playback. Solved the problem for me at least.

Cheers

Offline

#3 2015-06-12 01:13:19

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: XFCE+Pulseaudio+ALSA=volume control?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB