-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset-keymap
executable file
·27 lines (21 loc) · 902 Bytes
/
set-keymap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
# set layout
xmodmap $XDG_CONFIG_HOME/X11/Xmodmap
# increase key press raate
xset r rate 250 50
# make caps as escape + hyper_l | control_l
killall xcape
# laptop config if no keyboard connected
if [[ -z $(lsusb | rg Keyboard) ]]; then
xmodmap $XDG_CONFIG_HOME/X11/Xmodmap.laptop
xcape -e 'Control_L=Escape'
notify-send Layout 'Laptop DVORAK'
else
xcape -e 'Hyper_L=Escape'
fi
#[[ -z $(lsusb | rg -i Keyboard > /dev/null) ]] && echo 0 &&
# xmodmap $XDG_CONFIG_HOME/X11/Xmodmap.laptop && echo 1 &&
# xcape -e 'Control_L=Escape' || xcape -e 'Hyper_L=Escape' && echo 2
# if want to set using setxkbmap
#setxkbmap -model 'pc104' -layout 'us,in' -variant 'dvp,eng'
#setxkbmap -option "grp:alt_space_toggle, grp_led:caps, grp_led:scroll, caps:escape, compose:sclk, shift:both_shiftlock keypad:pointerkeys, rupeesign:i1, altwin:swap_lalt_lwin, keypad:pointerkeys, terminate:ctrl_alt_bksp"