You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
A development environment for building and customizing SDDM login themes for KDE Plasma 6. Themes are written in pure QtQuick/QML (no KDE Plasma library dependencies) and can be previewed in a standalone window without restarting SDDM.
8
+
9
+
## Commands
10
+
11
+
### Live preview (primary development loop)
12
+
```sh
13
+
./scripts/preview.sh # preview the default theme
14
+
./scripts/preview.sh -theme <name># preview a specific theme
15
+
qml6 preview/Preview.qml # one-shot preview (no file watching)
16
+
```
17
+
18
+
### Lint (static analysis + runtime type check)
19
+
```sh
20
+
./scripts/lint-qml.sh # lint all themes
21
+
./scripts/lint-qml.sh -theme <name># lint a specific theme
22
+
```
23
+
CI runs this on every push/PR. It runs `qmllint` for static analysis, then launches the preview under `xvfb` for 3 seconds to catch runtime type errors (`Unable to assign`, `ReferenceError`, `TypeError`).
24
+
25
+
### Full-fidelity SDDM test
26
+
```sh
27
+
./scripts/test-sddm.sh # test default theme with real SDDM greeter
28
+
./scripts/test-sddm.sh -theme <name>
29
+
```
30
+
31
+
## Architecture
32
+
33
+
### Theme structure
34
+
Themes live under `themes/<name>/`. The default theme is at `themes/default/`.
-`assets/` — background image and other static assets
42
+
43
+
### Preview harness
44
+
`preview/Preview.qml` mirrors `Main.qml` layout but replaces SDDM context properties with mock objects (`mockSddm`, `mockConfig`, `mockUserModel`, `mockSessionModel`, `mockKeyboard`). The preview script symlinks the selected theme's `components/` and `assets/` into `preview/` so relative QML imports resolve correctly.
45
+
46
+
In preview mode, use password `test` for successful login; any other password triggers "Login Failed".
47
+
48
+
### SDDM context properties
49
+
SDDM injects five globals that themes depend on: `sddm`, `config`, `userModel`, `sessionModel`, `keyboard`. Components receive these as explicit properties rather than accessing globals directly, making them portable between Main.qml (real SDDM) and Preview.qml (mocks).
50
+
51
+
### QML style
52
+
All scripts set `QT_QUICK_CONTROLS_STYLE=Basic` to avoid Breeze/Plasma-specific errors outside a full Plasma session.
53
+
54
+
## Key Conventions
55
+
56
+
- Pure QtQuick only — no `org.kde.plasma.*`, `org.kde.breeze.components`, or `Kirigami` imports
57
+
- Components take dependencies as explicit props (not SDDM context property access)
58
+
-`qmllint` warnings about unresolved SDDM globals are expected and tolerated; only actual errors fail CI
59
+
- All config values come through `theme.conf` and are accessed via `config.<key>` in QML
Copy file name to clipboardExpand all lines: README.md
+26-75Lines changed: 26 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,99 +6,57 @@ Build and customize your KDE login screen without having to actually reinstall t
6
6
7
7
This project gives you a live-preview development environment for SDDM themes on KDE Plasma 6. Edit QML, tweak colors, swap backgrounds -- and see every change instantly in a standalone window. When you're happy with the result, install it as your real login screen with one command.
8
8
9
-
**Who is this for?** Anyone who wants to customize their KDE/SDDM login screen -- whether you're importing an existing theme to tweak it, or building one from scratch.
10
-
11
-
## What's Inside
12
-
13
-
```
14
-
kde-lockscreen-builder/
15
-
├── Main.qml # SDDM entry point (the actual theme)
2. Copy the theme's files over the project files. SDDM themes typically have a `Main.qml`, `metadata.desktop`, `theme.conf`, and asset directories -- replace the ones in this repo with yours:
30
+
### Or import an existing theme
67
31
68
-
```sh
69
-
# Example: importing from an installed SDDM theme
70
-
cp -r /usr/share/sddm/themes/some-theme/*.
71
-
```
32
+
Already have a theme you want to modify? You can find community themes on the [KDE Store](https://store.kde.org/browse?cat=101&ord=rating), or copy one that's already installed on your system:
If the imported theme uses KDE/Plasma-specific QML imports (e.g. `org.kde.plasma.*`), the standalone preview won't be able to render those parts. You can still use `./scripts/test-sddm.sh` for full-fidelity testing, or incrementally replace those imports with pure QtQuick equivalents.
40
+
If the imported theme uses KDE/Plasma-specific QML imports (e.g. `org.kde.plasma.*`), the standalone preview won't render those parts. You can still use `./scripts/test-sddm.sh` for full-fidelity testing, or incrementally replace those imports with pure QtQuick equivalents.
80
41
81
42
## Development Workflow
82
43
83
-
### Live Preview (primary loop)
84
-
85
-
`preview/Preview.qml` mocks all SDDM-provided objects (`sddm`, `userModel`, `sessionModel`, `config`, `keyboard`) so your theme renders in a standalone window -- no real SDDM greeter needed.
44
+
### Live preview
86
45
87
46
```sh
88
-
./scripts/preview.sh
47
+
./scripts/preview.sh # preview the default theme
48
+
./scripts/preview.sh -theme <name># preview a specific theme under themes/
89
49
```
90
50
91
-
This watches all `.qml`, `.conf`, and image files using `entr`. On every save, the preview window is killed and relaunched automatically.
51
+
This watches all `.qml`, `.conf`, and image files. On every save, the preview window restarts automatically. In preview mode, type the password `test` to simulate a successful login.
92
52
93
53
You can also launch the preview once without file-watching:
94
54
95
55
```sh
96
56
qml6 preview/Preview.qml
97
57
```
98
58
99
-
In preview mode, type the password `test` to simulate a successful login. Any other password triggers the "Login Failed" notification.
100
-
101
-
### Full-Fidelity SDDM Test
59
+
### Full-fidelity SDDM test
102
60
103
61
Periodically verify your theme against the real SDDM greeter:
104
62
@@ -140,7 +98,7 @@ Changes to `theme.conf` are picked up by the file watcher just like QML changes.
140
98
141
99
## Installing Your Theme
142
100
143
-
When you're satisfied with your theme, install it so SDDM uses it at your real login screen. SDDM themes live in `/usr/share/sddm/themes/`.
101
+
SDDM themes live in `/usr/share/sddm/themes/`.
144
102
145
103
### 1. Choose a theme name
146
104
@@ -155,19 +113,17 @@ Theme-Id=my-login-theme
155
113
**Symlink (recommended during development)** -- lets you keep editing and see changes on next login:
The included starter theme is built with **pure QtQuick** -- no imports from `org.kde.plasma.*`, `org.kde.breeze.components`, or `Kirigami`. This means:
192
-
193
-
- Total control over every visual element
194
-
- No dependency on KDE Plasma libraries at the SDDM level
195
-
- Easy mocking: only 5 SDDM globals need stubs (`sddm`, `config`, `userModel`, `sessionModel`, `keyboard`)
143
+
## Useful Links
196
144
197
-
Components receive their dependencies as explicit properties rather than relying on SDDM context properties directly, making them testable in the preview harness and reusable across themes.
145
+
-[SDDM Theming Guide](https://github.com/sddm/sddm/wiki/Theming) -- API reference for the SDDM context properties (`sddm`, `userModel`, `sessionModel`, etc.) and theme structure
146
+
-[KDE Store: SDDM Login Themes](https://store.kde.org/browse?cat=101&ord=rating) -- community-made themes to use as starting points or inspiration
147
+
-[Qt QML Documentation](https://doc.qt.io/qt-6/qtqml-index.html) -- language reference for QML
148
+
-[Qt Quick Documentation](https://doc.qt.io/qt-6/qtquick-index.html) -- the UI framework used by SDDM themes
0 commit comments