Bug 505939 - Let rules match against Desktop File Names
Summary: Let rules match against Desktop File Names
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (other bugs)
Version First Reported In: 6.4.0
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-21 22:00 UTC by Dominik Kummer
Modified: 2025-06-24 21:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Kummer 2025-06-21 22:00:20 UTC
SUMMARY
With the migration towards Wayland some rules do not work anymore. The reason for that is the sandboxing trend where Wayland does not allow users to set Window properties like window class or window role. This makes multiple instances of the same application indistinguishable.

FEATURE REQUEST
As users can define and provide new desktop files via KDE Menu Editor it makes sense to let KWin Rules match against the desktop file name from which the application was launched from. This solution can enable users to have versatile control over multiple application instances with identical window class and role.

USE CASE
User wants to launch "Falkon Work" aka "Falkon Work.desktop" which executes falkon binary with --profile work argument, etc. Now a custom KWin Rule matches the desktop file name "Falkon Work" and places the Application Window on Screen 3, Activity "Work", accessible via custom Shortcut Meta+W.

USE CASE 2
KDE Menu Editor can now reference KWin rules by desktop file name. So its possible to add a third tab "Rules" (to existing tabs "General" and "Advanced") which loads the Rules KCM for a rule of the same name.
Comment 1 TraceyC 2025-06-24 21:56:52 UTC
This sounds like a reasonable use case