aboutsummaryrefslogtreecommitdiff
path: root/rui.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-20 01:52:34 +0000
committerFuwn <[email protected]>2024-09-20 01:52:34 +0000
commitf87766150b690581d7a54fbaeb5b5458bb5a7bd5 (patch)
treeee2ce20fe22956c2924b29ea65a83e0b84d541bd /rui.go
parentflake: bump inputs (diff)
downloadrui-f87766150b690581d7a54fbaeb5b5458bb5a7bd5.tar.xz
rui-f87766150b690581d7a54fbaeb5b5458bb5a7bd5.zip
feat(rui): only notify in window manager
Diffstat (limited to 'rui.go')
-rw-r--r--rui.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/rui.go b/rui.go
index 5400e2c..00c7adb 100644
--- a/rui.go
+++ b/rui.go
@@ -241,6 +241,10 @@ func command(name string, args ...string) error {
}
func notify(message string) error {
+ if os.Getenv("DISPLAY") == "" && os.Getenv("WAYLAND_DISPLAY") == "" {
+ return nil
+ }
+
notifySend, err := exec.LookPath("notify-send")
if err != nil {