Little tricks for Acer c720

Romick yellowrabbit2010 at gmail.com
Sun Jan 11 17:14:20 PST 2015


Hello,
below are some tricks which will make life with Acer c720 easier.
Note: I'm using a good old startx/.xinitrc, no fancy desktop managers:)

Home, End, Delete, ...
======================
With Alt as modifier you can get
Insert    = Alt + \
Delete    = Alt + BackSpace
Home      = Alt + Left
End       = Alt + Right
PageUp    = Alt + Up
PageDown  = Alt + Down

* Create dirs for keyboard configuration
mkdir -p ${HOME}/.config/xkb/types ${HOME}/.config/xkb/symbols

* Create modifiers' config file ${HOME}/.config/xkb/types/c720 which contains
xkb_types "c720" {
    virtual_modifiers Alt;
    type "ARROW" {
        modifiers    = Shift+Alt;
        map[Shift]  = Level2;
        map[Alt]    = Level3;
        map[Alt+Shift]    = Level3;
        level_name[Level1] = "Base";
        level_name[Level2] = "Caps";
        level_name[Level3] = "Alt";
    };
};

* Create symbols' config file ${HOME}/.config/xkb/symbols/c720 which contains
xkb_symbols "c720" {
    key <BKSL> {
        type="ARROW",
        repeat=yes,
        symbol[Group1] = [backslash, bar, Insert],
        symbol[Group2] = [backslash, slash, Insert],
        actions[Group1] = [
            NoAction(),
            NoAction(),
            RedirectKey(key=<INS>, clearmods=Alt)
        ],
        actions[Group2] = [
            NoAction(),
            NoAction(),
            RedirectKey(key=<INS>, clearmods=Alt)
        ]
    };
    key <BKSP> {
        type="ARROW",
        repeat=yes,
        [BackSpace, BackSpace, Delete],
        actions[Group1] = [
            NoAction(),
            NoAction(),
            RedirectKey(key=<DELE>, clearmods=Alt)
        ]
    };
    key <LEFT> {
        type="ARROW",
        [Left, Left, Home],
        actions[Group1] = [
            NoAction(),
            NoAction(),
            RedirectKey(key=<HOME>, clearmods=Alt)
        ]
    };
    key <RGHT> {
        type="ARROW",
        repeat=yes,
        [Right, Right, End],
        actions[Group1] = [
            NoAction(),
            NoAction(),
            RedirectKey(key=<END>, clearmods=Alt)
        ]
    };
    key <UP> {
        type="ARROW",
        repeat=yes,
        [Up, Up, Prior],
        actions[Group1] = [
            NoAction(),
            NoAction(),
            RedirectKey(key=<PGUP>, clearmods=Alt)
        ]
    };
    key <DOWN> {
        type="ARROW",
        [Down, Down, Next],
        actions[Group1] = [
            NoAction(),
            NoAction(),
            RedirectKey(key=<PGDN>, clearmods=Alt)
        ]
    };
};

* Add next line to .xinitrc (or in some autoload/autostart)
setxkbmap -layout "us+c720" -types "complete+c720" -print|xkbcomp -I"$HOME/.config/xkb" - "${DISPLAY%%.*}"

Sound volume
============
/dev/mixer1 below works for internal speakers & headphones for now.

Add next lines to ${HOME}/.xbindkeys
# volume
"mixer -f /dev/mixer1 vol -5"
  F9

"mixer -f /dev/mixer1 vol +5"
  F10

And next line to ${HOME}/.xinitrc
xbindkeys

Backlight brightness
====================
* Somewhere in the ${PATH} (in my case ${HOME}/local/bin) create two scripts.
brightness-inc.sh:
#!/bin/sh
LVL=`/sbin/sysctl -n hw.backlight_level`
/sbin/sysctl hw.backlight_level=$(( ${LVL} + 50 ))

brightness-dec.sh:
#!/bin/sh
LVL=`/sbin/sysctl -n hw.backlight_level`
/sbin/sysctl hw.backlight_level=$(( ${LVL} - 50 ))

* Add next lines to .xbindkeysrc
# brightness
"brightness-dec.sh"
  F6

"brightness-inc.sh"
  F7


Have a fun!:)




More information about the Users mailing list