diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-09-29 15:24:54 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-09-29 15:24:54 +0900 |
| commit | dc59f20d7b65ab3ffd56e298a62f9b0b5b107c6e (patch) | |
| tree | 87fad6e655129bb6f050b48aff70dec54f030762 /dbus | |
| parent | 7e7327ebf8ba6323e9ba3ba38b27ed87fc578568 (diff) | |
dbus: toggleable xdg-dbus-proxy output
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'dbus')
| -rw-r--r-- | dbus/run.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dbus/run.go b/dbus/run.go index a4c04dc2..eef0d145 100644 --- a/dbus/run.go +++ b/dbus/run.go @@ -9,7 +9,7 @@ import ( // Start launches the D-Bus proxy and sets up the Wait method. // ready should be buffered and should only be received from once. -func (p *Proxy) Start(ready chan error) error { +func (p *Proxy) Start(ready chan error, output bool) error { p.lock.Lock() defer p.lock.Unlock() @@ -25,8 +25,10 @@ func (p *Proxy) Start(ready chan error) error { // xdg-dbus-proxy does not need to inherit the environment h.Env = []string{} - h.Stdout = os.Stdout - h.Stderr = os.Stderr + if output { + h.Stdout = os.Stdout + h.Stderr = os.Stderr + } if err := h.StartNotify(ready); err != nil { return err } |
