Little tricks for Acer c720

Matthew Dillon dillon at backplane.com
Mon Jan 12 15:18:29 PST 2015


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/3f04ef6c/attachment.html>


More information about the Users mailing list