Bug 505944

Summary: Option to add current profile name as window title prefix "[PROFILE NAME]: ...."
Product: [Applications] Falkon Reporter: Dominik Kummer <admin>
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: jurajoravec
Priority: NOR    
Version First Reported In: 25.04.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dominik Kummer 2025-06-21 23:15:05 UTC
FEATURE
An option to add current falkon profile name as window title prefix can help to identify multiple application instances, for example to match KWin Rules.

USE CASE
A user defined mutiple desktop files with KDE Menu Editor to execute
1: falkon --profile work
2: falkon --profile private
Now the user wants to apply different KWin Rules for each instance.
Comment 1 Juraj 2025-06-22 07:20:35 UTC
Hello,

When running on X you can use --wmclass option
> --wmclass <WM_CLASS>         Application class (X11 only)
To get the desired results.

Regarding the profiles.
When starting when no Falkon is running using "--profile <XXX>" works fine.
But when falkon is already running, it will try to connect to the running instance regardless of the profile.
For this scenario, using "--no-remote" is needed.
> -r, --no-remote              Starts new browser instance.
This has implications, be careful to run only one instance with the same profile, or the profile can be corrupted.
This needs fixing.
Comment 2 Dominik Kummer 2025-06-22 12:35:50 UTC
Thank you for your detailed recommendations!

I already did that --wmclass solution in the past, and it worked like a charm!
But after my recent update I decided to keep Wayland, as KDE also migrated away from X11.

Also I think KWin, KWayland and Plasmashell will implement Wayland toplevel tags, so
we can define Kwin rules based on window class, role and tag.

Maybe you can use the tag attribute, but I dont know if Qt or KDE already provides a default interface to set the wayland surface tag. The Plasmashell source shows that Surface::tag() and Surface::setTag() are not yet implemented.

Surface tags could be perfect to set it to falkon profile name IMHO.
Comment 3 Juraj 2025-06-22 12:49:12 UTC
Hello,

The issue with different profiles should be fixed with next major version (at least with DBus on Linux).
No "-r" option will be needed.
https://bugs.kde.org/show_bug.cgi?id=439190

> Maybe you can use the tag attribute, but I dont know if Qt or KDE already provides a default interface to set the wayland surface tag. The Plasmashell source shows that Surface::tag() and Surface::setTag() are not yet implemented.
> 
> Surface tags could be perfect to set it to falkon profile name IMHO.
Regarding the Wayland stuff, contribution is welcome.