summaryrefslogtreecommitdiff
path: root/bin/emacsclient
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2023-01-04 10:47:37 -0700
committerSean Whitton <spwhitton@spwhitton.name>2023-01-06 11:28:31 -0700
commit5232cfd0ec6a37cc25216a573bdd5eb424fe6ecb (patch)
tree23f132e5771408d74b1ac493cbe9463c81f7b556 /bin/emacsclient
parentb41d26112f0c44fa6d4079e6e946a1842047dcdc (diff)
downloaddotfiles-5232cfd0ec6a37cc25216a573bdd5eb424fe6ecb.tar.gz
emacsclient wrapper: call notify-send only if stderr not a terminal
Diffstat (limited to 'bin/emacsclient')
-rwxr-xr-xbin/emacsclient3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/emacsclient b/bin/emacsclient
index 2e555710..c0281cf6 100755
--- a/bin/emacsclient
+++ b/bin/emacsclient
@@ -62,7 +62,8 @@ get_listener () {
maybe_notify () {
echo >&2 "$1"
- $was_set && notify-send --urgency=low --expire-time=10000 "$1"
+ $was_set && ! [ -t 2 ] \
+ && notify-send --urgency=low --expire-time=10000 "$1"
}
spw_flock () {