Using screen as a "window manager" in the Linux console of my Thinkpad,
I've bound certain keys to adjust volume up and down using amixer.
In my ~/.screenrc there is:

  # Decrease & Increase volume
  bindkey "\033[25~" exec ! amix-adjust minus
  bindkey "\033[26~" exec ! amix-adjust plus

Where "amix-adjust" is a script:

  #!/bin/sh
  # for adjusting the Master volume level (used with Gnu Screen)
  amixer -q set PCM 74%
  if [ "$1" = "minus" ]
  then
      amixer -q set Master 1dB-
      screen -X backtick 7 0 60 amix-level
  elif [ "$1" = "plus" ]
  then
      amixer -q set Master 1dB+
      screen -X backtick 7 0 60 amix-level
  else
      exit 0
  fi

And amix-level is another script:

  #!/bin/sh
  # for displaying the Master volum level set via amixer (used with Gnu Screen)
  amixer -c 0 get Master | grep -m1 -o [0-9]*%

This works fairly well, displaying the volume level "realtime" as
a percentage in the caption line. One quirk though -- when holding
down the assigned "plus" or "minus" key, after enough sequential
repetitions a message will flash in the message line:

  Filter running: !.. amix-adjust minus

This is with the keyboard repeat rate set to 30 characters per second.
Reducing the repeat rate to 22 makes the message goes away...but I'd
like to leave it set to 30. Is there some other way to silence that
output?

Thanks,

John

-- 
John Magolske
http://B79.net/contact

_______________________________________________
screen-users mailing list
screen-users@gnu.org
https://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to