franciscolourenco / done

A fish-shell package to automatically receive notifications when long processes finish.
MIT License
766 stars 70 forks source link

Kitty specific is_process_window_focused impl. #141

Closed jinliu closed 8 months ago

jinliu commented 8 months ago

This uses Kitty's remote control protocol to get the window state, so it works under Wayland.

The user can enable it by setting __done_kitty_remote_control=1 and enable allow_remote_control in kitty.conf.

Compared to the default implementation, it will send a notification when the window is focused, but the current tab is not. If this is desired, the user may want to enable this on Kitty+X11, too.

franciscolourenco commented 8 months ago

What happens when the Kitty window is not focused at all?

jinliu commented 8 months ago

A notification will be sent, too. Sorry I didn't make that clear. It uses Kitty's tab.is_focused state, which is only true when the window is focused and the tab is active.