From 12ca1bf0a7a141338abf558245cb2c2c433206da Mon Sep 17 00:00:00 2001 From: lelgenio Date: Fri, 26 May 2023 20:00:03 -0300 Subject: [PATCH] send noop command to steam before installing mods --- default.nix | 1 + patches/send-noop-before-installing-mods.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 patches/send-noop-before-installing-mods.patch diff --git a/default.nix b/default.nix index 3f1dbf3..622c027 100644 --- a/default.nix +++ b/default.nix @@ -30,6 +30,7 @@ stdenv.mkDerivation rec { ./patches/dont-hardcode-zenity.patch ./patches/dont-write-desktop-entry-during-runtime.patch ./patches/dont-check-map-count.patch + ./patches/send-noop-before-installing-mods.patch ]; installPhase = '' diff --git a/patches/send-noop-before-installing-mods.patch b/patches/send-noop-before-installing-mods.patch new file mode 100644 index 0000000..7e05acb --- /dev/null +++ b/patches/send-noop-before-installing-mods.patch @@ -0,0 +1,15 @@ +diff --git a/dzgui.sh b/dzgui.sh +index 97b5cd0..5e661cc 100755 +--- a/dzgui.sh ++++ b/dzgui.sh +@@ -1056,6 +1056,10 @@ console_dl(){ + local wid=$(xdotool search --onlyvisible --name Steam) + #xdotool windowactivate $wid + sleep 1.5s ++ xdotool type --delay 0 "noop" ++ sleep 0.5s ++ xdotool key --window $wid Return ++ sleep 0.5s + for i in "${modids[@]}"; do + xdotool type --delay 0 "workshop_download_item $aid $i" + sleep 0.5s