mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-03 14:54:21 +02:00
keys: remove keyboard configuration from Lua code
Everything is now handled by inputplug.
This commit is contained in:
parent
3e9a3f8662
commit
a6506a223f
4 changed files with 35 additions and 20 deletions
|
@ -18,6 +18,9 @@ xkb() {
|
||||||
printf "$use: [%3d] $name\n" $device
|
printf "$use: [%3d] $name\n" $device
|
||||||
|
|
||||||
case "$use,$(uname -n),$name" in
|
case "$use,$(uname -n),$name" in
|
||||||
|
XISlaveKeyboard,zoro,"AT Translated Set 2 keyboard")
|
||||||
|
xkb x1
|
||||||
|
;;
|
||||||
XISlaveKeyboard,guybrush,"AT Translated Set 2 keyboard")
|
XISlaveKeyboard,guybrush,"AT Translated Set 2 keyboard")
|
||||||
xkb norwin
|
xkb norwin
|
||||||
;;
|
;;
|
||||||
|
@ -35,6 +38,10 @@ case "$use,$(uname -n),$name" in
|
||||||
xinput set-prop $device 'Evdev Wheel Emulation Button' 2
|
xinput set-prop $device 'Evdev Wheel Emulation Button' 2
|
||||||
xinput set-prop $device 'Evdev Wheel Emulation Axes' 6 7 4 5
|
xinput set-prop $device 'Evdev Wheel Emulation Axes' 6 7 4 5
|
||||||
;;
|
;;
|
||||||
|
XISlavePointer,zoro,"SynPS/2 Synaptics TouchPad")
|
||||||
|
xinput set-prop $device 'Synaptics Soft Button Areas' 3656 5112 0 2200 2928 3656 0 2200
|
||||||
|
xinput set-prop $device 'Synaptics Area' 0 0 2200 0
|
||||||
|
;;
|
||||||
XISlavePointer,guybrush,"SynPS/2 Synaptics TouchPad")
|
XISlavePointer,guybrush,"SynPS/2 Synaptics TouchPad")
|
||||||
xinput set-prop $device 'Synaptics Off' 1
|
xinput set-prop $device 'Synaptics Off' 1
|
||||||
;;
|
;;
|
||||||
|
|
20
rc/start.lua
20
rc/start.lua
|
@ -21,26 +21,6 @@ local execute = {
|
||||||
"xdg-mime default gpicview.desktop image/png image/x-apple-ios-png image/jpeg image/jpg image/gif"
|
"xdg-mime default gpicview.desktop image/png image/x-apple-ios-png image/jpeg image/jpg image/gif"
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Keyboard/Mouse configuration
|
|
||||||
if config.hostname == "zoro" then
|
|
||||||
execute = awful.util.table.join(
|
|
||||||
execute, {
|
|
||||||
-- Keyboard and mouse
|
|
||||||
"setxkbmap us,fr '' compose:ralt grp:rctrl_rshift_toggle",
|
|
||||||
"xmodmap -e 'keycode 110 = Control_L'", -- home
|
|
||||||
"xmodmap -e 'keycode 115 = Control_L'", -- end
|
|
||||||
"xmodmap -e 'add control Control_L Control_R'",
|
|
||||||
"xmodmap -e 'keycode 49 = Insert", -- between alt_l and ctrl_l
|
|
||||||
"xmodmap -e 'keycode 9 = grave asciitilde'", -- escape
|
|
||||||
-- Wheel emulation
|
|
||||||
"xinput set-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation' 1",
|
|
||||||
"xinput set-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Button' 2",
|
|
||||||
"xinput set-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Axes' 6 7 4 5",
|
|
||||||
-- Make touchpad buttons work
|
|
||||||
"xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Soft Button Areas' 3656 5112 0 2200 2928 3656 0 2200",
|
|
||||||
"xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Area' 0 0 2200 0"})
|
|
||||||
end
|
|
||||||
|
|
||||||
os.execute(table.concat(execute, ";"))
|
os.execute(table.concat(execute, ";"))
|
||||||
|
|
||||||
-- Spawn various X programs
|
-- Spawn various X programs
|
||||||
|
|
|
@ -11,3 +11,12 @@ xkb_symbols "webcam" {
|
||||||
[ XF86ScreenSaver, NoSymbol ]
|
[ XF86ScreenSaver, NoSymbol ]
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
partial
|
||||||
|
xkb_symbols "x1" {
|
||||||
|
replace key <HOME> { [ Control_L, Control_L ] };
|
||||||
|
replace key <END> { [ Control_L, Control_L ] };
|
||||||
|
modifier map Control { Control_L, <HOME>, <END> };
|
||||||
|
replace key <TLDE> { [ Insert ] };
|
||||||
|
replace key <ESC> { [ grave, asciitilde, dead_grave, dead_tilde ] };
|
||||||
|
};
|
||||||
|
|
19
xkb/x1.xkb
Normal file
19
xkb/x1.xkb
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# -*- conf -*-
|
||||||
|
|
||||||
|
# Configuration for a Lenovo X1 Carbon Gen 2 keyboard
|
||||||
|
#
|
||||||
|
# This keyboard is a mess. Really. Here is what we do about it:
|
||||||
|
#
|
||||||
|
# - transform Home and End as a Control_L key
|
||||||
|
# - transform Backquote (between left alt and left ctrl) into Insert
|
||||||
|
# - transform Escape to Backquote. Let's say we don't need escape.
|
||||||
|
#
|
||||||
|
# Escape can be replaced with C-[. See:
|
||||||
|
# http://vim.wikia.com/wiki/Avoid_the_escape_key
|
||||||
|
xkb_keymap {
|
||||||
|
xkb_keycodes { include "evdev+aliases(qwerty)" };
|
||||||
|
xkb_types { include "complete" };
|
||||||
|
xkb_compat { include "complete" };
|
||||||
|
xkb_symbols { include "pc+us+fr:2+inet(evdev)+compose(ralt)+ctrl(nocaps)+group(rctrl_rshift_toggle)+vbe(x1)" };
|
||||||
|
xkb_geometry { include "pc(pc105)" };
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue