rncbc / qtractor

Qtractor - An Audio/MIDI multi-track sequencer
https://qtractor.org
GNU General Public License v2.0
499 stars 87 forks source link

Making every window except the Qtractor's main window float in i3-gaps #340

Open maxigaz opened 2 years ago

maxigaz commented 2 years ago

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:

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.

rncbc commented 2 years ago

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.

windowsrefund commented 2 years ago

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.

windowsrefund commented 2 years ago

Started a thread here.

windowsrefund commented 9 months ago

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.

windowsrefund commented 9 months ago

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:

What's still wonky...