-
Notifications
You must be signed in to change notification settings - Fork 10
/
autostart
executable file
·127 lines (100 loc) · 3 KB
/
autostart
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
#!/bin/sh
# Packages you need to install on Fedora in order to get this setup:
# dnf install i3lock dmenu dunst network-manager-applet workrave stardict numlockx feh \
# scrot f\*-backgrounds-base f\*-backgrounds-extras-base
# Also using:
# https://github.com/Tomas-M/xlunch
# Wait for program coming up
wait_for_program () {
n=0
while true
do
# PID of last background command
if xdotool search --onlyvisible --pid $! 2>/dev/null; then
break
else
if [ $n -eq 200 ]; then
notify-send -u critical "Error during start: last program $! did not started fast enough"
break
else
n=`expr $n + 1`
sleep 0.1
fi
fi
done
}
## Merge Xresources
xrdb -merge ~/.Xresources &
## Desktop background or picture
#xsetroot -solid '#101010' &
feh --bg-fill $(find /usr/share/backgrounds -type f -name \*jpg -o -name \*.png | shuf -n 1)
## Terminal daemon
TERMINAL=xterm
## Load samples for volume keys feedback
pactl upload-sample ~/.i3/that_was_easy.wav that_was_easy &
pactl upload-sample ~/.i3/volume_blip.wav volume_blip &
pactl upload-sample ~/.i3/mute.wav mute &
pactl upload-sample ~/.i3/speak.wav speak &
## Disable beeps
xset -b &
## Keybord layout setting
setxkbmap -layout cz,us -option grp:shift_shift_toggle &
## C-A-Backspace to kill X
#setxkbmap -option terminate:ctrl_alt_bksp &
## Turns on the numlock key in X11
numlockx on &
## DPMS monitor setting (standby -> suspend -> off) (seconds)
xset dpms 600 1200 2000 &
## Set LCD brightness
xbacklight -set 100 &
## Gamma correction through the X server
#xgamma -gamma 1.1 &
## Mouse and trackball setup
~/bin/configure-input-devices >/dev/null 2>&1 &
## Configure panel from left side
PRIM_OUT=DP-1
SEC_OUT=DVI-D-1
xrandr --output $SEC_OUT --mode 1280x1024 --right-of $PRIM_OUT --output $PRIM_OUT --mode 2560x1440
## OSD
LC_ALL=C dunst &
## Sublime Text
#i3-msg "workspace 1; move workspace to output $PRIM_OUT"
#/opt/sublime_text/sublime_text &
#wait_for_program
## Setup workspaces and terminals
for w in 1 2 3 4; do
i3-msg "workspace $w; move workspace to output $PRIM_OUT"
$TERMINAL &
wait_for_program
i3-msg split h
$TERMINAL &
wait_for_program
i3-msg split v
i3-msg "focus left; split v"
#i3-msg "move workspace to output $DP"
done
i3-msg workspace 5
#i3-msg layout tabbed
~/bin/chrome &
for w in 6 7 8 9 10; do
i3-msg "workspace $w; move workspace to output $SEC_OUT"
done
## Start apps with defined workspaces
i3-msg "workspace 6"
#$TERMINAL -e weechat-curses &
#flatpak run com.github.quaternion/x86_64/stable &>/dev/null &
hexchat &>/dev/null &
## Refresh
xrefresh &
## Special keys
sleep 4s && xmodmap /home/lzap/.Xmodmap &
## Start taskbar utils
LC_ALL=C parcellite &>/dev/null &
LC_ALL=C nm-applet &>/dev/null &
#LC_ALL=C workrave &>/dev/null &
#LC_ALL=C dropbox start &>/dev/null &
## Update launcher cache
bash /home/lzap/work/xlunch/extra/genentries -p /home/lzap/.local/share/icons > /home/lzap/.config/xlunch/entries.dsv 2>/dev/null &
#dmenu_path >/dev/null &
## Good work :-)
exit 0