forked from palmer-dabbelt/home
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xinitrc
129 lines (112 loc) · 2.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/bash
# This is a login shell
source $HOME/.bash_profile
# There's a bunch of directories that I want to always have
mkdir -p ~/.local/log/mbacklight/
mkdir -p ~/.local/log/mhng-daemon/
mkdir -p ~/.local/log/mhng-notify/
# The window manager needs to run first, and I pretty much always want
# to run this window manager.
/usr/bin/awesome &
#########################################################
# Display Configuration
#########################################################
if [[ "$HOSTNAME" == "palmer-mbp2014" ]]
then
xrandr --dpi 157
( while true
do
mbacklight &>> ~/.local/log/mbacklight/$HOSTNAME.log
sleep 5m
done ) &
fi
if [[ "$HOSTNAME" == "palmer-x220" ]]
then
xbacklight -set 70
xrandr --dpi 125
fi
if test -f /etc/acpi/actions/xrandr.sh
then
xhost +localhost
xhost +local:
/etc/acpi/actions/xrandr.sh &
fi
if test -f ~/.local/etc/redshift/$HOSTNAME.conf
then
( while true
do
redshift -c ~/.local/etc/redshift/$HOSTNAME.conf &>> ~/.local/log/redshift/$HOSTNAME.log
sleep 1s
done ) &
fi
#########################################################
# Notification Daemons
#########################################################
if test -f /usr/bin/nm-applet
then
( while true
do
/usr/bin/nm-applet
sleep 1s
done ) &
fi
if test -f /usr/bin/cbatticon &
then
( while true
do
/usr/bin/cbatticon
sleep 1s
done ) &
fi
if test -f ~/.mhng/username
then
( while true
do
mhng-daemon &>> ~/.local/log/mhng-daemon/$HOSTNAME.log
sleep 1s
done ) &
( sleep 5s
while true
do
mhng-notify &>> ~/.local/log/mhng-notify/$HOSTNAME.log
sleep 1s
done ) &
fi
#########################################################
# Synergy
#########################################################
if test -f ~/.local/etc/synergys/$HOSTNAME.conf
then
( while true
do
synergys -f -c ~/.local/etc/synergys/$HOSTNAME.conf &>> ~/.local/log/synergys/$HOSTNAME.log
sleep 1s
done ) &
fi
if test -f ~/.local/etc/synergyc/$HOSTNAME.conf
then
( while true
do
synergyc -f $(cat ~/.local/etc/synergyc/$HOSTNAME.conf) &>> ~/.local/log/synergyc/$HOSTNAME.log
sleep 1s
done ) &
fi
#########################################################
# Applications
#########################################################
# My home Lulu laptop wants Firefox to run so I can talk to Lulu on
# the phone
if [[ "$HOSTNAME" == "palmer-x220" ]]
then
firefox &
fi
# My work Lulu laptop wants hexchat to run so I can talk to Lulu over
# IM
if [[ "$HOSTNAME" == "palmer-cb1101" ]]
then
hexchat &
fi
#########################################################
# Job Control #
#########################################################
wait