aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/user/README.md
blob: 8f3e8f1abcbbedc7734c26f5930bff22ceb2fbe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# user

The drawer's greeting row (avatar, a greeting, real name) and the page
it opens, which edits the user's details where other programs read them.

| Field | Written to |
| --- | --- |
| name | AccountsService `RealName` (which also rewrites the passwd GECOS that LibreOffice prefills from), `~/.config/emaildefaults` `FullName`, git `user.name` with the surname as an initial |
| email | AccountsService `Email`, emaildefaults `EmailAddress`, git `user.email` |
| avatar | `~/.user-icon.jpg` (converted to JPEG with `magick`), which hyprlock, the udt SDDM theme and the rofi power menu read; then AccountsService `IconFile`, so its consumers agree |
| language, location | AccountsService |
| signing key | git `user.signingkey`; None unsets it |

Location suggests places from OpenStreetMap's Nominatim as you type:
what is typed is sent to `nominatim.openstreetmap.org`, 1s after typing
stops and from three characters, per its usage policy. Up/Down, Enter and
Escape work the list. Offline, the field is plain text. The Git section
shows the name and email git will get, read-only, and the signing key;
"More git settings" closes the drawer and opens the full global git config
(`../git/`) in the settings window.

The greeting is picked at random on each drawer open, never the same one
twice running, from `~/.config/quickshell/greetings`: one per line, `{user}`
for the login name, `#` comments and blank lines skipped. Without the file,
five built-in ones.

`userctl` does all reading and writing; the page only calls it. Polkit lets a
user edit their own AccountsService entry without a prompt. A new detail is
one entry in `UserPage.qml`'s `fields` and one `case` in `userctl`.

When AccountsService cannot be read, `userctl get` prints one `error=`
line instead of blank fields; the page shows it and disables Save. The
signing key list skips revoked, expired and non-signing keys, and every
write passes its value after `--`, so one starting with a dash is not
taken for an option.

Checks: `./test-userctl.sh` (stubs every store) and
`node desktop/modules/user/test_user.js`.

Not here: the password (`passwd` in a terminal; changing it also leaves the
login keyring on the old one), `~/.face.icon` (nothing here reads it), social links (nothing reads them). Values are read
when the page opens, not watched.