banner
Previous Page
PCLinuxOS Magazine
PCLinuxOS
Article List
Disclaimer
Next Page

How To Enable Dark Theme In Trinity Mini


by reelcat

As ⅆα√ℯℂ§ suggested, I created a short guide on how to configure a dark theme in Trinity Mini. As an example, I chose Arc Darkest, which was used in the guest's account in the latest ISO TDE Mini.

Of course, this theme can be implemented simply by copying the guest's account configuration to the newly created user directory. However, this is not recommended, because the "guest" name will remain here and there, which is difficult to detect and can cause embarrassing errors. And besides, configuring everything from scratch, the user will learn something new.


Configuring appearance of Trinity desktop and applications

Most settings can be made in the Trinity Control Panel (TCC).

As the desktop wallpaper, Mini uses the background from the current GRUB theme: /boot/grub2/themes/pclinuxos/background.png. Updating the default PClinuxOS GRUB theme will therefore change the Mini wallpaper.



Trinity color schemes are stored in /opt/trinity/share/apps/tdedisplay/color-schemes. In the TCC select the Arc-Darkest scheme. Of course, one can modify the selected color scheme and save it under a new name. The color scheme file will be saved in the ~/.trinity/share/apps/tdedisplay/color-schemes directory.



Setting the icon theme in Trinity is a bit tricky. Trinity itself uses icons from the /opt/trinity/share/icons directory. When configuring the icon theme for the Trinity application and desktop, be sure to select an icon theme from this directory. They contain icons specific to this environment and not present in other icon themes, e.g. downloaded from the repository. Mini uses a theme based on the classic Crystalsvg, with some icons modified for a dark color scheme.

You can also look for interesting icons at https://www.trinity-look.org. Fun fact: most of KDE 3.5 icon sets, colors, themes etc match Trinity or only require minor modifications.



You can also adjust the size of the icons to your needs. Basic size modification can be done in TCC, e.g. changing the size of icons in toolbars, on the desktop, etc. In Mini, the change concerns the icons of the system tray, enlarged to 32 px to fit the wide bottom panel.



Additional fine-tuning of the icon size will be discussed later.

Since the original Arc-Dark theme is the KDE Plasma theme, Mini uses the QtCurve engine to mimic its appearance. QtCurve is highly customizable and the appearance configuration files are located in /opt/trinity/share/apps/QtCurve. In TCC set the QtCurve widget style. The "Configure..." button opens a dialog for selecting predefined styles. Choose Arc-Darkest, which one can also modify as needed and save it in the ~/.trinity/share/apps/QtCurve directory.



Mini uses the Crystal window decoration, which gives you a lot of configuration possibilities. The images below show the most important settings of this decoration. Users can, of course, choose others according to their taste.









The bottom panel in Mini has a height of 56 px, is not hidden and is transparent. The transparency settings are shown in the image below.



The size of panel icons, which cannot be changed in TCC, can be modified by editing the configuration file ~/.trinity/share/config/kdeglobals. This allows, for example, to adjust the size of the TDE Menu button icon to a wide panel.

[PanelIcons]
ActiveColor=invalid
ActiveColor2=invalid
ActiveEffect=togamma
ActiveSemiTransparent=false
ActiveValue=0.7
Animated=true
DefaultColor=144,128,248
DefaultColor2=0,0,0
DefaultEffect=none
DefaultSemiTransparent=false
DefaultValue=1
DisabledColor=34,202,0
DisabledColor2=0,0,0
DisabledEffect=togray
DisabledSemiTransparent=true
DisabledValue=1
DoublePixels=false
Size=48       <-- MODIFY !!!

In the TDE Menu, one can also change the size of the submenus/applications icons by editing the file ~/.trinity/share/config/kickerrc. However, be careful not to set the size too large. In general, a sensible maximum is 28 px.

[menus]
Extensions=prefmenu.desktop,recentdocs.desktop,systemmenu.desktop
MenuEntryFormat=NameOnly
MenuEntryHeight=28       <-- MODIFY !!!
RecentAppsStat=
RecentVsOften=true
UseBookmarks=false
UseBrowser=false

The taskbar in Mini is quite traditional. Application buttons are represented by an icon and text. In addition, thumbnail previews have been enabled.



You can also set the taskbar to show only application icons. Unfortunately, the default size of 32 px does not look good with wider panels. Trinity r14.1 introduced a long-awaited innovation - adjusting the size of taskbar icons. This can be done by modifying the ~/.trinity/share/config/ktaskbarrc file. Setting the size of the icons to, for example, 48 px brings a similar effect as in KDE Plasma.

[Appearance]
ActiveTaskTextColor=255,192,192
IconSize=48       <- MODIFY !!!
InactiveTaskTextColor=160,160,160
ShowThumbnails=true
ThumbnailMaxDimension=200
UseCustomColors=true

Also remember to change the color of the text in the file manager.



The theme of the mouse cursor - Xprience - was not chosen by chance. It comes from the old releases of PCLinuxOS KDE-3 and refers to the old windmill logo.



Although the Mini uses the GDM login manager, once Trinity is installed, it can easily be changed to its own TDM (Trinity Display Manager). To do this, run PCLinuxOS Control Center (drakconf) as root and select TDM in the Boot > Set up display manager section. After confirming, restart the system.

Then you can configure TDM. As an administrator (Administrator Mode button at the bottom), choose the language, visible users, style and colors, etc.



You can also use several ready-made TDM themes. Also as root (Administrator Mode button) choose one of them. More themes can be found at Trinity-Look.org. TDM themes are located in the /opt/trinity/share/apps/tdm/themes directory.




Configure the appearance of the GTK applications

Configuration of GTK styles in Trinity is difficult. There is no easy uniform setup mechanism like KDE Plasma has. Trinity and GTK-2/3/4 use their own settings files and need to be configured separately.

Trinity uses the simplest configurator, inherited from KDE-3. Settings include GTK-2 and GTK-3 style and font.



The result for GTK-2 is ~.gtkrc-2.0-kde-kde4 file, which is used exclusively by Trinity:

# This file was written by TDE
# You can edit it in the TDE control center, under "GTK Styles and Fonts"

include "/usr/share/themes/Arc-Darkest/gtk-2.0/gtkrc"

"user-font" styles
{
font_name="Ubuntu 12"
}
widget_class "*" style "user-font"

gtk-theme-name="Arc-Darkest"
gtk-font-name="Ubuntu 12"

and ~/.config/gtk-3.0/settings.ini for GTK-3:

[Settings]
gtk-theme-name = Arc-Darkest
gtk-icon-theme-name = tdegtk-icon-theme
gtk-fallback-icon-theme = tdegtk-fallback-icon-theme

The proper tool for configuring the appearance of GTK-2 and GTK-3 applications is LXAppearance.

After starting, select the Arc-Darkest widget and the font that matches the one set in Trinity.



Icon themes for GTK applications are located in /usr/share/icons. Unlike the ones chosen for Trinity, they don't include TDE-specific icons (because they don't need them), but icons for GTK environments and applications. Mini uses the classic Crystalsvg theme, built specifically for this remaster and adapted to the dark theme.



LXAppearance sets the XPrience theme of the mouse cursor as the default for the entire user profile in ~/.icons/default/index.theme.



Font settings include anti-aliasing and hinting.



Other settings include the appearance of icons on toolbars. Selected settings: only icons, the same as on the buttons.




Configuring the appearance of the Qt5 application

The appearance of the Qt5 application is set using the Qt5 Settings (qt5ct) tool. To do this, the system variable QT_QPA_PLATFORMTHEME=qt5ct is required. In Mini, this is done by the bash script ~/.trinity/env/setenv.pclos.tde.sh for each user account. The contents of the script, including system variables, can be modified by each user separately according to their own needs.

After starting, you need to configure the style of the Qt application. As the Arc-Dark style is not natively available for Trinity, gtk2 should be selected.

Intriguingly, qt5ct also supports themes for the Qt Kvantum style manager, which has Arc-Dark as one of the available styles. Setting Arc-Dark in Kvantum and selecting the kvantum-dark style in qt5ct gives us the Qt Arc-Dark style.

Change also the color to custom Arc-Darkest. The Qt5ct colors are in the /usr/share/qt5ct/colors directory. In qt5ct you can modify colors and save your own in the ~/.config/qt5ct/colors directory.



In addition to setting the fonts, we can also configure their display on the screen.



Qt applications, like GTK ones, also need icons from the /usr/share/icons directory.



In the last tab we are interested in, we can configure visual effects: animations, toolbar style, etc.



That's all for now. I will come back to this at a later time to describe, for example, setting colors in Krusader, Kate, Kwrite, KDiff3, etc.

And since Mini doesn't clash with qt5ct, it's even possible to set a Qt theme for LibreOffice (works for me).



Previous Page              Top              Next Page