diff --git a/profile.go b/profile.go index 175ca93..92feed5 100644 --- a/profile.go +++ b/profile.go @@ -52,14 +52,14 @@ const ( ) type XServerConf struct { - Enabled bool - TrayIcon string `json:"tray_icon"` - WindowIcon string `json:"window_icon"` - EnableTray bool `json:"enable_tray"` - UseDBUS bool `json:"use_dbus"` - UsePulseAudio bool `json:"use_pulse_audio"` - DisableClipboard bool `json:"disable_clipboard"` - AudioMode AudioMode `json:"audio_mode"` + Enabled bool + TrayIcon string `json:"tray_icon"` + WindowIcon string `json:"window_icon"` + EnableTray bool `json:"enable_tray"` + EnableNotifications bool `json:"enable_notifications"` + UsePulseAudio bool `json:"use_pulse_audio"` + DisableClipboard bool `json:"disable_clipboard"` + AudioMode AudioMode `json:"audio_mode"` } type WhitelistItem struct { @@ -100,11 +100,11 @@ func NewDefaultProfile() *Profile { Multi: false, AllowFiles: false, XServer: XServerConf{ - Enabled: true, - EnableTray: false, - UseDBUS: false, - UsePulseAudio: false, - AudioMode: PROFILE_AUDIO_NONE, + Enabled: true, + EnableTray: false, + EnableNotifications: false, + UsePulseAudio: false, + AudioMode: PROFILE_AUDIO_NONE, }, } } diff --git a/xpra/xpra.go b/xpra/xpra.go index 8189f5b..10778f2 100644 --- a/xpra/xpra.go +++ b/xpra/xpra.go @@ -36,7 +36,6 @@ var xpraDefaultArgs = []string{ "--system-tray", "--xsettings", //"--no-xsettings", - "--notifications", "--cursors", "--encoding=rgb", "--no-pulseaudio", @@ -60,6 +59,11 @@ func getDefaultArgs(config *oz.XServerConf) []string { args = append(args, "--microphone", "--speaker") } + if config.EnableNotifications { + args = append(args, "--notifications") + } else { + args = append(args, "--no-notifications") + return args }