Bug 483500 - Window titles should have a unique and consistent pattern that can be matched with a simple regex
Summary: Window titles should have a unique and consistent pattern that can be matched...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-14 01:12 UTC by gravy_starving975
Modified: 2024-04-11 16:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gravy_starving975 2024-03-14 01:12:10 UTC
Since window types don't exist/work in wayland, window rules for the different windows in an application are dependent on matching the window title, so these different window types should each have some unique text or pattern that allows a simple regex to match just that window without the possibility of false positives/negatives.
This is aimed at the main window's title, which tends to be so short and simple that the only consistent text to match is the application's own name and maybe a preceding em dash that tends to end up being a substring within other windows' titles in the application, requiring a regex that explicitly excludes every possible other window in that application and has the potential for a false negative if the title contains the name of a file/folder that matches the excluded text.
Simply adding a prefix to the window title to allow for a "[prefix][wildcard][application name]" pattern should be enough.
Comment 1 Nate Graham 2024-04-09 21:29:28 UTC
This isn't possible since apps are allowed to set their own window titles. If we added some kind of postfix onto them the titles would become ridiculously long and people would surely complain about that.
Comment 2 gravy_starving975 2024-04-10 23:33:39 UTC
That's not what I meant, my request is about the window naming convention of KDE applications. 
Of the window rules I've set, only KDE applications have required a regex with exclusions: Dolphin, Konsole, and Ark.
Kate only avoided this because the main window's title starts with the current session's name, which allows for a simple rule.
While this has only been an issue for me with these particular applications, a quick look at other KDE applications installed on my system shows most of them also follow the same window naming scheme, so I generalized the issue instead of pointing to any one specific thing.
Comment 3 Nate Graham 2024-04-11 16:14:34 UTC
The thing is, this is the kind of thing that can only work when it's 100% universal. And if we can't even make that happen for KDE apps, there 100 times less of a chance it would happen for all 3rd-party apps. And without 100% buy-in among 3rd-party apps, it can't be relied on.