diff options
| author | Akshay Nair <phenax5@gmail.com> | 2022-12-31 15:36:15 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2022-12-31 15:36:15 +0530 |
| commit | 384f3554cc53cf03fa9a4cf9e1bfa74aaa64a13f (patch) | |
| tree | eeb81297457460f694d49c7605c8b2cff3a25a0a /scripts/commands | |
| parent | 8698c617cbb6364c638ad90ab39e13e64def4284 (diff) | |
| download | nixos-config-384f3554cc53cf03fa9a4cf9e1bfa74aaa64a13f.tar.gz nixos-config-384f3554cc53cf03fa9a4cf9e1bfa74aaa64a13f.zip | |
config sync
Diffstat (limited to 'scripts/commands')
| -rwxr-xr-x | scripts/commands/:netflix | 4 | ||||
| -rwxr-xr-x | scripts/commands/:stream | 34 |
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; + |
