From 7b713d8de990e8e25ee2a87b00fa5602578cb476 Mon Sep 17 00:00:00 2001 From: AngeD Date: Thu, 5 Jan 2023 00:33:04 +0100 Subject: [PATCH] feat: limit set-vol logs to tty --- bin/set-light | 5 ++++- bin/set-vol | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/set-light b/bin/set-light index b8e1f63..24a4029 100755 --- a/bin/set-light +++ b/bin/set-light @@ -40,4 +40,7 @@ for dev in /sys/class/backlight/*; do done echo "$NEW" > "$CUR_FILE" -echo "$NEW" + +if [ -t 1 ]; then + echo "$NEW" +fi diff --git a/bin/set-vol b/bin/set-vol index a1babcf..b4377a2 100755 --- a/bin/set-vol +++ b/bin/set-vol @@ -44,4 +44,6 @@ esac $CMD "$SINK" "$VOL%" > /dev/null pactl set-sink-mute "$PACTL_SINK" 0 -echo "$VOL" +if [ -t 1 ]; then + echo "$VOL" +fi