#!/usr/bin/env bash stream_manager_url="https://dashboard.twitch.tv/u/ediblemonad/stream-manager" window_exists() { xdotool search --class $1 > /dev/null; } wait_for_window() { while ! window_exists $1; do sleep 0.3; done; } run_if_not_exists() { if ! window_exists $1; then $1 2>&1 >/dev/null & disown fi } xdotool key super+e; sleep 0.3; brave "$stream_manager_url" 2>&1 >/dev/null & disown; wait_for_window brave; sleep 0.5; xdotool key super+w; run_if_not_exists easyeffects; wait_for_window easyeffects; sleep 0.3; run_if_not_exists obs; sleep 0.5; xdotool key super+5;