Skip to content

Commit

Permalink
Merge pull request #141 from jinliu/kitty-remote-control
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscolourenco authored Oct 23, 2023
2 parents 9e42d1d + db5523d commit e13bb0b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
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

0 comments on commit e13bb0b

Please sign in to comment.