From 014327fcfeea84733511744dfc6e4f7ce8f63153 Mon Sep 17 00:00:00 2001 From: Bauke Date: Sun, 23 Apr 2023 12:44:32 +0200 Subject: [PATCH] Create the drg-auto-ready script. --- .bauke/bin/drg-auto-ready | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 .bauke/bin/drg-auto-ready diff --git a/.bauke/bin/drg-auto-ready b/.bauke/bin/drg-auto-ready new file mode 100755 index 0000000..b31e52d --- /dev/null +++ b/.bauke/bin/drg-auto-ready @@ -0,0 +1,11 @@ +#!/usr/bin/env zsh + +# Automatically type "r" in the Deep Rock Galactic chat when it's running and +# the currently active window. + +drg_pid=$(xdotool search --name 'Deep Rock Galactic' getwindowpid) +active_window_pid=$(xdotool getactivewindow getwindowpid) + +if [[ $drg_pid = $active_window_pid ]]; then + xdotool key --delay 50 Enter r Enter +fi