aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-04-13 03:23:28 +0900
committerOphestra <cat@gensokyo.uk>2025-04-13 03:30:19 +0900
commit31b7ddd122d54c36edb101d2c8bdf230651f27d4 (patch)
tree2dd0623bfa0d410d83aabfc51d276df3a14ef3e8 /main.go
parentc460892cbdfa66a2cf1f0ebcec59cf550e67962e (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'main.go')
-rw-r--r--main.go26
1 files changed, 13 insertions, 13 deletions
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
}
}