Andy Kipp
Andy Kipp
This part around focus checking: https://github.com/jnoortheen/xontrib-cmd-durations/blob/c4101bb94ca54507e0af588963ea46424c10e090/xontrib/cmd_done.py#L119-L142 To have: ```xsh from xontrib.cmd_done.notify import notify_user_if_unfocused ```
It will be cool to have the functionality about detecting focus of the window as a library.
Can you repeat this on `xonsh --no-rc`? Can you repeat this on earlier xonsh version e.g. `pip install xonsh==0.16.0`?
I can't reproduce this on Ubuntu. You're testing on mac? ```xsh | on posix | True | | on linux | False | | on darwin | True | ```
Can you please repeat tests in `xonsh --no-rc -DXONSH_TRACE_SUBPROC=3`. Any difference between Oracle and CentOS?
I mean something like this: ```python CUSTOM_NOTIFIER = xsh.env.get("XONTRIB_CD_CUSTOM_NOTIFIER", None) if CUSTOM_NOTIFIER: sp.check_output(CUSTOM_NOTIFIER).decode().strip() else: from notifypy import Notify # ... ``` and: ```python $XONTRIB_CD_CUSTOM_NOTIFIER = ['/tmp/wsl-notify-send.exe', '--appId', '{title}', '-c', '{subtitle}',...
To have a way to support WSL until notifypy hasn't this feature (https://github.com/ms7m/notify-py/issues/45).
Looks good. Please take a look tests.
I think it's related to interactive/non-interactive mode. E.g. if you run xonsh in the script with shebang `#!/bin/bash` you will have non-interactive mode and xonsh's prompt toolkit will crash when...
May be [this comment](https://github.com/xonsh/xonsh/issues/5830#issue-2989665654) can help: > Using `uv tool install xonsh --with prompt-toolkit` then `uv tool run xonsh` does not produce this crash/exit behaviour, it works as expected.