Add i3 autostart scripts and media mode

This commit is contained in:
Marty Oehme 2019-12-02 19:43:07 +01:00
parent 2915f036fd
commit 2413f5ec42
2 changed files with 80 additions and 15 deletions

View file

@ -0,0 +1,34 @@
#!/usr/bin/env bash
# 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=$($n + 1)
sleep 0.1
fi
fi
done
}
i3-msg "workspace number 2:"
alacritty &
wait_for_program
i3-msg "workspace number 10:"
spotify &
wait_for_program
i3-msg "workspace number 1:"
qutebrowser &
wait_for_program
i3-msg "workspace number 3"