From 3afca2bd5b58645ad503bc8ef6dfa4f05d2e01e0 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 17 Nov 2025 01:45:10 +0900 Subject: internal/wayland: expose WAYLAND_VERSION This might be useful troubleshooting information. Signed-off-by: Ophestra --- internal/outcome/outcome.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'internal/outcome') diff --git a/internal/outcome/outcome.go b/internal/outcome/outcome.go index 48f85a4b..e2563550 100644 --- a/internal/outcome/outcome.go +++ b/internal/outcome/outcome.go @@ -11,10 +11,22 @@ import ( "hakurei.app/hst" "hakurei.app/internal/acl" "hakurei.app/internal/env" + "hakurei.app/internal/info" "hakurei.app/internal/system" + "hakurei.app/internal/wayland" "hakurei.app/message" ) +// Info returns the address to a populated [hst.Info]. +// +// This must not be called from within package outcome. +func Info() *hst.Info { + hi := hst.Info{WaylandVersion: wayland.Version, + Version: info.Version(), User: new(Hsu).MustID(nil)} + env.CopyPaths().Copy(&hi.Paths, hi.User) + return &hi +} + // envAllocSize is the initial size of the env map pre-allocated when the configured env map is nil. // It should be large enough to fit all insertions by outcomeOp.toContainer. const envAllocSize = 1 << 6 -- cgit v1.3.1