-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxsession
62 lines (57 loc) · 1.25 KB
/
xsession
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
isrunning() {
pidof $1 > /dev/null
}
try() {
if isrunning $(basename $1); then
echo "$1 already running."
return 0
fi
test x"`which $1 2>/dev/null`" != x""
if test $? -eq 0; then
$* &
sleep 0.3
if ! isrunning $1; then
echo "$1 isn't running. failed?"
return 1
fi
else
echo "failed to find $1" >&2
return 1
fi
return 0
}
try_sudo() {
if isrunning $(basename $1); then
echo "$1 already running."
return 0
fi
test x"`which $1 2>/dev/null`" != x""
if test $? -eq 0; then
sudo $* &
sleep 0.3
if ! isrunning $1; then
echo "$1 isn't running. failed?"
return 1
fi
else
echo "failed to find $1" >&2
return 1
fi
return 0
}
try xcompmgr -a
try gnome-settings-daemon
export `gnome-keyring-daemon`
try gnome-screensaver
try gnome-panel
try nm-applet --sm-disable
try bluetooth-applet
try gnome-power-manager
try dropbox start
try gtk-redshift -l 37.4:-122.0 -t 6500:4000
try keynav
sudo rm -f /tmp/*evrouter*
try_sudo evrouter -r /dev/input/by-id/usb-Microsoft_Natural®_Ergonomic_Keyboard_4000-if01-event-kbd
xmodmap ~/.Xmodmap
xcape
exec xmonad