From e0814ab909b229da66d364d94e14e8192e2ff55e Mon Sep 17 00:00:00 2001 From: Steven Xu Date: Tue, 30 Sep 2025 19:50:14 +1000 Subject: [PATCH] feat: make visual bell an option `@tnotify-visual-bell`, as the default command isn't compatible with *Nushell* --- scripts/helpers.sh | 5 ++++- scripts/variables.sh | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 4957e44..930c5b8 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -116,5 +116,8 @@ notify() { # trigger visual bell # your terminal emulator can be setup to set URGENT bit on visual bell # for eg, Xresources -> URxvt.urgentOnBell: true - tmux split-window -t "\$$SESSION_ID":@"$WINDOW_ID" "echo -e \"\a\" && exit" + local visual_bell="$(get_tmux_option "$tmux_notify_visual_bell" "$tmux_notify_visual_bell_default")" + if [ "$visual_bell" == "on" ]; then + tmux split-window -t "\$$SESSION_ID":@"$WINDOW_ID" "echo -e \"\a\" && exit" + fi } diff --git a/scripts/variables.sh b/scripts/variables.sh index d8f28b4..9d8c2bf 100644 --- a/scripts/variables.sh +++ b/scripts/variables.sh @@ -32,6 +32,10 @@ export verbose_title_default="" export monitor_sleep_duration="@tnotify-sleep-duration" export monitor_sleep_duration_default=10 +# Visual bell notification settings +export tmux_notify_visual_bell="@tnotify-visual-bell" +export tmux_notify_visual_bell_default="on" + # Telegram notification settings export tmux_notify_telegram_bot_id="@tnotify-telegram-bot-id" export tmux_notify_telegram_channel_id="@tnotify-telegram-channel-id"