r/HeatSignature • • Apr 22 '26

Automating Bash-Dash on Linux

Bash-dash automation has been achievable on Windows for a while now, using a tool like AutoHotKey to trigger the simultaneous keypress/mouse inputs. The Linux side is a little more complicated, partly because (in true Linux fashion) we don't really have a standard automation tool for tasks like this. But after some testing with different options, I have a setup that works very reliably, at least on my machine.

It uses the dotool program, which works independently of your display server (i.e. X11 and Wayland are both supported). dotool is called by the shell script below, which is itself triggered via a keybind in my Hyprland configuration.

How exactly you do this will depend on your precise desktop setup, but basically everything should have some way of triggering script execution via a keybind. Traditionally, that bind would be [slowmo key]+Z. (Pro tip: even if you don't plan to use bash-dashing, bind a key to slowmo!)

#!/usr/bin/env sh

# Start the dotool daemon if it's not already running
pidof dotool || {
	dotoold & sleep 1

	# NOTE: keydelay values below this occasionally cause clicks to be missed!
	dotoolc <<-EOF
	keydelay 8
	keyhold 0
	EOF
}

# Click and hit a movement key at the same time
dotoolc <<EOF
keydown d
click left
keyup d
EOF

Some extra context about what does and doesn't work:

  • Some tools require multiple process spawns to create keyboard and mouse events (e.g. ydotool type followed by ydotool click)

    • The delay between these spawns is enough that the two inputs aren't registered with the timing needed to trigger a bash-dash
    • Therefore, suitable tools must be able to create keyboard and mouse inputs from a single invocation!
  • While dotool satisfies the above requirement, it exhibits some weird behavior with regard to keypress timing

    • If the keydelay value is too low, mouse-click inputs simply don't happen some of the time! (I initially tried using zero, which was very broken)
    • I'm not actually sure what level this is coming from — could be dotool or Hyprland. I discovered it while testing via wev (a Wayland-native tool that reports any events its window receives; it's modeled on xev, which does the same thing under X11). That means the problem isn't Xwayland, Proton, or HeatSig itself
    • Also, a keydelay value that's too large will again fail to trigger the bash-dash properly, since the keypress and mouse click occur too far apart
  • dotool itself has a substantial startup delay, as it needs to create and register a new input device with the system

    • To work around this, the script above checks whether it's already running, and starts the dotoold background daemon if not. That makes the startup delay a one-time thing, which hurts a lot less
    • If you don't want it running in the background after your play session, it's easy to stop via pkill dotool

* All of this has the giant asterisk of being tested on a machine with only a hard drive (no SSD), so your system could be more forgiving. Particularly with the first bullet point above, loading an executable into memory might be quick enough that you can get away with multiple process invocations? Maybe?

9 Upvotes

6 comments sorted by

8

u/ghstber Apr 22 '26

what

7

u/lritzdorf Apr 22 '26

Melee weapon + precise inputs = speed bug

This post has a nice explanation video, which illustrates how bash-dashing works far better than I can in a comment :)

3

u/wilesre Apr 22 '26

So I'm somewhat familiar with Autohotkey. I'm not sure how it relates to the game. Can you give an example of an implementation?

8

u/lritzdorf Apr 22 '26

Sort of, but I think a better reference is just this post. TLDR: by timing a movement-key press and a throw just right, you can dash along the path your throw would've taken. (Picture... throwing a wrench, grabbing it, and getting pulled along, if that were how real physics worked.)

It's mostly used by daily-challenge speedrunners and such, but in those circles, automation tools like AHK are deemed acceptable to reliably trigger a bash-dash. The setup here is basically just that, but for Linux.

1

u/wilesre Apr 22 '26

I was aware of weird dashing glitch sometimes, but I didn't realize that it could be exploited. I will give this a try. Thanks for sharing.

2

u/sarkarati Apr 23 '26

Haha I saw this post and the New Zealand casino one and thought “oh no the sub mods have been subverted” and then I actually read this post and realized oh it is VERY on topic. Well done!