Changeset 3ee56cf for remctl


Ignore:
Timestamp:
Sep 6, 2010, 9:48:06 PM (14 years ago)
Author:
Mats Ahlgren <mats@…>
Branches:
master, debian, mac, no-cups
Children:
e01a3af
Parents:
04a6a66
git-author:
Mats Ahlgren <mats@…> (09/06/10 21:48:06)
git-committer:
Mats Ahlgren <mats@…> (09/06/10 21:48:06)
Message:

added remctl helper file called volume-helper.py
this script smoothly moves volume up/down over 3sec (large step)

made volume-up and volume-down call it (volume-helper.py +/-)

this commit also contains a bugfix by quentin: previously
"amixer set PCM -3dB" would recognize -3dB as "option 3dB",
fixed by means of using "--" in the calling convention

Location:
remctl/lib/gutenbach
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • remctl/lib/gutenbach/volume-down

    r9c0279e r3ee56cf  
    11#!/bin/sh
    22PATH="$(dirname $0):$PATH"
    3 volume-set . $(( $(volume-get .) - 1 ))
     3
     4python "$(dirname $0)/volume-helper.py" -
     5
     6#volume-set . $(( $(volume-get .) - 1 ))
  • remctl/lib/gutenbach/volume-get

    r04a6a66 r3ee56cf  
    55channel=$(/usr/lib/gutenbach/gutenbach-get-config channel)
    66
    7 amixer get $mixer | grep "^  $channel" | perl -lpe "s/$channel: Playback //g;s/\[off\]/muted/g;s/\[on\]//g"
     7amixer get $mixer | grep "^  $channel" | perl -lpe "s/  $channel: Playback //g;s/\[off\]/muted/g;s/\[on\]//g" 
  • remctl/lib/gutenbach/volume-set

    r04a6a66 r3ee56cf  
    11#!/bin/sh
    22PATH="$(dirname $0):$PATH"
     3
     4# $1 is string "set" and is unused (passed in via remctl)
     5# $2 is the actual volume
    36
    47mixer=$(/usr/lib/gutenbach/gutenbach-get-config mixer)
    58channel=$(/usr/lib/gutenbach/gutenbach-get-config channel)
    69
    7 amixer set $mixer "$2" | grep "^  $channel" | perl -lpe "s/  $channel: Playback //g;s/\[off\]/muted/g;s/\[on\]//g"
     10amixer set $mixer -- "$2" | grep "^  $channel" | perl -lpe "s/  $channel: Playback //g;s/\[off\]/muted/g;s/\[on\]//g"
    811
    912volume-zephyr
  • remctl/lib/gutenbach/volume-up

    r9c0279e r3ee56cf  
    11#!/bin/sh
    22PATH="$(dirname $0):$PATH"
    3 volume-set . $(( $(volume-get .) + 1 ))
     3
     4python "$(dirname $0)/volume-helper.py" +
     5
     6#volume-set . $(( $(volume-get .) + 1 ))
Note: See TracChangeset for help on using the changeset viewer.