Little tricks for Acer c720

Matthew Dillon dillon at backplane.com
Mon Jan 12 15:19:24 PST 2015


(oops, remove the debugging ... the three echo's to standard out.  Leave
the one that stores to ~/.savemute)

-Matt

On Mon, Jan 12, 2015 at 3:18 PM, Matthew Dillon <dillon at backplane.com>
wrote:

> Hey, pretty cool.  I never got around to making those keys work.  I wrote
> some scripts for the backlight and mute as well. So here's my .xbindkeysrc
> (modify paths as appropriate).
>
>
> # Screen
> #
> "/home/dillon/adm/backlight -10"
>         F6
> "/home/dillon/adm/backlight 10"
>         F7
>
> # Volume
> #
> "/home/dillon/adm/mute"
>         F8
> "mixer -f /dev/mixer1 vol -5"
>         F9
> "mixer -f /dev/mixer1 vol +5"
>         F10
>
> And my two scripts:
>
> #!/bin/csh
> #
> # backlight script
>
> set level = `sysctl -n hw.backlight_level`
> @ level = $level + $argv
> sysctl hw.backlight_level=${level}
>
>
>
> #!/bin/csh
> #
> # mute script
>
> set curvol = "`mixer -f /dev/mixer1 -s vol`"
>
> if ( -f ~/.savemute ) then
>         set lastvol = "`cat ~/.savemute`"
> else
>         set lastvol = ""
> endif
>
> if ( "$curvol" == "vol 0:0 " ) then
>         if ( "$lastvol" != "" ) then
>                 eval mixer -f /dev/mixer1 $lastvol
>         endif
> else
>         echo B
>         echo last "$lastvol"
>         echo curr "$curvol"
>         if ( "$lastvol" != "$curvol" ) then
>                 echo "$curvol" > ~/.savemute
>         endif
>         mixer -f /dev/mixer1 vol 0
> endif
>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20150112/f87e9dd8/attachment-0003.htm>


More information about the Users mailing list