Fixed notification flag to xpra profile

master
xSmurf 10 years ago
parent 82d96c2648
commit fd5de9e133

@ -52,14 +52,14 @@ const (
) )
type XServerConf struct { type XServerConf struct {
Enabled bool Enabled bool
TrayIcon string `json:"tray_icon"` TrayIcon string `json:"tray_icon"`
WindowIcon string `json:"window_icon"` WindowIcon string `json:"window_icon"`
EnableTray bool `json:"enable_tray"` EnableTray bool `json:"enable_tray"`
UseDBUS bool `json:"use_dbus"` EnableNotifications bool `json:"enable_notifications"`
UsePulseAudio bool `json:"use_pulse_audio"` UsePulseAudio bool `json:"use_pulse_audio"`
DisableClipboard bool `json:"disable_clipboard"` DisableClipboard bool `json:"disable_clipboard"`
AudioMode AudioMode `json:"audio_mode"` AudioMode AudioMode `json:"audio_mode"`
} }
type WhitelistItem struct { type WhitelistItem struct {
@ -100,11 +100,11 @@ func NewDefaultProfile() *Profile {
Multi: false, Multi: false,
AllowFiles: false, AllowFiles: false,
XServer: XServerConf{ XServer: XServerConf{
Enabled: true, Enabled: true,
EnableTray: false, EnableTray: false,
UseDBUS: false, EnableNotifications: false,
UsePulseAudio: false, UsePulseAudio: false,
AudioMode: PROFILE_AUDIO_NONE, AudioMode: PROFILE_AUDIO_NONE,
}, },
} }
} }

@ -36,7 +36,6 @@ var xpraDefaultArgs = []string{
"--system-tray", "--system-tray",
"--xsettings", "--xsettings",
//"--no-xsettings", //"--no-xsettings",
"--notifications",
"--cursors", "--cursors",
"--encoding=rgb", "--encoding=rgb",
"--no-pulseaudio", "--no-pulseaudio",
@ -60,6 +59,11 @@ func getDefaultArgs(config *oz.XServerConf) []string {
args = append(args, "--microphone", "--speaker") args = append(args, "--microphone", "--speaker")
} }
if config.EnableNotifications {
args = append(args, "--notifications")
} else {
args = append(args, "--no-notifications")
return args return args
} }

Loading…
Cancel
Save