summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoodle <shawtynoodle@gmail.com>2023-07-02 00:32:43 +0300
committernoodle <shawtynoodle@gmail.com>2023-07-02 00:32:43 +0300
commit5f6069a6a74ca230a6a981d3fcfc65fe3bfd77a3 (patch)
tree82dbaa31c6e6c8de7adc8e97c3f278156acaaec1
parentd2fb362e27fcf5452497bf0e90961ca762c48c0b (diff)
mpc-notify: add check for display
-rwxr-xr-xmpc-notify6
1 files changed, 6 insertions, 0 deletions
diff --git a/mpc-notify b/mpc-notify
index 56e49b4..ef7cdc4 100755
--- a/mpc-notify
+++ b/mpc-notify
@@ -9,6 +9,12 @@
# For notification on media keys:
# Bind media key to a call to mpc with the approprite command.
+# exit early if we're in tty
+if [ -z "$WAYLAND_DISPLAY" ] && [ -z "$DISPLAY" ]; then
+ exit 2
+fi
+command="$1"
+
# FEATURE: make width and height configurable through flags
preview_width=64
preview_height=64