You are not logged in.

#1 2009-05-28 22:58:55

playdafunkimuzic
Member
Registered: 2008-10-25
Posts: 220

Openbox Users: Best way to control volume (sound volume)?

I use xfce4-panel for my panel, and I'm currently using the xfce4-panel.

What else do you guys use?

Offline

#2 2009-05-28 23:08:42

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: Openbox Users: Best way to control volume (sound volume)?

Keybindings, and/or gvolwheel.

Offline

#3 2009-05-28 23:34:52

rusty99
Member
Registered: 2009-03-18
Posts: 253

Re: Openbox Users: Best way to control volume (sound volume)?

I just entered mine straight into .config/*/rc.xml

    <keybind key="XF86AudioLowerVolume">
     <action name="Execute"><execute>ossmix vmix0-outvol -q -- -1</execute></action>
      </keybind>
    <keybind key="XF86AudioRaiseVolume">
       <action name="Execute"><execute>ossmix vmix0-outvol +1 -q</execute></action>
      </keybind>

Offline

#4 2009-05-29 00:25:27

linkmaster03
Member
Registered: 2008-12-27
Posts: 269

Re: Openbox Users: Best way to control volume (sound volume)?

I use 'volwheel' in my tray. You just move your mouse over the tray icon and scroll up or down to change the volume.

Offline

#5 2009-05-29 01:16:36

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Openbox Users: Best way to control volume (sound volume)?

along the same lines as rusty:

> grep -A 4 XF86Audio .config/openbox/rc.xml 
    <keybind key="XF86AudioMute">
      <action name="Execute">
        <execute>/home/patrick/.bin/ossvol -t</execute>
      </action>
    </keybind>
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <execute>/home/patrick/.bin/ossvol -i 1</execute>
      </action>
    </keybind>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <execute>/home/patrick/.bin/ossvol -d 1</execute>
      </action>
    </keybind>

and

> cat .bin/ossvol
#!/bin/bash
#
# ossvol is a simple script to manage oss volume levels and muting.
#
# original script by: Daniel J Griffiths <ghost1227@archlinux.us>
#
###

# Configure stuff
VOLSTORE=~/.volume
CHANNEL="vmix0-outvol"
ARGUMENT=$2

# dzen stuff
SECS="1"            # sleep $SECS
BG="#080808"        # background colour of window
FG="#ffffff"        # foreground colour of text/icon
BAR_FG="#ffffff"    # foreground colour of volume bar
BAR_BG="#080808"    # background colour of volume bar
XPOS="750"          # horizontal positioning
YPOS="515"          # vertical positioning
HEIGHT="50"         # window height
WIDTH="400"         # window width
BAR_WIDTH="300"     # width of volume bar
ICON="$HOME/.icons/dvol/spkr_02.xbm"
FONT="fixed"

# You shouldn't have to edit below here.
PIPE="/tmp/volpipe"

errorout() {
  echo "$1"
  exit 1
}

usage() {
  echo "usage: ossvol [option] [argument]"
  echo
  echo "Options:"
  echo "     -i, --increase - increase volume by [argument]"
  echo "     -d, --decrease - decrease volume by [argument]"
  echo "     -t, --toggle   - toggle mute on and off"
  echo "     -h, --help     - display this"
  exit 1
}

toggle() {
  if [ -f $VOLSTORE ]; then
    ossmix $CHANNEL `cat $VOLSTORE`
    rm $VOLSTORE
  else
    VOLUME=$(ossmix $CHANNEL | awk '{print $10}' | awk -F : '{print $1}')
    ossmix $CHANNEL 0
    echo $VOLUME > $VOLSTORE
  fi
}

increase() {
  if [ -f $VOLSTORE ]; then
    TMPVOL=`cat $VOLSTORE`
    NEWVOL=`expr $TMPVOL + $ARGUMENT`
    ossmix $CHANNEL +$NEWVOL
    rm $VOLSTORE
  else
    ossmix $CHANNEL +$ARGUMENT
  fi
}

decrease() {
  if [ -f $VOLSTORE ]; then
    TMPVOL=`cat $VOLSTORE`
    NEWVOL=`expr $TMPVOL - $ARGUMENT`
    ossmix $CHANNEL -- -$NEWVOL
    rm $VOLSTORE
  else
    ossmix $CHANNEL -- -$ARGUMENT
  fi
}

case "$1" in
  '-i'|'--increase')
  increase
  ;;
  '-d'|'--decrease')
  decrease
  ;;
  '-t'|'--toggle')
  toggle
  ;;
  '-h'|'--help')
  usage
  ;;
  *)
  errorout "Unrecognized option \`$1', see ossvol --help"
  ;;
esac

#
# dzen approach from bruenig's dvol script added by pbrisbin
#
# Using named pipe to determine whether previous call still exists
# Also prevents multiple volume bar instances
if [ ! -e "$PIPE" ]; then
  mkfifo "$PIPE"
  (dzen2 -tw "$WIDTH" -h "$HEIGHT" -x "$XPOS" -y "$YPOS" -fn "$FONT" -bg "$BG" -fg "$FG" < "$PIPE" 
  rm -f "$PIPE") &
fi

# Feed the pipe!
VOL=$(ossmix $CHANNEL | awk '{print $10}' | cut -d '.' -f 1)
VOL=$(expr $VOL \* 100 / 25)
(echo "$VOL" | gdbar -l "^i(${ICON})" -fg "$BAR_FG" -bg "$BAR_BG" -w "$BAR_WIDTH"; sleep "$SECS") >> "$PIPE"

exit 0

prints a nice dzen volume bar as you change it

Offline

#6 2009-05-29 02:02:20

madalu
Member
Registered: 2009-05-05
Posts: 217

Re: Openbox Users: Best way to control volume (sound volume)?

Mine is fairly simple. Just a keybinding in rc.xml to launch
alsamixer:

    <keybind key="W-v">
      <action name="Execute">
        <execute>urxvt -e alsamixer</execute>
      </action>
    </keybind>

Offline

#7 2009-05-30 15:35:50

jorpheus
Member
Registered: 2008-11-07
Posts: 98

Re: Openbox Users: Best way to control volume (sound volume)?

Keybindings for amixer.

Offline

#8 2009-05-30 16:59:44

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: Openbox Users: Best way to control volume (sound volume)?

xfce4-panel also has a plugin for volume control. So either that or volwheel, which sits in the tray.

Offline

#9 2009-05-30 20:08:09

DevoidOfWindows
Member
Registered: 2009-05-24
Posts: 133

Re: Openbox Users: Best way to control volume (sound volume)?

Grab aumix-gtk, and you can set your volume wheel (if it's software-controlled) or some other keys to turn up and down your volume with something like:

<keybind key="XF86AudioLowerVolume">
  <action name="Execute">
    <command>aumix -v -2</command>
  </action>
</keybind>
<keybind key="XF86AudioRaiseVolume">
  <action name="Execute">
     <command>aumix -v +2</command>
  </action>
</keybind>

Last edited by DevoidOfWindows (2009-05-30 20:08:51)

Offline

Board footer

Powered by FluxBB