Monthly Archives: August 2024

Better KDE theming and styling in Hyprland

Recently, I blogged about using KDE applications in Hyprland. I also blogged about theming and styling them. However, I’m not very happy with that solution, so I’ll provide a possible alternative, which, in my opinion, is better. Some of the steps are similar to the ones in my previous post.

I assume you’ve already installed a few KDE applications, like Dolphin, Konsole, and Kate (see the blog post above).

As in all my Hyprland posts, this is based on Arch Linux; I mainly use EndeavourOS.

Let’s install a few packages:

The crucial ones are the “qt5ct” and “qt6ct-kde” packages. We’ll use the latter but also install the former for possible old Qt 5 applications, just in case. The “Hack” font is the standard KDE monospace font, and Kvantum is the theme engine. Finally, “breeze” will install the Breeze color schemes we will use in qt6ct.

IMPORTANT: we use the AUR package qt6ct-kde, which is a patched version of “qt6ct”. If you installed packages, as in my previous post on this subject, you’ll have to replace “qt6ct” when installing this AUR package.

Then, we have to set this environment variable in “~/.config/hypr/hyprland.conf” (note that we specify qt5ct, but for Qt 6 applications, qt6ct will be used automatically):

Let’s restart Hyprland (I’m assuming “env = QT_QPA_PLATFORM,wayland” is also set).

That’s the standard style of Dolphin, Kate,Β and Konsole with the default settings:

Let’s open the “Qt6 Settings” application (corresponding to “qt6ct”).

Remember that Qt6 settings will be stored in the file “~/.config/qt6ct/qt6ct.conf”.

First of all, I’m changing the fonts to match the standard ones of KDE:

Remember always to click “Apply” after changing something”.

By restarting the above applications, the fonts now look like in a standard KDE system:

Now, benefitting from the patched qt6ct package, differently from my previous post, we can select the “Breeze” style; similarly, we can select “Breeze Dark (KColorScheme)” in color:

Let’s see the results:

Super! Everything looks great with the above simple setting!

If you look at my previous post without the patched version of “qt6ct”, we had to select the “Breeze Dark” icon to have nice-looking icons in the dark style. Now, we didn’t have to!

Moreover, Kate also automatically uses the dark breeze theme (compare that with the previous post):

Note that you can tweak other settings in qt6ct further.

In particular, you can install other icon packages and select another icon set in qt6ct.

Of course, you could also directly use Kvantum themes, as we saw in my previous post. However, with the patched “qt6ct”, having a nice-looking and consistent theme for KDE applications is much easier.

Happy (better) theming! πŸ™‚

Waybar Workspaces in Hyprland

Waybar has a dedicated module for Hyprland workspaces: https://github.com/Alexays/Waybar/wiki/Module:-Hyprland#workspaces. One of its most fantastic features is the possibility of representing the application windows in each workspace.

For example, here I have the workspaces with the following application windows:

  1. Kate (text editor) and terminal (Alacritty)
  2. Dolphin (file manager)
  3. A Firefox window and a Firefox window on GitHub
  4. A Firefox window on YouTube and Thunderbird (email client)

Here’s the Wyabar workspace representation (on the left):

Here I added Google Chrome in the workspace 2:

This is the Waybar module configuration, where the important thing is “{window}” in the “format”. Unfortunately, you must work on defining the rewrite rules and the icon to show as you want. Moreover, these are not icons; they are characters from Nerd fonts:

Probably, your browser will not render the fonts (though you can copy and paste them, and they will be taken correctly). I’m also showing a screenshot of my text editor where the Nerd fonts are rendered correctly:

Of course, you also have a character to be used by default if nothing matches (e.g., a question mark).

Nice feature, isn’t it? πŸ™‚