diff options
| author | Fuwn <[email protected]> | 2024-09-23 00:37:43 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-23 00:37:43 -0700 |
| commit | 7ac881cea13d72ef80c287118cd30d63fbbfd5f3 (patch) | |
| tree | ebec24c389205868de22f130e94b903653699473 /rui.go | |
| parent | acd236a56227f11219085fe0745becb193911973 (diff) | |
| download | rui-7ac881cea13d72ef80c287118cd30d63fbbfd5f3.tar.xz rui-7ac881cea13d72ef80c287118cd30d63fbbfd5f3.zip | |
feat(rui): custom notifier support
Diffstat (limited to 'rui.go')
| -rw-r--r-- | rui.go | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -11,9 +11,10 @@ import ( ) type Configuration struct { - Notify bool `json:"notify"` - Editor string `json:"editor"` - Flake string `json:"flake"` + Notify bool `json:"notify"` + Editor string `json:"editor"` + Flake string `json:"flake"` + Notifier string `json:"notifier"` } type ActionDetails struct { @@ -215,7 +216,13 @@ func notify(message string) error { return nil } - notifySend, err := exec.LookPath("notify-send") + notifier := configuration.Notifier + + if notifier == "" { + notifier = "notify-send" + } + + notifySend, err := exec.LookPath(notifier) if err != nil { return nil |