Marty Oehme
a40399913b
Keybase should be started as a service (through systemd, or similar service manager). Removed the i3 attempt at autostarting since it took too long to start the bloated gui client anyways. Instead, the autostart should happen on login, starting the keybase service and the keybase filesystem (so that programs relying on it can automatically sync, like gopass)
34 lines
635 B
Bash
Executable file
34 lines
635 B
Bash
Executable file
#!/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"
|