A desktop built on KDE Plasma 6 and Quickshell, packaged as a NixOS module. It adds a Temple session next to Plasma in the login screen. The Temple session is Plasma with KWin, KWallet, System Settings and the portals, and with the Temple shell in place of plasmashell. The Plasma session stays as it was.
modules/temple.nixis the NixOS module. It enables Plasma 6, registers thetemplesession, and renders the kitty config, Temple's global shortcuts and KWin settings, and one directory per theme under/etc/temple.modules/luna.nixdownloads XP'sluna.msstylesat build time and cuts the Luna Blue bitmaps out of it, with transparency from the style's colour key or alpha.frame/holds the window frame and caption buttons;startpanel/holds the Start menu parts;dialog/holds the push buttons, tabs, tab pane, group box, combo box, spin buttons and check boxes. The module exposes them as/etc/temple/luna. Microsoft owns these bitmaps, so the repository holds only the URL and hash.modules/timedate.nixdownloads XP'stimedate.cplfrom an XP SP3 install image at build time and takes out its world map, exposed as/etc/temple/timedate/worldmap.png. Microsoft owns the bitmap, so the repository holds only the URL and hash.modules/kwin.nixbuilds one KWin window decoration and one Alt+Tab switcher per theme from the QML inmodules/kwin/. The XP theme usesmodules/kwin/decoration-xp, which assembles the Luna Blue frame and caption buttons fromluna.nix'sframe/bitmaps.shell/start/XpStartMenu.qmlassembles the XP Start menu from thestartpanel/bitmaps: the user pane, the program and places lists with their separators, the All Programs button and arrow, the log-off pane and its buttons, and the All Programs flyout. It uses the default pane sizes, sizing margins and content margins ofStartPanel.*andStartMenu::Toolbar.*in the style'sNORMALBLUE_INI. The arrow keys move the selection; Right on All Programs opens the flyout.- The bar clock opens the clock of its Windows version. Hovering it shows the long date in a tooltip. Under XP, a click opens
shell/clock/XpDateTime.qml, the Date and Time Properties dialog, assembled from theframe/anddialog/bitmaps at the positions oftimedate.cpl's dialog templates: the Date & Time tab with the month list, year spinner, month grid, analog clock and time field, the Time Zone tab with the zone and the world map, and the Internet Time tab with whethersystemd-timesyncd.serviceruns and the first server of/etc/systemd/timesyncd.conf. Apply and OK set what changed throughsystemctl, so polkit asks for the password once: a new date or time startstemple-set-time@<date and time>.service, which the module defines to stopsystemd-timesyncd.serviceand runtimedatectl set-time, and the Internet Time check box starts or stopssystemd-timesyncd.service. NixOS keeps unit files read-only, sotimedatectl set-ntpfails, and a stopped timesyncd starts again at the next boot. Under Windows 7, a click opensshell/clock/Win7Clock.qml, the clock flyout: the long date, which returns the calendar to today, a month grid that zooms out to a year and a decade, the analog clock with the time and weekday, and "Change date and time settings...", which opens Plasma's Date & Time settings. The Windows 7 flyouts lay their content on a white sheet inside the glass frame, as Windows 7 did; thesheetof thetray.popuptokens inthemes/win7-black.nixdraws it. modules/wallpapers.nixdownloads the default wallpapers of Windows XP, Windows 7, macOS Sequoia and macOS Tahoe at build time into/etc/temple/wallpapers, for the background picker. Microsoft and Apple own these images, so the repository holds only their URLs and hashes.modules/clippy.nixdownloads Clippy's sprite sheet and animation table from clippy.js into/etc/temple/clippy. Under the XP theme,shell/clippy/Clippy.qmlshows him while Voxtype works: he listens while it records (and taps his finger oncevoxtype-audio-bridgereports silence), works while it transcribes, and shows Voxtype's notifications in his balloon instead of the normal popup. He reads Voxtype's state from$XDG_RUNTIME_DIR/voxtype/state, so Voxtype'sstate_filemust stay"auto".themes/holds the built-in themes:xp-luna(Windows XP Luna),win7-black(Windows 7 Black, the default),win7-aero(Windows 7 Aero),macos-sequoia(macOS Sequoia),macos-tahoe(macOS Tahoe) andtempleos(TempleOS). ThethemeTypesubmodule inmodules/temple.nixdefines their shape: a base16 palette, an optional terminal palette, glass, radius, font and window-border tokens, astyle(xp,win7,macosortempleos) that picks the bar, start menu, session dialogs and clock, that style'sbartokens, the baredge, and thetrayandnotificationstokens that the shared flyouts, tooltips, notification popups and notification centre draw from.frame,lineWidthandfont.bitmapcover the macOS glass and the TempleOS text mode.win7-aeroimportswin7-blackand changes only the colours; both macOS themes take their flyout tokens frommacos-flyouts.nix. A new theme starts from a copy or an import of a built-in one. The XP and Windows 7 bars use the bitmaps inshell/bar/assets/, taken from the original Windows visual styles; the Windows 7 bar lays them over thebartint and opacity. Both macOS themes draw from thebartokens thatshell/macos/Macos.qmlreads, so another macOS release is one more theme with its own tokens. The macOS themes use SF Pro and SF Mono, which the module extracts from Apple's download images.templeosuses the 8x8 system font of TempleOS, whichmodules/templeos-font.nixbuilds fromKernel/FontStd.HCof the TempleOS source.shell/is the Quickshell config.theme/Theme.qmlreads every theme from/etc/temple/themes.jsonandBackground.qmlreads/etc/temple/backgrounds.json. Both hot-reload.shell/osd/Osd.qmlreplaces plasmashell's volume and brightness pop-up. It shows when the volume or mute state of the default PipeWire output changes, and when powerdevil reports a change from the brightness keys (itsorg.kde.ScreenBrightnessBrightnessChangedsignal, read throughbusctl --user monitor). It hides 1.5 s after the last change.shell/notifications/Notifications.qmlshows the notification popups. The XP theme draws a balloon. Its tail points at the tray icon of the app that sent the notification (when the status notifier id or title is the same as the notification's app name or desktop entry, ignoring case and separators), else at the clock. The XP bar publishes its tray icons throughshell/tray/TrayIcons.qml.shell/clipboard/Clipboard.qmlis the clipboard history that Super+V opens, framed like the theme's tray flyouts. Klipper, Plasma's clipboard manager, runs inside plasmashell, which the Temple session does not start. So the shell loads Klipper's history model from plasma-workspace'sorg.kde.plasma.private.clipboardQML module. The model records each copy into~/.local/share/klipper/history3.sqliteand readsklipperrc, the same files as plain Plasma, so the history and the clipboard settings carry over between the sessions. Klipper's own popup, D-Bus service and shortcuts do not run in the Temple session. Klipper ignores images by default;/etc/temple/xdg/klipperrcmakes it keep them in the Temple session. That setting is not locked, so anIgnoreImagesin~/.config/klipperrc, which Klipper's settings write under plain Plasma, wins.shell/health/Health.qmlwatches the processor and the disks. It warns when the processor averages 98% or more over 10 seconds (and clears under 90%), when a disk has less free space than 20 GB or a tenth of its size, whichever is smaller, and when a disk grows fast enough to be full within 10 minutes (measured over at least 30 seconds, cleared once it would take 30). It checks the processor every 2 seconds from/proc/statand the disks every 10 seconds withdf, leaving out tmpfs, devtmpfs, ramfs, efivarfs, squashfs and overlay mounts. Each warning sends one notification, from "System Health", when it starts; only the filling warning is critical and stays until dismissed. Under the XP theme Clippy reads the warnings out. While a warning lasts,shell/health/HealthIcon.qmlshows a warning icon in the bar (Sys:CPU!orSys:Disk!under TempleOS); its tooltip names the warnings and a click lists them, each opening System Monitor or the disk in Dolphin./etc/temple/xdg/kded5rcturns off Plasma's own free space notifier in the Temple session, so a low disk warns once.hosts/vm.nixis the test VM. It autologs thetempleuser into the Temple session.
Super+T opens the theme picker. Each highlighted theme is applied to the whole desktop at once: the shell, the KWin window decoration and Alt+Tab switcher, and kitty. Enter keeps the theme. Escape goes back to the theme that was active when the picker opened. qs -p /etc/temple/shell ipc call theme set xp-luna does the same from a terminal.
The active theme is the link ~/.local/state/temple/theme, which points into /etc/temple/themes/<name>. The session creates it from temple.theme on the first login, and again if the linked theme is removed. temple-apply-theme <name> moves the link, has KWin reload its config, and sends SIGUSR1 to kitty so that kitty rereads its config.
The Temple session puts ~/.local/state/temple/theme/xdg and /etc/temple/xdg in front of XDG_CONFIG_DIRS, and /etc/temple/share in front of XDG_DATA_DIRS. KWin finds the theme's window decoration, Alt+Tab switcher and Temple's shortcuts there. The Temple settings are locked in those files, so they win over what plain Plasma keeps in ~/.config, and Temple writes nothing to ~/.config. Plain Plasma does not read these directories, so its decoration, switcher, shortcuts and lock screen stay as they were.
A kitty that uses its own config can follow the theme with include ~/.local/state/temple/theme/kitty.conf as the last line of that config.
just vm # build and boot the VM
just build # build only
just check # nix flake check
just fmt # alejandra + qmlformat
The VM mounts the host Nix store over virtiofs, so a rebuild only builds the changed store paths and no disk image. Shell edits still need a rebuild and a VM restart. Inside the VM, systemctl --user restart temple-shell restarts the shell and journalctl --user -u temple-shell prints its errors. just shell runs this checkout's shell against the VM's generated config. Stop the running shell first with systemctl --user stop temple-shell. KWin hands the window list only to the system's quickshell, so run just shell with the same nixpkgs as the system.
nix flake check (or just check) runs the VM tests in tests/. nix/checks.nix registers them, and tests/common.nix holds the shared VM node and the Python helpers. Each test boots the VM host in QEMU, so the machine needs KVM. To run one test:
nix build -L --no-link 'path:.#checks.x86_64-linux.<name>'
| Test | What it asserts |
|---|---|
sessions |
Plain Plasma runs plasmashell with the user's decoration and has no Temple shell or shortcuts. The Temple session runs the Temple shell and no plasmashell or splash, registers its shortcuts, and uses the theme's KWin decoration. A theme switch moves the decoration and switcher, windows keep a decoration, and ~/.config/kwinrc gets no Temple settings. This test boots two VMs. |
picker-screens |
On three screens, Super+T and the launcher open one theme picker, on the screen of the active window. Arrows preview themes and Escape restores the first one. |
pickers |
Scrolling the theme picker previews themes and Enter keeps one. Typing filters the background picker, Enter writes the choice to ~/.local/state/temple/background.path and the lock screen link, Escape drops a preview, and scrolling picks another wallpaper. |
clippy |
Clippy comes on screen while Voxtype records, stays while it transcribes, opens his balloon for Voxtype's notification, and leaves once Voxtype is idle and the balloon times out. |
clipboard |
Copies show in the Super+V history in the XP, Windows 7, macOS and TempleOS styles. Escape leaves the clipboard as it was, Enter on an older entry puts that entry back on the clipboard, and typing filters the entries. With no klipperrc of the user's own, an image copy is kept, shows a thumbnail, and Enter puts the image back. |
health |
Busy loops on every core raise one CPU warning, and another once they stop and start again. A loop disk filled past nine tenths raises a low space warning, and a loop disk written at 2 MB/s raises a filling warning. |
The screenshots the tests take are in the output path of the check.
inputs.temple.url = "github:lucemans/v3x-temple";
# in a host
imports = [inputs.temple.nixosModules.temple];
temple.enable = true;
temple.theme = "xp-luna"; # first-login theme, picked from temple.themes
temple.themes.mine = import ./mine.nix; # added next to the built-in themes
temple.terminal = pkgs.kitty; # opened by Super+Return, Alt+K and the launcher
temple.backgrounds = [./left.png ./right.png]; # default: [shell/bg.png]
temple.bar.monitors = { top = ["DP-5"]; bottom = ["DP-4"]; }; # XP and Windows 7 draw their taskbar at the bottom and no top bar; [] means every screen
temple.activateLinux = { enable = true; monitors = ["DP-4"]; }; # opt-in "Activate Linux" watermark, toggled from a bar icon
temple.keybinds.terminal = {
key = "Alt+K"; # Plasma notation: Meta, Ctrl, Alt, Shift, then a key
command = "kitty";
};Pick Temple in SDDM. The Temple session starts the same Plasma services as the Plasma session, apart from plasmashell and the splash screen. Both sessions share one KDE config and one KWallet, so apps such as Chromium and Signal keep their stored secrets in either session.
Temple's shortcuts are two KDE global shortcut components, present only in the Temple session. The shell's own actions (Super, Super+K, Super+/, Super+T, Super+B, Super+V) are the component "Temple shell": the shell registers them for the session only and gets each key press as a D-Bus signal, so text typed right after Super lands in the Start menu. System Settings can rebind them until the next login. The commands are the component "Temple": System Settings lists them under Shortcuts and can rebind them. A temple.keybinds entry with the same key as a default below replaces that default. KWin's own shortcuts, such as window tiling, virtual desktops and Print, keep their Plasma settings.
temple.bar.monitors names the screens that get a bar, by connector name as kscreen-doctor -o prints it. An empty list puts a bar on every screen.
| Keys | Action |
|---|---|
| Super | Start menu |
| Super+K | Launcher: apps, commands, theme picker |
| Start button | Start menu in the style of the theme: pinned and recent programs, All Programs, folders, and Log off / Shut down behind a confirmation dialog |
| Super+T | Theme picker |
| Super+B | Background picker: temple.backgrounds, the images in ~/Pictures/Wallpapers, and the default wallpapers of Windows XP, Windows 7, macOS Sequoia and macOS Tahoe |
| Super+V | Clipboard history, newest first. Type to filter, arrows to select, Enter to put the selected entry back on the clipboard, Escape to close |
| Super+Return | Terminal (temple.terminal) |
| Alt+K | Terminal (temple.terminal) |
| Super+/ | Show Temple's keybinds |
| Super+Q | Close window |
| Super+F | Fullscreen |
| Alt+Tab / Alt+Shift+Tab | Window switcher in the style of the theme, with live previews, most recently used first. Release Alt to switch, Escape to cancel |
Plasma's defaults cover the rest, among them Super+L to lock, Super+E for Dolphin, Print for Spectacle, Super+Arrows to tile, Super+PgUp to maximize, Super+Drag to move, and the volume, media and brightness keys.