-
Notifications
You must be signed in to change notification settings - Fork 0
/
startup
executable file
·87 lines (75 loc) · 2.64 KB
/
startup
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
#!/bin/bash
# I'm not at all proud of this monstrosity :P
# To Do:
# * Clean me up!
date >> /tmp/.started_up
# Setup dual monitors - Did I mention how much I hate xrandr?
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync &> /dev/null 2>&1
xrandr --addmode DVI-I-0 1920x1080_60.00 &> /dev/null 2>&1
#xrandr --output DVI-I-0 --mode 1280x1024
xrandr --output DVI-I-0 --mode 1920x1080_60.00
xrandr --output HDMI-0 --mode 2560x1080 --primary
#xrandr --output HDMI-0 --mode 1920x1080 --primary
xrandr --output HDMI-0 --right-of DVI-I-0
if [[ -f .Xresources ]]
then
xrdb -merge .Xresources
fi
if [[ $XDG_SESSION_DESKTOP == "awesome-gnome" || $XDG_SESSION_DESKTOP == "awesome" ]]
then
ps aux | grep redshift-gtk | grep -v grep &> /dev/null 2>&1
if [[ $? -eq 1 ]]
then
redshift-gtk &> /dev/null 2>&1 &
fi
POLKIT_PID=
POLKIT_PID=$(pgrep -u $USER polkit-gnome-au)
if [[ $? -eq 1 ]]
then
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
fi
GNOME_SCREENSAVER_PID=
GNOME_SCREENSAVER_PID=$(pgrep -u $USER gnome-screen)
if [[ $? -eq 1 ]]
then
/usr/bin/gnome-screensaver &
fi
KDECONNECT_INDICATOR_PID=
KDECONNECT_INDICATOR_PID=$(pgrep -u $USER indicator-kdeco)
if [[ $? -eq 1 ]]
then
/bin/indicator-kdeconnect &> /dev/null 2>&1 &
fi
ps aux | grep pnmixer | grep -v grep &> /dev/null 2>&1
if [[ $? -eq 1 ]]
then
pnmixer &
fi
NVIDIA_SETTINGS_OVERRIDE=1
if [[ $(cat /usr/lib/modprobe.d/nvidia.conf) != "blacklist nvidia" && $NVIDIA_SETTINGS_OVERRIDE -ne 1 ]]
then
ps aux | grep nvidia-settings | grep -v grep || nvidia-settings --load-config-only &> /dev/null 2>&1 &
fi
#ps aux | grep conky | grep -v grep | grep conky\ \\-b\ \\-q || conky -b -q &> /dev/null 2>&1 &
#ps aux | grep conky | grep -v grep | grep conky\ \\-b\ \\-q || conky -b -q -x 1280 &> /dev/null 2>&1 &
ps aux | grep conky | grep -v grep | grep conky\ \\-b\ \\-q || conky -b -q -x 1920 &> /dev/null 2>&1 &
nm-applet &> /dev/null 2>&1
#ps aux | grep nvidia-settings | grep -v grep &> /dev/null 2&>1
#if [[ $? -eq 1 ]]
#then
# nvidia-settings &> /dev/null 2>&1 &
#fi
#xrandr --output HDMI-0 --mode 2560x1080
# Hack around the black wallpaper on the second monitor by restarting awesome after 1 second
if [[ ! -f /tmp/awesome-started ]]
then
touch /tmp/awesome-started
bash -c 'sleep 1 && xdotool key --clearmodifiers super+ctrl+r' &
else
rm /tmp/awesome-started
fi
fi
# Load Bluetooth modules for pulseaudio
pactl load-module module-bluetooth-discover &> /dev/null 2>&1 || true
pactl load-module module-bluez5-discover &> /dev/null 2>&1 || true
#autokey-gtk &> /dev/null 2&>1 &