From d5796fc574c57407a453e136c9ddc9f5765e10b2 Mon Sep 17 00:00:00 2001 From: Luna Komorebi Date: Fri, 2 Jun 2023 10:25:52 +0200 Subject: [PATCH] Fix senpai notification not appearing when window is not focused --- config/senpai/highlight | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/senpai/highlight b/config/senpai/highlight index a072979..f645f38 100644 --- a/config/senpai/highlight +++ b/config/senpai/highlight @@ -10,8 +10,8 @@ else title="[$BUFFER] $SENDER" fi -# focus=$(swaymsg -t get_tree | jq -r '..|objects|select(.focused==true)|.name' | grep -c ^senpai) +focus=$(xdotool getwindowfocus getwindowname |grep -c senpai) -#if [ "$focus" -eq 0 ] || [ "$HERE" -eq 0 ]; then +if [ "$focus" -eq 0 ]; then notify-send "$title" "$(escape "$MESSAGE")" -# fi +fi