-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathxinitrc
77 lines (62 loc) · 2.5 KB
/
xinitrc
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
#!/usr/bin/env bash
# ┌------┐
# ┌-----------┐┎───────────┒│ DFP9 │
# │ DFP10 │┃ DFP1 ┃│ 1200 │
# │ 1600x1200 │┃ 1920x1200 ┃│ 1920 │
# ┕-----┉-----┙┗─────┅─────┛│ │
# ┕--┈---┙
#xrandr --output DFP10 --auto --output DFP1 --primary --auto --left-of DFP9 --right-of DFP10 --output DFP9 --auto --rotate right --right-of DFP1
#xrandr --output HDMI-0 --auto --output DVI-0 --off --output DisplayPort-1 --off
# True Ergonomic Keyboard:
if xinput -list | grep 'keyboard' | grep -q 'TrulyErgonomic'; then
# Load language layouts and set toggler
setxkbmap -layout us,il -option grp:caps_toggle
# Map a single Shift-L keypress to Escape with a low delay
xcape -t 300 -e 'Shift_L=Escape'
# Microsoft All-in-one Media Keyboard:
else #if xinput -list | grep 'keyboard' | grep -q 'Microsoft.*Nano'; then
# Re-map CapsLock to Hyper_L and behave as Shift,
# if pressed by itself, behave as Escape.
spare_modifier="Hyper_L"
xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "keycode 66 = $spare_modifier"
xmodmap -e "remove mod4 = $spare_modifier"
xmodmap -e "add Shift mod4 = $spare_modifier"
xcape -t 300 -e "$spare_modifier=Escape"
# Re-map Shift_L to Control_R
xmodmap -e "keycode 50 = Control_R NoSymbol Control_R"
xmodmap -e "remove Shift = Control_R"
xmodmap -e "add Control = Control_R"
fi
# Load user X resource config
xrdb -merge "$XDG_CONFIG_HOME/xorg/Xresources"
# Load all fonts in all shared dirs
# xset +fp /usr/share/fonts/local
# xset +fp /usr/share/fonts/artwiz-fonts
# xset +fp /usr/share/fonts/envypn
# xset +fp /usr/share/fonts/cantarell
xset +fp /usr/share/fonts/termsyn
xset fp rehash
# X11 Key repeat (delay / rate)
xset r rate 230 35
# DPMS monitor setting (Standby -> Suspend -> Off, in seconds)
xset dpms 500 700 900
# Disable PC speaker beeps
xset -b
# Hide mouse and allow jitter
# Dont send pseudo events - prevents flickering ontop of some GTK apps
# unclutter -idle 3 -jitter 5 -noevents &
# Start daemons (only if not already running)
[[ -z "$(pgrep tmux)" ]] && tmux start &
# [[ -z "$(pgrep urxvtd)" ]] && urxvtd -q -o -f
# Load urxvt-client and tmux on startup
# urxvtc -cd "$HOME" -e /opt/local/bin/tmux -f "$HOME/.config/tmux/config"
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# Start i3 window-manager
exec i3
# vim: set ft=sh ts=2 sw=2 tw=80 noet :