From 31b7ddd122d54c36edb101d2c8bdf230651f27d4 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 13 Apr 2025 03:23:28 +0900 Subject: fst: improve config The config struct more or less "grew" to what it is today. This change moves things around to make more sense and fixes nonsensical comments describing obsolete behaviour. Signed-off-by: Ophestra --- main.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 1fe2f7a7..4c13edcb 100644 --- a/main.go +++ b/main.go @@ -154,33 +154,33 @@ func buildCommand(out io.Writer) command.Command { userName = passwd.Username } - config.Confinement.AppID = aid - config.Confinement.Groups = groups - config.Confinement.Outer = homeDir - config.Confinement.Username = userName + config.Identity = aid + config.Groups = groups + config.Data = homeDir + config.Username = userName if wayland { - config.Confinement.Enablements |= system.EWayland + config.Enablements |= system.EWayland } if x11 { - config.Confinement.Enablements |= system.EX11 + config.Enablements |= system.EX11 } if dBus { - config.Confinement.Enablements |= system.EDBus + config.Enablements |= system.EDBus } if pulse { - config.Confinement.Enablements |= system.EPulse + config.Enablements |= system.EPulse } // parse D-Bus config file from flags if applicable if dBus { if dbusConfigSession == "builtin" { - config.Confinement.SessionBus = dbus.NewConfig(fid, true, mpris) + config.SessionBus = dbus.NewConfig(fid, true, mpris) } else { if conf, err := dbus.NewConfigFromFile(dbusConfigSession); err != nil { log.Fatalf("cannot load session bus proxy config from %q: %s", dbusConfigSession, err) } else { - config.Confinement.SessionBus = conf + config.SessionBus = conf } } @@ -189,14 +189,14 @@ func buildCommand(out io.Writer) command.Command { if conf, err := dbus.NewConfigFromFile(dbusConfigSystem); err != nil { log.Fatalf("cannot load system bus proxy config from %q: %s", dbusConfigSystem, err) } else { - config.Confinement.SystemBus = conf + config.SystemBus = conf } } // override log from configuration if dbusVerbose { - config.Confinement.SessionBus.Log = true - config.Confinement.SystemBus.Log = true + config.SessionBus.Log = true + config.SystemBus.Log = true } } -- cgit v1.3.1