-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications not showing on Wayland due to focused window detection #134
Comments
I have the same issue. The reason why this call does not work anymore is security: Other apps, e.g., ActivityWatch, have this issue, too. See https://github.com/flexagoon/focused-window-dbus for an GNOME Shell Extension to solve this. This was written with ActivityWatch in mind, but it's general. However, I don't know if it's worth the hassle supporting that here.
As a first step, it may be simpler to disable that check on GNOME, or at least give an option to do so? I don't know, it's hard to imagine how annoying it is to always get notifications even when the window is focused. We'd need to try. |
(false, '')
1.19.0 (release) added an option to enable notifications on Wayland while using the Kitty terminal. Thanks @jinliu! |
As a workaround, it is possible to remove the focused window detection and have the notification displayed even if the window is in focus by commenting the check for that. I keep the duration to be longer at 10s, so it works for me on
function __done_ended --on-event fish_postexec
set -l exit_status $status
# backwards compatibility for fish < v3.0
set -q cmd_duration; or set -l cmd_duration $CMD_DURATION
if test $cmd_duration
and test $cmd_duration -gt $__done_min_cmd_duration # longer than notify_duration
- and not __done_is_process_window_focused # process pane or window not focused
+ # and not __done_is_process_window_focused # process pane or window not focused |
I'm using wezterm and also don't care about whether the same window is active or not. Update: |
Hey there!
I changed my desktop over from X11 to Wayland GNOME a few months back, and lost notifications in the process (though I didn't notice it initially because a bunch of other stuff had broken as well).
I got some time to poke around at it today, and it looks like
done
always thinks that the terminal window is focused due to the check on line 210.Further investigation shows that on my system,
done
gets the focused window ID using the gdbus call, and that this command always evaluates to the same thing on my system. I've tried running that command myself and focusing various XWayland and native Wayland apps, and I seem to always get the same result:and adding print statements into the
is_process_window_focused
function seems to confirm that this is the only window ID that's ever produced:Unfortunately, at this point, my knowledge of GNOME + Wayland basically runs out---I have no idea what that gdbus command is doing, whether it's supposed to work that way, etc. If anyone has proposed fixes, I would be happy to test it out.
System info:
Arch Linux (versions below are as reported by Pacman)
GNOME Version: 43-1
Wayland version:1.21.0-2
XWayland version: 22.1.6-1
Fish version: 3.5.1-1
done
version: 1.16.5The text was updated successfully, but these errors were encountered: