I’m a heavy user of Firefox profiles. Apart from using different
profiles for different activities, I also have a few extra profiles that
all run in the Default activity.
This means that I need to have different icons shown in Plasma’s
panel in order to be able to easily differentiate which profile a window
belongs to.
Sure, I use the tasks applet which shows the window title instead of
the icon-only one (I prefer usability to minimalism), but still, it
isn’t enough as sometimes the active tab in a Firefox window might not
have the most informative title.
Plasma seems to rely on the application name and the window class
when choosing the icon it will show in the panel. Which means that, by
default, all Firefox instances end up having the same icon.
Fortunately, Firefox allows you to specify the window class it should
use through command line arguments.
firefox -P ProfileName --class WindowClassName
And, to connect a launcher to a specific window class, you just need
to add the following line to the .desktop file:
StartupWMClass=WindowClassName
So, in order to have a nicely supported Firefox profile, you can
create a launcher with a desktop file similar to the following:
It also works with Firefox derivatives such as Librewolf (which can
be seen in the screenshot above) and others.
Wayland
For Wayland users, a comment by John Kizer might be useful:
On Wayland, I’ve ended up just using KWin Window Rules (based on a
substring of the window title, and setting the desktop file name) in
combination with .desktop files that launch Firefox to the site in
question and have the desired icon associated.
EDIT: And another approach for Wayland by Christoph Martin:
There’s no need for messing around with window rules - at least not
for Firefox.
If you use the –main flag instead of the –class flag for the Firefox
invocation in your .desktop file, you should get the desired effect - at
least in the Icons-Only Task Manager. Note that StartupWMClass still
needs to match the value of the –main flag.
The above works on my machine, that is under Plasma 6.0.5 on the
Fedora 40 KDE spin.
I was keeping myself on Plasma 5.x until recently. I got so
accustomed to the Bismuth window tiling script for KWin that I couldn’t
imagine myself updating to Plasma 6.x where Bismuth doesn’t work.
Unfortunately (?), one of the recent Debian updates broke Bismuth in
Plasma 5.x as well, so I had nothing keeping me on the old version
anymore. I’m now (again) running the development version of (most) KDE
software.
Since the update, I managed to make the Qtile tiling window manager
work with Plasma to some extent. But the integration between Qtile and
Plasma I hacked was less than ideal, and I kept switching between KWin
which worked perfectly, as KWin does, but without tiling, and my
Frankenstein Qtile which didn’t work that well, but it had tiling.
Maybe I’ll write about it if I get back to hacking Qtile, but that
might not happen any time soon because…
Huge kudos to all who are involved in the rebirth, the script works
as well as it did with KWin 5.
Window decoration
The only thing missing was the simple ‘just a line around the window’
window decoration that Bismuth had.
Now we have that as well, I’ve ported the original Bismuth window
decoration to KWin 6 (nothing huge, just a few tiny changes to make it
compile). The code, and the installation instructions are available on
github.
Published
in the Shares section,
on 17 February 2024
Some time ago, Marco started a series of articles on SObjectizer. It
is starting to become the source for all things
SObjectizer – it is currently at post number 19 – quite an
endeavour.
For those who haven’t met SObjectizer before, it is a framework for
writing concurrent applications which supports the actor model,
publish-subscribe…
Published
in the Shares section,
on 28 December 2023
People who have visited any of the larger C++ conferences surely know
Rainer Grimm, know his talks, workshops and books.
Unfortunately, he has been diagnosed with ALS, a serious progressive
nerve condition.
Since ALS research doesn’t get much attention or funding, Rainer
started a fund raising campaign for funding ALS research with
ALS-Ambulanz of the Charité and I Am ALS organization.