Fri, 13 Jun 2014 10:34:30 -0400
add private bin/ to path, run urxvtd and xcompmgr always if available
1 | 1 | #! /bin/sh |
2 | ||
3 | # Simple autostart file for i3-wm, you can execute it from i3 config with | |
4 | # exec $HOME/bin/auto-start-for-i3 | |
5 | # | |
46 | 6 | # xdotool and notify-send must be installed. On BSD use jot instead of |
1 | 7 | # seq or install seq from ports. |
8 | ||
9 | ||
10 | # Max seconds to wait until the process is up | |
11 | MAXWAIT=10 | |
12 | ||
13 | # Start the given command and wait until it's visible | |
14 | StartProg() | |
15 | { | |
16 | "$@" & # Handle arguments with whitspaces | |
17 | mypid=$! # Pid of last background process | |
18 | echo "Waiting on ${mypid}: $@" | |
19 | for i in `seq $MAXWAIT` # count from 1 to MAXWAIT | |
20 | do | |
21 | if xdotool search --onlyvisible --pid $mypid; then | |
22 | return 0 | |
23 | fi | |
24 | sleep 1 | |
25 | done | |
46 | 26 | notify-send "Error on executing: $@" |
1 | 27 | } |
28 | ||
29 | StartProgName() | |
30 | { | |
31 | "$@" & # Handle arguments with whitspaces | |
32 | mypid=$! # Pid of last background process | |
33 | echo "Waiting on $1: $@" | |
34 | for i in `seq $MAXWAIT` # count from 1 to MAXWAIT | |
35 | do | |
36 | if xdotool search --onlyvisible --name $1; then | |
37 | return 0 | |
38 | fi | |
39 | sleep 1 | |
40 | done | |
46 | 41 | notify-send "Error on executing: $@" |
1 | 42 | } |
43 | ||
44 | # ### --- emacs --- ### | |
45 | # StartProg emacs | |
46 | # | |
47 | # ### --- ding ---- ### | |
48 | # StartProg ding | |
49 | # i3-msg border none | |
50 | # | |
51 | # # make right half bigger | |
52 | # i3-msg resize grow left 16 px or 16 ppt | |
53 | # | |
54 | # # build container | |
55 | # i3-msg split v | |
56 | # sleep 1 | |
57 | # | |
58 | # ### --- terminal --- ### | |
59 | # StartProg rxvt | |
60 | # | |
61 | # # Make Terminal bigger and Ding smaller | |
62 | # i3-msg resize grow up 32 px or 32 ppt | |
63 | # | |
64 | # ### --------------------------------- tab START--- ### | |
65 | # ### ---------------------------------------------- ### | |
66 | # i3-msg split v | |
67 | # i3-msg layout tabbed | |
68 | # | |
69 | # ### --- gnome-commander --- ### | |
70 | # StartProg gnome-commander | |
71 | # | |
72 | # ### --- chromium --- ### | |
73 | # StartProg chromium | |
74 | # | |
75 | # ### --- pdf --- ### | |
76 | # StartProg evince "~/Dokumente/Haskell/Haskell.pdf" | |
77 | # ### ---------------------------------------------- ### | |
78 | # ### ---------------------------------- tab END --- ### | |
79 | # | |
80 | # ### --- new terminal left under emacs --- ### | |
81 | # i3-msg focus left | |
82 | # i3-msg split v | |
83 | # StartProg rxvt | |
84 | # | |
85 | # # terminal without border and make it smaller | |
86 | # i3-msg border none | |
87 | # i3-msg resize shrink up 32 px or 32 ppt | |
88 | # | |
89 | ||
34
33bdbdb9ec90
Make dedicated workspace for Mail
Meredith Howard <mhoward@roomag.org>
parents:
23
diff
changeset
|
90 | ionice -c3 nice /usr/bin/icedove & |
23
a61d6f99a162
Create branch mhoward-lt for host-specific stuff
Meredith Howard <mhoward@roomag.org>
parents:
1
diff
changeset
|
91 | |
34
33bdbdb9ec90
Make dedicated workspace for Mail
Meredith Howard <mhoward@roomag.org>
parents:
23
diff
changeset
|
92 | i3-msg 'workspace 2; exec urxvt' |
1 | 93 | |
34
33bdbdb9ec90
Make dedicated workspace for Mail
Meredith Howard <mhoward@roomag.org>
parents:
23
diff
changeset
|
94 | # i3-msg 'split h' |
33bdbdb9ec90
Make dedicated workspace for Mail
Meredith Howard <mhoward@roomag.org>
parents:
23
diff
changeset
|
95 | # |
33bdbdb9ec90
Make dedicated workspace for Mail
Meredith Howard <mhoward@roomag.org>
parents:
23
diff
changeset
|
96 | # StartProgName gvim |
1 | 97 | |
23
a61d6f99a162
Create branch mhoward-lt for host-specific stuff
Meredith Howard <mhoward@roomag.org>
parents:
1
diff
changeset
|
98 | # i3-msg 'focus left; split v' |
a61d6f99a162
Create branch mhoward-lt for host-specific stuff
Meredith Howard <mhoward@roomag.org>
parents:
1
diff
changeset
|
99 | # |
a61d6f99a162
Create branch mhoward-lt for host-specific stuff
Meredith Howard <mhoward@roomag.org>
parents:
1
diff
changeset
|
100 | # StartProg xfce4-terminal |
a61d6f99a162
Create branch mhoward-lt for host-specific stuff
Meredith Howard <mhoward@roomag.org>
parents:
1
diff
changeset
|
101 | # |
a61d6f99a162
Create branch mhoward-lt for host-specific stuff
Meredith Howard <mhoward@roomag.org>
parents:
1
diff
changeset
|
102 | # i3-msg 'resize shrink height 20 px or 20 ppt' |
1 | 103 | |
104 | exit 0 |