HostService: add user display name and use it in UI

- Add username/envRealName/realName and displayName to HostService
- Resolve real name from `getent passwd $USER` with NOCTALIA_REALNAME override
- Use HostService.displayName on the lock screen and in the Control Center profile card
This commit is contained in:
Olaf Luijks
2025-11-14 04:15:55 +01:00
parent 17ff97f8c5
commit 2c5c462aaa
5 changed files with 47 additions and 4 deletions
@@ -7,6 +7,7 @@ import Quickshell.Widgets
import qs.Commons
import qs.Modules.Panels.ControlCenter.Cards
import qs.Modules.Panels.Settings
import qs.Services.System
import qs.Services.UI
import qs.Widgets
@@ -37,7 +38,7 @@ NBox {
Layout.fillWidth: true
spacing: Style.marginXXS
NText {
text: Quickshell.env("USER") || "user"
text: HostService.displayName
font.weight: Style.fontWeightBold
font.capitalization: Font.Capitalize
}