done
done copied to clipboard
Support for tab detection
Actually, it displays the notification when the window is not focused, which is great, but if you open a new tab and switch to it, then the notification won't display because it considers you're in the same windows (which is true lol)
Need to add a tab option
I'm on linux so it's probably this line to edit, but no idea how:
xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2
Maybe getting the tab title can work too?
PS: why is the main file in /conf.d/ ??
There might be limitations in terms of tab detection.
conf.d
is where you can add extra configuration files which get executed on setup.
https://github.com/fish-shell/fish-shell/blob/master/etc/config.fish#L2
Put system-wide fish configuration entries here
But it's a bunch of function, not a simple configuration file. Seems weird to me
For tab detection, I looked on google and found nobody who tried this yet... not very encouraging :P
@BarbzYHOOL This thread might give you some insight into conf.d
https://github.com/fisherman/done/issues/12
(sorry for offtopic)
In alternative why not define all the functions in conf.d/done.fish?
For the same reason you should not use alias in your config. If you put those functions in the snippet, then they will be eagerly loaded, completely missing the point of fish excellent lazy loading mechanism.
He said not to put all in conf.d (didn't read entire thread yet though), no?
His own plugin doesn't do it like this https://github.com/fisherman/fishtape
These 2 functions need to be eagerly loaded:
function __done_started --on-event fish_preexec
function __done_ended --on-event fish_prompt
It was not worthwhile to spread the other 3 functions in different files since the performance impact is negligible.
@BarbzYHOOL What is a "tab" in this case? Which window manager/desktop environment were you using?
What is a "tab" in this case? Which window manager/desktop environment were you using?
@ammgws
- Mac OS X 10.15
- iTerm2 3.2
I think it is possible for at least for iTerm2, here's how zsh-notify does that https://github.com/marzocchi/zsh-notify/blob/master/applescript/resources/is-iterm2-active.applescript