diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-25 18:43:26 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-25 18:43:26 +0200 |
| commit | 5c8f192b6e3fde2cdd35dbe7cd6c5f3f5c8e9d80 (patch) | |
| tree | 93f96e79813babfb3fe5cd948abaeb380255e5d2 | |
| parent | 3ce95cbbbf40999974f3ba655f099a2e49f5d6c6 (diff) | |
| download | sddm-theme-udt-5c8f192b6e3fde2cdd35dbe7cd6c5f3f5c8e9d80.tar.gz sddm-theme-udt-5c8f192b6e3fde2cdd35dbe7cd6c5f3f5c8e9d80.zip | |
Read the login avatar from the `avatar` key udt-accent writes, the same
~/.user-icon.jpg hyprlock draws, when the entered username matches
`avatarUser`. Any other user still gets their AccountsService icon.
Shrink the avatar from 256px to 180px so greeter and lock match.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | TODO.md | 6 | ||||
| -rw-r--r-- | docs/superpowers/specs/2026-09-17-sddm-theme-udt-panel-design.md | 2 | ||||
| -rw-r--r-- | theme/components/Panel.qml | 13 | ||||
| -rw-r--r-- | theme/theme.conf | 6 |
4 files changed, 21 insertions, 6 deletions
@@ -4,7 +4,7 @@ Tracked work for the sddm-theme-udt greeter. Add items as they come up. ## Unify the avatar with UDT -- [ ] Read the login avatar from `~/.user-icon.jpg`, the file the hyprlock theme +- [x] Read the login avatar from `~/.user-icon.jpg`, the file the hyprlock theme and the rest of UDT use, instead of the account icon SDDM resolves through `userModel`. On this desktop the two differ: the greeter draws the AccountsService icon (`/var/lib/AccountsService/icons/<user>`, a real @@ -16,5 +16,5 @@ Tracked work for the sddm-theme-udt greeter. Add items as they come up. rather than the greeter reaching into AccountsService. `~/.user-icon.jpg` is square-ish, so the existing `PreserveAspectCrop` + circle mask still yields a circle. -- [ ] Settle the avatar size once the above lands. The greeter draws it at - 256px, the lock at 180px; pick one for both. +- [x] Settle the avatar size once the above lands. The greeter draws it at + 256px, the lock at 180px; pick one for both. Settled on 180px for both. diff --git a/docs/superpowers/specs/2026-09-17-sddm-theme-udt-panel-design.md b/docs/superpowers/specs/2026-09-17-sddm-theme-udt-panel-design.md index 685b6be..657879e 100644 --- a/docs/superpowers/specs/2026-09-17-sddm-theme-udt-panel-design.md +++ b/docs/superpowers/specs/2026-09-17-sddm-theme-udt-panel-design.md @@ -144,6 +144,8 @@ generated `theme.conf.user`: | `rebootIcon` | (empty) | absolute path to the restart icon | | `suspendIcon` | (empty) | absolute path to the sleep icon | | `hibernateIcon` | (empty) | absolute path to the hibernate icon | +| `avatar` | (empty) | absolute path to `~/.user-icon.jpg`, the avatar hyprlock draws (added 2026-09-25) | +| `avatarUser` | (empty) | the user `avatar` belongs to; any other username falls back to the AccountsService icon | Unchanged: the palette keys, `uiScreen`, `fadeoutMs`, `blur`. diff --git a/theme/components/Panel.qml b/theme/components/Panel.qml index 071f651..b0aa026 100644 --- a/theme/components/Panel.qml +++ b/theme/components/Panel.qml @@ -74,6 +74,13 @@ Item { : "?" function refreshAvatar() { + // udt-accent's avatar is the one hyprlock draws, so it wins for the + // user who generated it; everyone else keeps their AccountsService icon. + var own = config.stringValue("avatar") + if (own !== "" && creds.username === config.stringValue("avatarUser")) { + avatarPath = "file://" + own + return + } for (var i = 0; i < faces.count; ++i) { var it = faces.itemAt(i) if (it && it.faceName === creds.username) { @@ -129,8 +136,8 @@ Item { } Item { - width: 256 - height: 256 + width: 180 + height: 180 anchors.horizontalCenter: parent.horizontalCenter Rectangle { @@ -143,7 +150,7 @@ Item { text: panel.initials color: panel.textColor font.family: "Noto Sans" - font.pixelSize: 92 + font.pixelSize: 65 } } diff --git a/theme/theme.conf b/theme/theme.conf index 0388c34..24c647c 100644 --- a/theme/theme.conf +++ b/theme/theme.conf @@ -54,3 +54,9 @@ powerIcon= rebootIcon= suspendIcon= hibernateIcon= + +# Login avatar. udt-accent writes the path of ~/.user-icon.jpg and the user it +# belongs to, so the greeter shows what hyprlock shows. Empty, or any other +# username, falls back to the AccountsService icon. +avatar= +avatarUser= |
