aboutsummaryrefslogtreecommitdiff
path: root/scripts/commands
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/commands')
-rwxr-xr-xscripts/commands/:netflix4
-rwxr-xr-xscripts/commands/:stream34
2 files changed, 38 insertions, 0 deletions
diff --git a/scripts/commands/:netflix b/scripts/commands/:netflix
new file mode 100755
index 0000000..89a3061
--- /dev/null
+++ b/scripts/commands/:netflix
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+brave https://netflix.com & disown
+
diff --git a/scripts/commands/:stream b/scripts/commands/:stream
new file mode 100755
index 0000000..a3b3617
--- /dev/null
+++ b/scripts/commands/:stream
@@ -0,0 +1,34 @@
+#!/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;
+