From 384f3554cc53cf03fa9a4cf9e1bfa74aaa64a13f Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 31 Dec 2022 15:36:15 +0530 Subject: config sync --- scripts/commands/:netflix | 4 ++++ scripts/commands/:stream | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100755 scripts/commands/:netflix create mode 100755 scripts/commands/:stream (limited to 'scripts/commands') 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; + -- cgit v1.3.1