aboutsummaryrefslogtreecommitdiff
path: root/rui.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-23 00:37:43 -0700
committerFuwn <[email protected]>2024-09-23 00:37:43 -0700
commit7ac881cea13d72ef80c287118cd30d63fbbfd5f3 (patch)
treeebec24c389205868de22f130e94b903653699473 /rui.go
parentacd236a56227f11219085fe0745becb193911973 (diff)
downloadrui-7ac881cea13d72ef80c287118cd30d63fbbfd5f3.tar.xz
rui-7ac881cea13d72ef80c287118cd30d63fbbfd5f3.zip
feat(rui): custom notifier support
Diffstat (limited to 'rui.go')
-rw-r--r--rui.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/rui.go b/rui.go
index fd18ed4..ea261b7 100644
--- a/rui.go
+++ b/rui.go
@@ -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