mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
16 lines
712 B
Fish
16 lines
712 B
Fish
function _iris_busy --description 'tell iris a key binding is running a program (start|stop)'
|
|
# iris (~/.config/iris) learns a command is running from fish_preexec /
|
|
# fish_postexec, which never fire for programs a key binding starts. Without
|
|
# this, iris keeps treating the screen as an idle prompt while tv, yazi or
|
|
# lazygit run: it swallows up/down/tab and can draw its menu over them.
|
|
# Same messages as iris's own hooks; a no-op outside iris.
|
|
set -q IRIS_FD; or return 0
|
|
switch "$argv[1]"
|
|
case start
|
|
printf 'IRIS_CMD_START\x00' >&$IRIS_FD 2>/dev/null
|
|
case stop
|
|
printf 'IRIS_CMD_STOP:0\x00' >&$IRIS_FD 2>/dev/null
|
|
end
|
|
return 0
|
|
end
|