forked from grawity/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xprofile
59 lines (47 loc) · 1.62 KB
/
xprofile
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
# ~/.xprofile - X11-specific login script (after ~/.profile)
# vim: ft=sh
if [ ! "$DESKTOP_SESSION" ]; then
compton &
case $(uname -s -m) in
'Linux i686') DARCH='i386-linux-gnu';;
'Linux x86_64') DARCH='x86_64-linux-gnu';;
esac
{ /usr/lib/notify-osd/notify-osd ||
/usr/lib/notification-daemon-1.0/notification-daemon; } &
{ /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 ||
/usr/lib/$DARCH/polkit-mate/polkit-mate-authentication-agent-1 ||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 ||
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1; } &
gnome-screensaver &
ibus-daemon --xim --single --daemonize &
# without --single it breaks modifier keys
# ayekat says --daemonize works better than &
xbindkeys &
fi
if [ "$DESKTOP_SESSION" != gnome ]; then
case $HOSTNAME in
rain)
touchpad="ETPS/2 Elantech Touchpad";;
frost)
touchpad="Synaptics s3203" accel="0.1";;
fujitsu)
touchpad="AlpsPS/2 ALPS GlidePoint";;
esac
if [ "$touchpad" ]; then
# org.gnome.desktop.peripherals.touchpad tap-to-click true
xinput set-prop "$touchpad" "libinput Tapping Enabled" 1
# org.gnome.desktop.peripherals.touchpad natural-scroll true
xinput set-prop "$touchpad" "libinput Natural Scrolling Enabled" 1
fi
if [ "$touchpad" ] && [ "$accel" ]; then
# org.gnome.desktop.peripherals.touchpad speed
xinput set-prop "$touchpad" "libinput Accel Speed" "$accel"
fi
fi
if [ "$XDG_SESSION_TYPE" = x11 ]; then
systemctl --user import-environment DISPLAY XAUTHORITY
systemctl --user --no-block start graphical.target
else
echo "not importing environment on console session"
fi
true