mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-09 13:12:08 +00:00
Formatting
This commit is contained in:
@@ -21,16 +21,19 @@ Singleton {
|
||||
|
||||
readonly property string displayName: {
|
||||
// Explicit override
|
||||
if (envRealName && envRealName.length > 0)
|
||||
if (envRealName && envRealName.length > 0) {
|
||||
return envRealName
|
||||
}
|
||||
|
||||
// Name from getent
|
||||
if (realName && realName.length > 0)
|
||||
if (realName && realName.length > 0) {
|
||||
return realName
|
||||
}
|
||||
|
||||
// Fallback: capitalized $USER
|
||||
if (username && username.length > 0)
|
||||
if (username && username.length > 0) {
|
||||
return username.charAt(0).toUpperCase() + username.slice(1)
|
||||
}
|
||||
|
||||
// Last resort: placeholder
|
||||
return "User"
|
||||
|
||||
Reference in New Issue
Block a user