franciscolourenco / done

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

Improve tmux logic #61

Closed ammgws closed 4 years ago

ammgws commented 4 years ago

Current behaviour:

New behaviour:

Bug-fix:

franciscolourenco commented 4 years ago

I'm not using tmux at the moment, so will defer this to you @ammgws. Have you been using this on a daily basis? What happens when you are detached from a tmux session on a remote server?

ammgws commented 4 years ago

If I SSH into my machine where fish and done are installed, and run a long running task in a tmux session and detach, nothing happens because both of the checks below fail:

 # verify that the system has graphical capabilities before initializing
 if test -z "$SSH_CLIENT"  # not over ssh
 and count (__done_get_focused_window_id) > /dev/null  # is able to get window id

AFAIK this is by design. Were you thinking about adding an exception for detached tmux sessions that were started remotely?

franciscolourenco commented 4 years ago

No, it sounds good. Merging, thanks for the improvements!