diff options
| author | Fuwn <[email protected]> | 2024-09-23 07:37:43 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-23 07:37:43 +0000 |
| commit | d19e14a3e2bc885c64aaf4fab63e064abd096328 (patch) | |
| tree | ebec24c389205868de22f130e94b903653699473 /rui.go | |
| parent | feat(rui): more home-manager and nixos-rebuild options (diff) | |
| download | rui-d19e14a3e2bc885c64aaf4fab63e064abd096328.tar.xz rui-d19e14a3e2bc885c64aaf4fab63e064abd096328.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 |