Bauke/dotfiles
Bauke
/
dotfiles
Archived
1
Fork 0
This repository has been archived on 2025-09-03. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.bauke/bin/drg-auto-type

16 lines
411 B
Bash
Executable File

#!/usr/bin/env zsh
# Automatically type something in Deep Rock Galactic when it is the
# currently active window, text defaults to "r".
# drg-auto-type [text]
drg_pid=$(xdotool search --name 'Deep Rock Galactic' getwindowpid)
active_window_pid=$(xdotool getactivewindow getwindowpid)
if [[ $drg_pid = $active_window_pid ]]; then
sleep 0.1
xdotool key Enter
xdotool type ${1-'r'}
xdotool key Enter
fi