copy auto-start from default mhoward-lt

Sun, 15 Jun 2014 11:25:55 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 15 Jun 2014 11:25:55 -0400
branch
mhoward-lt
changeset 59
7171e2a98c17
parent 58
b88790409ef3
child 60
d18a4be6db77

copy auto-start from default

.i3/auto-start file | annotate | diff | comparison | revisions
--- a/.i3/auto-start
+++ b/.i3/auto-start
@@ -41,6 +41,33 @@ StartProgName()
     notify-send "Error on executing: $@"
 }
 
+WaitProgName()
+{
+    echo "Waiting on $1"
+    for i in `seq $MAXWAIT` # count from 1 to MAXWAIT
+    do
+    	if xdotool search --onlyvisible --name $1; then
+    	    return 0
+    	fi
+	sleep 1
+    done
+    notify-send "Error waiting on $1: $@"
+}
+
+WaitClassName()
+{
+    echo "Waiting on window class $1"
+    for i in `seq $MAXWAIT` # count from 1 to MAXWAIT
+    do
+    	if xdotool search --onlyvisible --class $1; then
+    	    return 0
+    	fi
+	sleep 1
+    done
+    notify-send "Error waiting on $1: $@"
+}
+
+
 # ### --- emacs --- ###
 # StartProg emacs
 #
@@ -87,18 +114,15 @@ StartProgName()
 # i3-msg resize shrink up 32 px or 32 ppt
 #
 
-ionice -c3 nice /usr/bin/icedove &
-
-i3-msg 'workspace 2; exec urxvtc || urxvt'
-
+# StartProg urxvt
 # i3-msg 'split h'
-#
 # StartProgName gvim
-
 # i3-msg 'focus left; split v'
-#
-# StartProg xfce4-terminal
-#
+# StartProg urxvt
 # i3-msg 'resize shrink height 20 px or 20 ppt'
 
+if [ -r ~/.i3/auto-start.local ]; then
+  . .i3/auto-start.local
+fi
+
 exit 0

mercurial