You are not logged in.
xbindkeys i run for longtime with accumulating nice helpfull key-combinations that help do things faster ...
here examples of the "classical" uses of xbindkeys i have in ~/.xbindkeysrc :
1 - xkill:
"xkill"
control+mod1+q
even if not handeled by WM used, i am able to run xkill (this saves time restarting X if in trouble)
2 - mpc/mpd:
"mpc next"
control+mod1+n
"mpc > /tmp/mpc_now && osd_cat -p bottom -A center -u black -O 4 -f '-bitstream-bitstream vera sans mono-medium-r-normal-*-36-*-*-*-m-*-iso8859-1' /tmp/mpc_now"
control+mod1+i
the first key-combination changes to the next song. the second shows the currently playing using xosd
feel free to share your nice key-combinations, that make the work easier
The impossible missions are the only ones which succeed.
Offline
I'm using a laptop so obviously I wanted to use all the multimedia keys and such.
I used 'xev' and some googling to find the key codes for my comp (gateway 200x)
I binded the volume keys to aumix
"aumix -w +5 &"
c:176
"aumix -w -5 &"
c:174
So now I can use them to volume up and down (they're binded to the PCM channel so I can use both headphones and speakers)
oh and this can come in handy sometimes :
"fbrun &"
control + shift + r
to run occasional programs
and
"aterm &"
control + shift + t
Offline
I binded the volume keys to aumix
"aumix -w +5 &" c:176 "aumix -w -5 &" c:174
good idea!
The impossible missions are the only ones which succeed.
Offline
1 - xkill:
"xkill" control+mod1+q
even if not handeled by WM used, i am able to run xkill (this saves time restarting X if in trouble)
Nice one.
And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.
Offline
I binded the volume keys to aumix
"aumix -w +5 &"
c:176
"aumix -w -5 &"
c:174
yeah, now if i can only get the mute toggle to work....
Offline
hmm
"aumix -w m" should mute the channel... but I get the feeling you already tried that...
Offline
hmm
"aumix -w m" should mute the channel... but I get the feeling you already tried that...
yeah it mutes it, but the next press mutes it again... I could do it... but it'd require a whole script to check aumix, see if channel is muted, if so unmute, otherwise mute.... i'm just lazy and feel that's too much work to mute/unmute... I'll just hit volume down until it's at 0
Offline
try "mute" ;-)
Mr Green
Offline
Offline
try "mute" ;-)
heh, thanks, I was also looking for something like that.
And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.
Offline
Greycloack wrote:hmm
"aumix -w m" should mute the channel... but I get the feeling you already tried that...
yeah it mutes it, but the next press mutes it again... I could do it... but it'd require a whole script to check aumix, see if channel is muted, if so unmute, otherwise mute.... i'm just lazy and feel that's too much work to mute/unmute... I'll just hit volume down until it's at 0
Hi, I just set up the mute/unmute key on my laptop using xbindkeys and amixer.
I use a little script that ckecks if the Master channel is muted or not and then mutes or unmutes it.
~/.xbindkeysrc
# Master Volume mute/unmute (Fn + F8)
"/usr/local/bin/MasterMuteUnmute"
c:160 + m:0x0
and the 'MasterMuteUnmute' script
#!/bin/bash
amixer -c 0 cget numid=1 | grep -o values=on
if [ $? -eq 0 ]; then
amixer -c 0 set Master mute
else
amixer -c 0 set Master unmute
fi
My question is, it is possible to put the lines of the script directly into the .xbindkeysrc file?
Last edited by SiD (2007-03-15 11:16:21)
Offline
phrakture wrote:Greycloack wrote:hmm
"aumix -w m" should mute the channel... but I get the feeling you already tried that...
yeah it mutes it, but the next press mutes it again... I could do it... but it'd require a whole script to check aumix, see if channel is muted, if so unmute, otherwise mute.... i'm just lazy and feel that's too much work to mute/unmute... I'll just hit volume down until it's at 0
Hi, I just set up the mute/unmute key on my laptop using xbindkeys and amixer.
I use a little script that ckecks if the Master channel is muted or not and then mutes or unmutes it.~/.xbindkeysrc
# Master Volume mute/unmute (Fn + F8) "/usr/local/bin/MasterMuteUnmute" c:160 + m:0x0
and the 'MasterMuteUnmute' script
#!/bin/bash amixer -c 0 cget numid=1 | grep -o values=on if [ $? -eq 0 ]; then amixer -c 0 set Master mute else amixer -c 0 set Master unmute fi
My question is, it is possible to put the lines of the script directly into the .xbindkeysrc file?
That looks pretty complicated. Here's how I do it:
"amixer sset Master toggle"
XF86AudioMute
Offline
thanks for the tip, this in .xbindkeyrc works for me too
"amixer -c 0 set Master toggle"
c:160 + m:0x0
I didn't see the "toggle" option while reading the amixer man page ...
Anyway, I learned a little more about bash-scripts setting up the mute/unmute key with my script
Offline
That looks pretty complicated. Here's how I do it:
"amixer sset Master toggle" XF86AudioMute
This does not work for me. Only "amixer -c 0 set PCM 100%-" or "amixer -c 0 set PCM 100%+" work.. Who can help?
Offline
smoon wrote:That looks pretty complicated. Here's how I do it:
"amixer sset Master toggle" XF86AudioMute
This does not work for me. Only "amixer -c 0 set PCM 100%-" or "amixer -c 0 set PCM 100%+" work.. Who can help?
The command is :
# Audio mute
"amixer set Master toggle"
m:0x0 + c:160
Notice that is "set" not "sset" that may be the reason it does not work for you.
R
Offline
No, it is the "toggle"-command that is not working. I have to use PCM instead of Master, since my master control is called like that .
Offline
I found this script online (thanks google), it works like a charm and remembers the mixer settings in aumix:
#!/bin/sh
# Aumix mute toggle
# Version: 1.1.0
# Date: 2005/03/21
#
# Copyright: 2004 Jeremy Brand <jeremy@nirvani.net>
# http://www.nirvani.net/software/
# Licenced under the GNU Public License Version 2.
#
# Purpose:
# To have a single script toggle between current sound levels
# and mute with the aumix program while maintaining
# and not deleting current mixer saved settings.
#
# Notes:
# I bind this program to a single key in my window manager's
# configuration file. It then serves the purpose of having a
# audio mute key. If you have a fancy keyboard with a mute
# key, try binding this program to that scancode.
#
# Usage:
#
# Toggle between mute and unmute based on last state:
# aumix-toggle-mute.sh
#
# Force mute:
# aumix-toggle-mute.sh --force-mute
#
# Force unmute:
# aumix-toggle-mute.sh --force-unmute
#
TMP=$$
function __mute() {
if [ -e "$HOME/.aumixrc.mute" ]; then
aumix -v 0; aumix -w 0
else
mv -f $HOME/.aumixrc $HOME/.aumixrc.$TMP
aumix -S
aumix -v 0; aumix -w 0
mv -f $HOME/.aumixrc $HOME/.aumixrc.mute
mv -f $HOME/.aumixrc.$TMP $HOME/.aumixrc
fi
}
function __unmute () {
if [ -e "$HOME/.aumixrc.mute" ]; then
mv -f $HOME/.aumixrc $HOME/.aumixrc.$TMP
mv -f $HOME/.aumixrc.mute $HOME/.aumixrc
aumix -L > /dev/null
mv -f $HOME/.aumixrc.$TMP $HOME/.aumixrc
else
aumix -L > /dev/null
fi
}
if [ "$1" = "--force-mute" ]; then
__mute;
elif [ "$1" = "--force-unmute" ]; then
__unmute;
elif [ -e "$HOME/.aumixrc.mute" ]; then
__unmute;
else
__mute;
fi
Offline