ex_unit_notifier
ex_unit_notifier copied to clipboard
tmux notifier overwrites user's tmux confg
To perform a notification, TmuxNotifier manually alters the user's tmux configuration value "window-status-style" with a fixed value of red or green. This is not raising an alert of any kind, it is manually changing the user's configuration. It causes several issues:
- Most obviously, if the user's config already uses red or green in their status bar, the notification is either not visible or incorrect.
- There is no way for the user to clear the notification other than killing the window or manually reconfiguring the value. (Tmux alerts are by default cleared by activating the window.)
- It's surprising to developers, because tmux already has several configurable notification mechanisms.
- It doesn't work with other terminal handlers, e.g. GNUscreen
- It doesn't work over SSH or other environments where TMUX_PANE isn't propagated.
The tmux notifier doesn't seem necessary at all. ExUnit already provides an exit code for success or failure, and it is trivial to cause a terminal bell for failure (e.g. mix test || echo -e \\a) which is already handled as a notification by tmux and other systems.
Simply removing the tmux notifier fixes all the above issues.