-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xinitrc
executable file
·112 lines (82 loc) · 3.9 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/zsh
# xfce4 leftovers - GTK theme & icons {{{
xfsettingsd
# xfce4-session
# }}}
# inputs {{{
# use TrackPoint for scrolling together with middle button {{{
xinput set-prop "TPPS/2 Elan TrackPoint" "Evdev Wheel Emulation" 1
xinput set-prop "TPPS/2 Elan TrackPoint" "Evdev Wheel Emulation Button" 2
# }}}
# natural scrolling {{{
xinput set-prop 'SYNA8004:00 06CB:CD8B Touchpad' "Synaptics Scrolling Distance" -40, -40 || echo "xinput failed in ~/.xinitrc"
xinput set-prop 13 "Evdev Wheel Emulation Axes" 7, 6, 5, 4 || echo "xinput failed in ~/.xinitrc"
xinput set-prop "Nikola's Trackpad" "Synaptics Edge Scrolling" 0, 0, 0 || echo "xinput(Nikola's Trackpad) failed in ~/.xinitrc"
xinput set-prop "Nikola's Trackpad" "Synaptics Scrolling Distance" -157, -157 || echo "xinput(Nikola's Trackpad) failed in ~/.xinitrc"
xinput set-button-map "TPPS/2 Elan TrackPoint" 1 0 3 5 4 7 6 || echo "xinput failed in ~/.xinitrc"
# yes, this one is outlier - 7 6 4 5 🤷 don't know why
xinput set-prop "TPPS/2 Elan TrackPoint" "Evdev Wheel Emulation Axes" 7 6 4 5
xinput set-prop 'Logitech USB Trackball' 293 7, 6, 5, 4 || echo "xinput failed in ~/.xinitrc"
# }}}
# disable touchpad {{{
xinput set-prop 'SYNA8004:00 06CB:CD8B Touchpad' "Device Enabled" 0 || echo "xinput failed in ~/.xinitrc"
xinput set-prop 'SYNA8004:00 06CB:CD8B Mouse' "Device Enabled" 0 || echo "xinput failed in ~/.xinitrc"
synclient TouchpadOff=1
# }}}
# remap keyboard keys CAPS = (ESC, CTRL), SPACE = (SPACE, FN). (wait for X)
$(sleep 3 && ~/.xinitrc-keyboard-remap) &
# monitor plugging in new keyboards and reapply remapping on such events
$(sleep 3 && inputplug -c ~/Tools/on-new-kbd.sh)
# keyboard repeat rate
xset r rate 330 44
# }}}
####### screen(saving) ~~~~~~~~~~~~~~~~~~~
# for actual screensaver (look at ~/.Xdefaults for timeout setting)
# xscreensaver &
# run the xautolock locker wrapper (go blank if no activity) while screen is locked
xss-lock -- ~/.config/i3/lock.sh &
# for blacking out the screen
# xset dpms 1800
# desktop wallpaper (wait for compton)
$(sleep 3 && betterlockscreen -r 2560x1440 -w)
# this is just for setting up xautolock locker, it runs no timer for locking
# xautolock -detectsleep -locker "i3lock-fancy -gp -f Iosevka-Term-Thin-Nerd-Font-Complete-Mono" &
xautolock -detectsleep -locker "betterlockscreen -l blur -r 2560x1440 &" -corners -+0- -cornerdelay 1 -cornersize 12 &
# xautolock -detectsleep -locker "i3lock -c 994488 --ignore-empty-password"
####### autostart apps ~~~~~~~~~~~~~~~~~~~
# FIXME: calendar
# THIS FAILS, don't know why: orage && orage --toggle && orage --toggle
# also need to solve duplicates of events
# eval $(ssh-agent)
# keepassxc (sleep to load i3wm layout)
$(sleep 3 && keepassxc) &
# signal messenger (sleep to load i3wm layout)
$(sleep 3 && signal-desktop) &
# Slack firefox (sleep to load i3wm layout)
# $(sleep 4 && ~/.local/share/applications/Slack\ \[Firefox\].desktop) &
# start cadence session (jack & pulse), no tray
# not using jack anymore: cadence-session-start -s
pulseaudio &
# notification daemon
dunst &
# copyQ
copyq &
# network manager applet
$(sleep 3 && nm-applet) &
# bluetooth manager applet
$(sleep 3 && XDG_CURRENT_DESKTOP=gnome dbus-launch /usr/bin/blueman-applet) &
# volume / audio mixer applet
$(sleep 3 && pasystray --volume-max 100 --volume-inc 3 --notify all) &
# screenshot tool
$(sleep 3 && XDG_CURRENT_DESKTOP=gnome dbus-launch /usr/bin/flameshot) &
####### visual stuff ~~~~~~~~~~~~~~~~~~~~~
# f.lux - night mode applet
#sh -c fluxgui
# init ~/.Xresources
xrdb -merge ~/.Xresources
# exec --no-startup-id compton -cCGb --backend glx --vsync opengl
compton -cCGb --backend glx --vsync opengl
# flash window on focus (wait for compton)
$(sleep 3 && flashfocus) &
exec dbus-launch --exit-with-session i3 # --shmlog-size=26214400 # -d all 2>&1 1>/home/nikola/i3.log
# exec dbus-launch --exit-with-session /usr/bin/i3