Skip to content
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

Kitty specific is_process_window_focused impl. #141

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,25 @@ set -U __done_notification_urgency_level_failure normal
```fish
set -U __done_allow_nongraphical 1
```

#### Notifications are unavailable under Wayland. However, if you are using Kitty, you can enable it by using Kitty's remote control.

You need to install jq (jqlang.github.io/jq).

In kitty.conf (change "kitty-rc-password" to your liking):

```conf
remote_control_password "kitty-rc-password" ls
allow_remote_control password
```

In fish

```fish
set -U __done_kitty_remote_control 1
set -U __done_kitty_remote_control_password "kitty-rc-password"
```

#### For Linux (except Ubuntu's Notify OSD), set the timeout in milliseconds at which to expire the notification. The default is "3000" (3 seconds). Set to "0" if you want it to never expire.

```fish
Expand Down
5 changes: 5 additions & 0 deletions conf.d/done.fish
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ function __done_is_process_window_focused
if set -q __done_allow_nongraphical
return 1
end

if set -q __done_kitty_remote_control
kitty @ --password="$__done_kitty_remote_control_password" ls | jq -e ".[].tabs.[] | select(any(.windows.[]; .is_self)) | .is_focused" > /dev/null
return $status
end

set __done_focused_window_id (__done_get_focused_window_id)
if test "$__done_sway_ignore_visible" -eq 1
Expand Down