qtractor
qtractor copied to clipboard
Making every window except the Qtractor's main window float in i3-gaps
I use i3-gaps, a tiling window manager under Arch Linux. When I started using Qtractor, I immediately ran into a problem: by default, everything is tiled, including plugin GUIs.
In contrast, I never experienced this in Ardour. I think the reason is that Ardour assigns plugin windows a special role called 'utility', and when enabled in the options, this role is changed to 'dialogue', so i3 treats these windows differently and doesn't tile them. To confirm this, I added the following rules to my i3 configuration to see if window titles can be shown for plugin windows, but not for Ardour's main window. It works.
for_window [window_type="dialog"] border normal
for_window [window_type="utility"] border normal
So far, I've tried the following workarounds:
-
Create a window rule in i3 that makes every window whose title matches a specific pattern float.
- This is unreliable, because there's no unique part of the window title that applies to non-main windows.
-
Create a window rule that every window spawned by Qtractor should be floating (
for_window [class="Qtractor"] floating enable
).- The problem with this is that non-main windows only stay on top when they are in focus, even if the options 'Keep tool windows always on top' and 'Keep editor windows always on top' are enabled.
-
Create the exact same window rule as the previous one, and also launch Qtractor with a command that disables float for the main window (
qtractor &!; sleep 1; i3-msg floating toggle; i3-msg border pixel 2
).- This actually works quite well, because the main window is always tiled and at the bottom and everything else is floating on top.
- Another advantage is that an additional rule can be used for showing window titles for non-main windows, because the command
i3-msg border pixel 2
overrides this rule. - However, this solution causes issues when I launch Qtractor after a crash and the backup restoration dialogue window shows up (the dialogue is tiled instead of the main window), and it can't be used in session managers like RaySession, where I need to use the single command
qtractor
.
With this in mind, I'd like to suggest adding such a mechanism for Qtractor, which treats non-main windows as utilities or optionally dialogues, similar to Ardour.
well this is not going to work so easily: the issue is (in my pov.) that most non-main windows are supposed to be top-level, which means that their parent is the root window (aka. desktop-window) and that's probably what's causing your troubles in i3 tiling WM...
now, that is not going to change any day soon, at least from qtractor front, sorry; it has been a path beaten off for more than a decade.
so, it's a no go suggestion
maybe you better look at window classes and/or hierarchies on that scripted i3 rules, sorry again.
I run i3 as well and have managed to get a reasonable workflow scrapped together. I'll start a thread on the forum tonight and maybe we can evolve it into the ultimate thing.
That said, I will say that I'm constantly having to chase after (update my i3 config) in order to create rules for all the new things I come across. This is only a problem for the windows that are created with dynamic values for WM_NAME. For example, opening an Aux Send window from the mixer ends up with a WM_NAME that is matched with a regex of "^Aux\ Send*". At least that stuff is somewhat consistent. It kinda falls apart though if you open a plugin directly in a channel as that window has nothing Qtractor-specific to match against and you end up writing another rule.
Started a thread here.
The solution here is so simple and I can't understand the almost bitter stubbornness to simply change the WM_NAME property to something fixed for each aspect of the landscape. You already do it with Mixer, Track, Plugins, Shortcuts, Export Audio File, and Buses. All you'd have to do is replace all the windows which dynamically generate their WM_NAME property to reasonable values. For example, the main sequencer portion could obviously be called "Main", a given plugin interface could just be "Plugin".
Seriously, why is there so much resistance to simple and reasonable upgrades for the purpose of making this a better DAW?
Nobody cares that "it's been this way forever". That's a horrible point of view to get so stuck on.
I've trimmed down my original config in order to take a reasonable stab at working around these wonky dynamic names and have come up with the following:
assign [class="(?i)Qtractor" title="Mixer"] $ws4
assign [class="(?i)Qtractor"] $ws3
# Qtractor (order matters here)
for_window [class="(?i)Qtractor"] floating enable
for_window [class="(?i)Qtractor" title="Mixer"] floating disable
for_window [class="(?i)Qtractor" title="Untitled1"] floating disable
for_window [class="(?i)Qtractor" title="qtr$"] floating disable
for_window [class="(?i)Qtractor" title="\(Track"] floating disable layout vsplit
The above essentially accomplishes the following:
- Main sequencer always on my left display (in a dedicated workspace)
- Mixer is always on my right display (in a dedicated workspace)
- Everything floats by default other than the following:
- The main sequencer window when freshly loaded.
- The main sequencer window when it has a .qtr file loaded.
- The Piano Roll window (I personally like it split evenly below the main sequencer since I can easily fullscreen it via i3 as needed)
What's still wonky...
- Plugins loaded into the Mixer (on right display) will open on the left display due to their dynamic window names which Rui feels is too entrenched to bother with and I'm not going to chase after every plugin with additional matches.
- This feels like an anti-pattern when I look at the order of operations but all other variations didn't produce the desired results.