Adding tags to applications in kmenuedit which are shown as prefix in the window title Workflow: 1. Add new application launcher with kmenuedit 2. Specify an application tag 3. As application launches the tag prefixes the window title and eliminates/replaces the window index for multiple similar windows if tag is present. 4. Add specific rules for the window by regex title matching ^tag: .*$ The results are more versatile window behaviors on multiple screens with several different tasks on several virtual desktops and activities.
I am not sure I can follow you. Is your wish to be able to have multiple .desktop files for the same application, but each one having different text added to the window title?
Yes you do follow. maybe the desktop format can be extended that way. But I guess first there should be interest from the kwin side for a kind of window/application tagging feature. For example I solved it for konqueror with window title prefix by session name. It is very nice to have multiple konqueror sessions open which sit on different screens/activities/workspaces and are activated by specific shortcuts. That really helps to keep the workflow organized with lots of browser tabs open.
Would adding "--title=foobar" to the Exec line in the .desktop file work?
In some cases yes! But other applications have a variable window title like dolphin or konqueror. So a kind of "--title-prefix=foobar: " which results into "foobar: <title>" would be great to not lose the ability to regex the original title! I guess "--title" works with all QWindows right?
This requires support from Qt if you do not want to add the feature to each application. Please report your wish directly to Qt developers via https://bugreports.qt.io/