Files
dotfiles/dot_config/fish/functions/_iris_busy.fish
T

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