Bug 505939

Summary: Let rules match against Desktop File Names
Product: [Plasma] kwin Reporter: Dominik Kummer <admin>
Component: rulesAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: isma.af, kdedev
Priority: NOR    
Version First Reported In: 6.4.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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