45:2dcdfa99f87d | 46:fe410dc840a6 |
---|---|
1 #! /bin/sh | 1 #! /bin/sh |
2 | 2 |
3 # Simple autostart file for i3-wm, you can execute it from i3 config with | 3 # Simple autostart file for i3-wm, you can execute it from i3 config with |
4 # exec $HOME/bin/auto-start-for-i3 | 4 # exec $HOME/bin/auto-start-for-i3 |
5 # | 5 # |
6 # xdotool and xmessage must be installed. On BSD use jot instead of | 6 # xdotool and notify-send must be installed. On BSD use jot instead of |
7 # seq or install seq from ports. | 7 # seq or install seq from ports. |
8 | 8 |
9 | 9 |
10 # Max seconds to wait until the process is up | 10 # Max seconds to wait until the process is up |
11 MAXWAIT=10 | 11 MAXWAIT=10 |
21 if xdotool search --onlyvisible --pid $mypid; then | 21 if xdotool search --onlyvisible --pid $mypid; then |
22 return 0 | 22 return 0 |
23 fi | 23 fi |
24 sleep 1 | 24 sleep 1 |
25 done | 25 done |
26 xmessage "Error on executing: $@" & | 26 notify-send "Error on executing: $@" |
27 } | 27 } |
28 | 28 |
29 StartProgName() | 29 StartProgName() |
30 { | 30 { |
31 "$@" & # Handle arguments with whitspaces | 31 "$@" & # Handle arguments with whitspaces |
36 if xdotool search --onlyvisible --name $1; then | 36 if xdotool search --onlyvisible --name $1; then |
37 return 0 | 37 return 0 |
38 fi | 38 fi |
39 sleep 1 | 39 sleep 1 |
40 done | 40 done |
41 xmessage "Error on executing: $@" & | 41 notify-send "Error on executing: $@" |
42 } | 42 } |
43 | 43 |
44 # ### --- emacs --- ### | 44 # ### --- emacs --- ### |
45 # StartProg emacs | 45 # StartProg emacs |
46 # | 46 # |