Move a window I am debugging to a specific display

Hyprland version
Hyprland 0.53.3 built from branch v0.53.3 at commit dd220efe7b1e292415bd0ea7161f63df9c95bfd3 clean (version: bump to 0.53.3).
Date: Sat Jan 24 20:02:06 2026
Tag: v0.53.3, commits: 6793

Libraries:
Hyprgraphics: built against 0.5.0, system has 0.5.0
Hyprutils: built against 0.11.0, system has 0.11.0
Hyprcursor: built against 0.1.13, system has 0.1.13
Hyprlang: built against 0.6.8, system has 0.6.8
Aquamarine: built against 0.10.0, system has 0.10.0

Version ABI string: dd220efe7b1e292415bd0ea7161f63df9c95bfd3_aq_0.10_hu_0.11_hg_0.5_hc_0.1_hlg_0.6
no flags were set

I’m developing a Qt application with CLion as my IDE on a two-monitor set-up, and I would like to have the IDE on one display and spawn the application window on the other.

I don’t want to start adding windowrules to my config for every application I develop, but rather have something that can be run from within CLion before the window is created. The only thing I can think of is to have my application’s title to be “MerseyVikingDev - MyCoolApplication”, and have one rule that matches the start of the title; but this feels a little hacky. Unfortunately there’s no hook in Clion to execute a tool after the application has started.

Maybe start it with a exec-rule?
hyprctl dispatch exec "[monitor <monitor>;] <path to app>"

Thanks for the suggestion. The problem is CLion doesn’t appear to allow you to “wrap” an executable like that. With the method you suggested I would have to run the command from the terminal and then attach the CLion debugger. Not a terrible solution, but it does feel a bit old-school :slight_smile:

What CLion does allow you to do is execute a tool before launch, so I wondered if there’s a way of creating a “transient” windowrule with hyprctl just before launch, but the docs imply you can only enable and disable existing rules.

Actually, looking closer at the hyprctl wiki I might be able to create a windowrule with the keyword command.

And I was right! The magic sauce is:

hyprctl keyword “windowrule match:title (^(MyCoolApplication)), workspace 3”

I have that as an “external tool” in CLion and add it as a step in the “Before launch” section of the Run/Debug Configuration.

1 Like