-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.sh-profile
100 lines (83 loc) · 2.63 KB
/
.sh-profile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# -*- shell-script -*-
set -a
# *********
# * *
# * INPUT *
# * *
# *********
# ---KEY REPEAT---
xset r rate 250 50 # X key repeat: xset r rate <ms delay> <char per sec>
#kbdrate -r 50 -d 250 # console key repeat: kbdrate -r <cps> -d <ms>
#---KEY REBINDING---
if [[ -e ~/.Xmodmap ]]; then xmodmap ~/.Xmodmap; fi
# # Swap Ctrl and Caps Lock
# setxkbmap -option "ctrl:swapcaps"
# Make Caps Lock an additional Ctrl
# setxkbmap -option "caps:ctrl_modifier"
setxkbmap -option "ctrl:nocaps"
# Add the standard behavior to Menu key
setxkbmap -option "altwin:menu"
# compose key (multi-key)
setxkbmap -option "compose:lctrl"
setxkbmap -option "compose:sclk"
# kill x-server
setxkbmap -option "terminate:ctrl_alt_bksp"
# Both Shift keys together activate Caps Lock, one Shift key deactivates
setxkbmap -option "shift:both_capslock_cancel"
# switch layout
setxkbmap -option "grp:sclk_toggle"
setxkbmap -option "grp:rctrl_rshift_toggle"
# fix End key (mapped to SuperL for unknown reason)
xmodmap -e "keycode 115 = End NoSymbol End"
# Fix Pause button
xmodmap -e "keycode 127 = Pause"
# # L Control -> Hyper
# xmodmap -e "keycode 37 = Hyper_L"
# extra function key keycodes
xmodmap -e "keycode 93 = F18"
xmodmap -e "keycode 94 = F19"
# menu -> super key (use xcape to recover menu key function)
xmodmap -e "keysym Menu = Super_R"
# =======
# XCAPE
# =======
# usage: xcape [-d] [-t <timeout ms>] [-e <map-expression>]
# where <map-expression> has the grammar: MapExpression ::= ModKey=Key[|OtherKey][;MapExpression]
# and Key/OtherKey names are as found in /usr/include/X11/keysymdef.h (with the XK_ prefixes removed)
if ! pgrep xcape >/dev/null; then
#xcape -t 300 -e 'Control_L=Escape;Super_R=Menu;Control_R=Multi_key;Shift_L=parenleft;Shift_R=parenright' &
# xcape -t 300 -e 'Caps_Lock=Escape;Super_R=Menu' &
xcape -t 300 -e 'Control_L=Escape;Super_R=Menu;Hyper_L=Multi_key' &
fi
# # ********
# # * *
# # * IBUS *
# # * *
# # ********
# ---run ibus-daemon---
# pgrep ibus-daemon || IBUS_ENABLE_SYNC_MODE=1 ibus-daemon -xrd
# *********
# * *
# * FCITX *
# * *
# *********
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
# *********
# * *
# * GNOME *
# * *
# *********
# gconftool --set -t string /desktop/gnome/interface/gtk_key_theme Vim
# gconftool --set -t string /desktop/gnome/interface/gtk_key_theme Emacs
# ***************
# * *
# * ENVIRONMENT *
# * *
# ***************
# load .sh-env
[[ -e ~/.sh-env ]] && source ~/.sh-env
# load .sh-ssh
[[ -e ~/.sh-ssh ]] && source ~/.sh-ssh
set +a