Add Windows platform integration scaffolding
This commit is contained in:
committed by
Brandon McGinty
parent
fab4fd50d2
commit
9c487c2586
@@ -0,0 +1,7 @@
|
||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||
|
||||
package config
|
||||
|
||||
func defaultNotifyCommand() string {
|
||||
return "/usr/share/barnard/barnard-sound.sh \"%event\" \"%who\" \"%what\""
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
//go:build windows
|
||||
|
||||
package config
|
||||
|
||||
// Windows installations do not ship the POSIX notification helper. Users can
|
||||
// configure a cmd.exe-compatible command explicitly if they want notifications.
|
||||
func defaultNotifyCommand() string {
|
||||
return ""
|
||||
}
|
||||
@@ -148,7 +148,7 @@ func (c *Config) LoadConfig() {
|
||||
jc.Username = &username
|
||||
}
|
||||
if c.config.NotifyCommand == nil {
|
||||
ncmd := string("/usr/share/barnard/barnard-sound.sh \"%event\" \"%who\" \"%what\"")
|
||||
ncmd := defaultNotifyCommand()
|
||||
jc.NotifyCommand = &ncmd
|
||||
}
|
||||
if c.config.NoiseSuppressionEnabled == nil {
|
||||
|
||||
Reference in New Issue
Block a user