358.2. kdos-plasma-look-1.0.0
KDOS Modern for Plasma — eight global themes, the kdos Plasma style, the desks, KSplash
The build-state snapshot was taken from 1.0.0-1; this recipe is 1.0.0-2, so the size, time and contents below describe the earlier build.
| Version | 1.0.0, release 2 |
| Source tree | src/desktop/kdos-plasma-look/ |
| Phase | 50_desktop (Desktop), 53 of 92 in build order |
| Licence | MIT |
| Homepage | https://github.com/kunaldawn/kdos |
| Build time | 0.2 SBU |
| Installed size | 2.9 MiB in 168 files |
| Recipe | src/desktop/kdos-plasma-look/kpkgbuild |
About
kdos-plasma-look is KDOS Modern for Plasma: the data that makes a Plasma session look like KDOS. It holds no program. Every file is generated at build time from the one palette in libkcolor, so changing an accent’s colours there changes every file below on the next build. Read this note if you change the look of the desktop, add an accent or a desk, or wonder why a Plasma theme file is shaped the way it is. It installs
- the eight colour schemes,
/usr/share/color-schemes/KDOS<Title>.colors; - the eight global themes,
/usr/share/plasma/look-and-feel/org.kdos.<accent>.desktop, one per accent, each naming its scheme, theKDOSicon theme (KDOS-Lightfor the light accent),breeze_cursors, the square Breeze decoration, thekdosPlasma style, the fonts, its own KSplash and theKDOS-<Title>wallpaper; - the Plasma style
kdos,/usr/share/plasma/desktoptheme/kdos: square, opaque panel, popup, tooltip, button, task-manager and pager frames with a one-pixel accent rule, and the slider, progress bar, radio button, check marks and switch in the accent, falling back to Breeze for everything it does not draw; - the three desks,
/usr/share/plasma/layout-templates/org.kdos.desk.{kdos,dock,tiling}; - the Konsole schemes and profiles
KDOS-<Title>and the qt5ct palettesKDOS-<Title>.conf; - the login screen’s files for each accent,
/usr/share/kdos/greeter/<accent>/, whichkdos-powerdcopies into thesddmaccount when the machine’s accent changes; - the distribution’s
kdeglobals,/usr/share/kdos/xdg/kdeglobals: the fonts, the terminal, the global theme and its light and dark pair, the animation speed, the icon and sound themes and the KNewStuff lock, with the default accent’s colours merged in.
The colour schemes, the Konsole files, the qt5ct palettes and the greeter files are written by kdos-theme’s generators; everything else by genlook.py, beside the recipe. How the accents are switched is kdos theme.
Why it is in KDOS
The comment above it in script/phases/50_desktop/packages.txt:
KDOS Modern: the eight colour schemes and global themes, the kdos Plasma style, the three desks, KSplash, the Konsole profile, the qt5ct palettes and the defaults under /usr/share/kdos/xdg.
Sources
None: the port builds from its own directory, /kdos/src/desktop/kdos-plasma-look.
Dependencies
Depends on: kdos-theme, python3, libjpeg-turbo, plasma-workspace, plasma-desktop, libksysguard, ksystemstats-kdos, breeze, kdos-icons, kdos-wallpapers, konsole, qt5ct, ttf-jetbrains-mono, noto-fonts, terminus-ttf, krohnkite.
Required by (3): kde-plasma, kdos-sddm-theme, kdos-welcome.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/50_desktop/phase.env && kpkg install kdos-plasma-look'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /kdos/src/desktop/kdos-plasma-look.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/kdos-plasma-look
SRC=$SRC_ROOT/kdos-plasma-look-1.0.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
LOOK="$PKG/usr/share"
mapfile -t accents < <(kdos-theme accents)
kdos-theme kde-colors "$LOOK/color-schemes"
kdos-theme contrast -q "$LOOK"/color-schemes/KDOS*.colors
kdos-theme konsole "$LOOK/konsole"
kdos-theme qt5ct-colors "$LOOK/qt5ct/colors"
kdos-theme greeter-globals --sddm "$LOOK/kdos/greeter"
install -Dm644 "$PORT_SRC/xdg/kdeglobals" "$LOOK/kdos/xdg/kdeglobals"
kdos-theme greeter-globals "$LOOK/kdos/xdg/kdeglobals"
kdos-theme contrast -q "$LOOK/kdos/xdg/kdeglobals"
python3 "$PORT_SRC/genlook.py" \
--src "$PORT_SRC" \
--pkg "$PKG" \
--schemes "$LOOK/color-schemes" \
--splash "$PORT_SRC/../../art/kdos-splash" \
--accents "${accents[@]}"
The switches, and why each is set:
kdos-theme kde-colors— The colour schemes, all eight accents, into the package tree. The Konsole files and the qt5ct palettes are thekonsoleandqt5ct-colorsgenerators beside it.kdos-theme contrast -q— Re-reads the installed schemes and fails the build when any text role falls below 4.5:1 on either background of its set, or a decoration below 3:1.-qprints only the failures, so the build log names what broke.kdos-theme greeter-globals --sddm— One directory per accent holding thekdeglobals,plasmarcandkcminputrcthe SDDM greeter reads from thesddmaccount’s home, andbackground.png, the accent’s dark wallpaper dimmed until the greeter’s text holds 4.5:1 on its brightest pixel. It reads the wallpapers kdos-wallpapers installed, which is why that port is independs. The greeter reads no light or dark setting, so the light accent’s directory carries its dark partner’s files.kdos-theme greeter-globals "$LOOK/kdos/xdg/kdeglobals"— Merges the default accent’s[Colors:*]and[ColorEffects:*]groups, the colour keys of[WM]and[General] ColorSchemeinto the installedkdeglobals, leaving every other line as written. KColorScheme reads colours from those groups and never from the scheme fileColorSchemenames, so without them a program started outside a Plasma session (pkexec, an early autostart) draws Breeze. With no accent named the generator takes libkcolor’s default, so the file follows the table.kdos-theme contrast -q "$LOOK/kdos/xdg/kdeglobals"— The same contrast gate as the schemes’, on the merged file.--accents "${accents[@]}"— The accent list, in libkcolor’s table order, read fromkdos-theme accents, the one program that holds the table.genlook.pyfails on an accent with no scheme file, so a ninth accent in the table cannot ship without its global theme.--splash "$PORT_SRC/../../art/kdos-splash"— Where the penguin, the block wordmark and the mascot’s own colours are read from: kdos-splash’spenguin.h, and the wordmark, the two lines under it,peng_pal[1],C_GLOWand the wordmark’s lower-row mix inkdos-splash.c. The KSplash and the previews draw the picture the boot splash draws, from the same bytes.--schemes— The colour schemesgenlook.pyreads every colour from: the role a frame, a preview or a placeholder needs is looked up in the generated.colorsfile, and no colour is written anywhere else.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/kdos-plasma-look, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf kdos-plasma-look-1.0.0-2.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/kdos-plasma-look, and runs the triggers its paths call for.
Other files in the port directory, read by build.sh: desks/, desktoptheme/, genlook.py, lookandfeel/, xdg/.
Contents
Installed directories: /usr/share/kdos/greeter, /usr/share/plasma/desktoptheme/kdos, /usr/share/plasma/layout-templates/org.kdos.desk.dock, /usr/share/plasma/layout-templates/org.kdos.desk.kdos, /usr/share/plasma/layout-templates/org.kdos.desk.tiling, /usr/share/plasma/look-and-feel/org.kdos.amber.desktop, /usr/share/plasma/look-and-feel/org.kdos.bone.desktop, /usr/share/plasma/look-and-feel/org.kdos.borland.desktop, /usr/share/plasma/look-and-feel/org.kdos.ice.desktop, /usr/share/plasma/look-and-feel/org.kdos.norton.desktop, /usr/share/plasma/look-and-feel/org.kdos.paper.desktop, /usr/share/plasma/look-and-feel/org.kdos.perfect.desktop, /usr/share/plasma/look-and-feel/org.kdos.phosphor.desktop.
Notes
Fonts. Every global theme sets Noto Sans 10 for the interface and JetBrains Mono 10 as the fixed face. KLookAndFeelManager applies the [kdeglobals][General] font keys but decides whether a package has fonts at all from [kdeglobals][WM], so each package carries a WM font key as well; without it the fonts are never applied.
Light and dark. An accent is light when KDE says so: qGray() of its Window background at 192 or above, the rule the Global Theme page uses. The light accent gets KDOS-Light icons.
Previews. preview.png, fullscreenpreview.jpg and splash.png are drawn by genlook.py from the scheme’s own roles: the desktop preview shows the mark on the ground, a window with a selected row and the KDOS desk’s panel; the splash preview is the KSplash’s settled frame at its third stage. They are generated rather than captured, so they are exact for every accent and need no session. The two small ones are drawn at three times their size and reduced, so the one-pixel rules come out as a tint rather than vanishing. cjpeg writes the JPEG, because the package structure names that file fullscreenpreview.jpg; a global theme missing any of the three shows Breeze’s picture of another desktop on the Global Theme or Splash Screen page.
KSplash. Splash.qml is copied into every package, never linked: whether KPackage follows a symbolic link out of a package is not something the theme should depend on. It repeats kdos-splash’s layout() arithmetic in device pixels, so at 1x and 2x the penguin and the wordmark land on the pixels the boot splash left them on, and its colours are the running scheme’s roles. The three colours that are no scheme’s (the mascot’s body, the colour its rim is mixed towards, and the black of a screen with nothing on it, which KSplash’s transparent window would otherwise show the starting desktop through) come from the generated mark.js, never from a literal in the QML. Its bar carries on from the boot splash’s: genlook.py reads BAR_SEGS and draw_bar()’s hold (99% and one segment short, where an unfinished boot stops and where the bar stands when rcS hands the screen over) out of kdos-splash.c into mark.js. KSplash’s bar starts at the handover value and never passes the hold, and its six stages share out whatever lies between. Because the handover value and the hold are the same, the bar stands at 99% with its leading segment pulsing until the desktop is up, and it never moves backwards at the login. A kdos-splash.c whose hold or bar genlook.py cannot read fails the build.
Its text is set in Terminus (TTF), the scalable face of the Terminus font the boot splash’s splash.psf is, sized so a column is the boot splash’s 8-pixel glyph; without that face it falls back to the fixed-width font. KSplash has no entrance animation: it draws the settled frame’s mark and bar at once, without the stage rows or the release, adds KDE’s credit, and takes the wordmark’s lower half from the scheme’s roles. Its only motion is the bar’s pulsing segment. In Phosphor mode the CRT pass is KWin’s and lies over the splash like everything else.
The recipe hash covers this port and src/libs, not src/art/kdos-splash, so a new penguin reaches the splash only when this port is next rebuilt.
Desks. A desk template must be in the panel containment category, because loadTemplate() finds templates only through it, and must carry "NoDisplay": true, because Add Panel lists every panel template without it. genlook.py refuses a desk that is missing either. Each global theme’s layouts/org.kde.plasma.desktop-layout.js lays out the desk named by kdosrc [Desk] Layout, so the Global Theme page and kdos desk always agree. Each desk template records when it was laid out in [Desk] LaidOut, and kdos desk records a digest of the panels it laid out in [Desk] LaidOutPanels and compares it with the panels now to tell whether they were changed since. The digest covers each panel’s place, its applets in order and the settings every desk writes into them (Start’s icon and label, the pinned apps, each meter’s face), and a desk whose Start has no icon, whose task manager has no launchers or whose meter has no face reads as changed even before a digest is recorded: every desk writes those keys, so their absence means the panels are not the ones it laid out. The clock carries no font keys: the applet’s own font fits the panel and follows the font in force, and a manual one is sized against the screen’s pixel density, which the display scale cancels. The Tiling desk’s pager shows the desktops’ names without window outlines, which would be drawn over the names on a bar that thin.
The pinned apps in the desks are the first words of the lines of ~/.config/kdos/favorites (from fs/etc/skel/.config/kdos/favorites), the list of boxes warmed at login; testing/lnfcheck.py compares the two.
The Plasma style. It draws only the panel, popups, tooltips, buttons, the task manager, the pager, the slider, the progress bar, the radio and check marks and the switch, with FallbackTheme=default for the rest, and ships no colors file, so it follows whichever scheme is in force. Each of the panel, dialog and tooltip frames is installed twice, at its path and under solid/: an opaque panel, a solid dialog and every PlasmaComponents tooltip and menu ask for the solid/ path by name, and without the copy they would get Breeze’s. No translucent/ set is shipped: with KWin’s blur active Plasma looks there first and, finding nothing in this style, takes the opaque frame from the same style before any fallback. Blur, background contrast and adaptive transparency are off in plasmarc. No icons/ are shipped: Plasma 6.8 draws every icon from the icon theme, and nothing reads a style’s icon SVGs. The pager’s cells carry no fill: its desktop labels are always drawn in the text colour, which Breeze’s filled current cell puts on the light accent of a dark scheme, so the current desktop is an accent outline and bottom rule over the panel’s own ground.
The slider’s fill, the progress bar’s fill (the volume and brightness OSD’s among them) and the radio and check marks are the accent, ColorScheme-ButtonFocus, over a hollow track: Breeze’s fills them with ColorScheme-Highlight, the darkened selection, which on a dark accent barely parts from its groove, and its fallback radio barely parts from the ground. The track is a faint text-coloured outline around the ground itself, so the fill meets the ground at the focus colour’s 3:1 floor. Plasma takes a style’s file whole or not at all, so each of slider.svgz, bar_meter_horizontal.svgz, radiobutton.svgz, checkmarks.svgz and switch.svgz holds every element its component asks for; shipping radiobutton.svgz is also what moves PlasmaComponents’ radio button off the compatibility path that draws it from actionbutton.svgz.
The switch (switch.svgz) is a 36 by 18 pixel hollow groove, outlined in the radio’s ring (ColorScheme-Text at 60%, at least 4.4:1 against the ground on every accent), the accent filled up to the handle when it is on, and a square handle in the button’s ground. Breeze’s switch parts from a dark ground at about 1.5:1, which leaves an unchecked switch, the tray’s “Raise maximum volume” among them, all but invisible. Plasma’s SwitchIndicator reads these elements, and genlook.py stops the build when one is missing: the frames inactive-* and active-* (all nine parts each), hint-bar-size (the groove’s size), and handle, handle-hover, handle-pressed, handle-active, handle-focus and handle-shadow. It shows one of the first four at a time, so each is a whole handle, not an overlay: the ring outline at rest, the hover colour under the pointer and with keyboard focus, a tinted handle outlined in the accent while pressed, and the accent outline when on. With keyboard focus handle-focus, a two-pixel accent outline, is drawn over the hover handle; handle-shadow is empty.
A popup’s margins are 8 pixels and its insets 4. Kickoff spaces its header, and pads its header and footer, by the dialog’s margin less its inset, so equal values put the account picture against the user’s name.