-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.xinitrc
More file actions
48 lines (33 loc) · 1.16 KB
/
Copy path.xinitrc
File metadata and controls
48 lines (33 loc) · 1.16 KB
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
#!/bin/sh
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
RESOLUTION=$(xdpyinfo | awk '/dimensions/{print $2}' | cut -d 'x' -f1)
[ -z $RESOLUTION ] && RESOLUTION=1920
SCREEN_SCALE=$(($RESOLUTION / 1920))
((RESOLUTION == 3000)) && SCREEN_SCALE=2
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export GDK_SCALE=${SCREEN_SCALE}
if ((SCREEN_SCALE >= 2)); then
export GDK_DPI_SCALE=0.5
# Would be overwritten by ~/.config/chrome-flags.conf
export CHROME_USER_FLAGS="--force-device-scale-factor=2.0"
export CHROMIUM_USER_FLAGS="--force-device-scale-factor=2.0"
fi
(sleep 5 && xset r rate 200 80) &
xhost +SI:localuser:root &
((SCREEN_SCALE >= 2)) && xrandr --dpi 192
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
((SCREEN_SCALE >= 2)) && [[ -f ~/.Xresources-4K ]] && xrdb -merge -I$HOME ~/.Xresources-4K
~/.fehbg &
picom -CGb &
redshift &
(sleep 10 && dropbox-cli start) &
# %wheel ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart xkeysnail
(sleep 1 && sudo systemctl restart xkeysnail) &
xautolock -time 10 -corners +00- -locker slock &
while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
do
sleep 1
done &
exec dbus-launch dwm