user-record: Add preferredSession{Type,Launcher}

These will be used by display managers to pre-select the user's
preferred desktop environment and display server type. On homed, the
display manager will also be able to set these fields to cache the
user's last selection.
This commit is contained in:
Adrian Vovk
2024-03-01 16:28:10 +00:00
committed by Luca Boccassi
parent 9dbabd0a8b
commit 793ceda177
7 changed files with 69 additions and 4 deletions
+9 -1
View File
@@ -110,7 +110,9 @@ _homectl() {
--auto-login
-b --blob
--avatar
--login-background'
--login-background
--session-launcher
--session-type'
)
if __contains_word "$prev" ${OPTS[ARG]}; then
@@ -153,6 +155,12 @@ _homectl() {
--language)
comps=$(localectl list-locales 2>/dev/null)
;;
--session-launcher)
comps=$(find /usr/share/{x,wayland-}sessions/ -type f -name '*.desktop' -exec basename {} .desktop \; 2>/dev/null | sort -u)
;;
--session-type)
comps='wayland x11 tty'
;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0