Open jml opened 11 years ago
Just want to note that there is a solution for zsh in this project: https://github.com/ihashacks/notifyosd.zsh
Am I missing something? I added the following to my .zshrc, and sleep 11
gave me a notification. So it seems to work already.
source /usr/share/undistract-me/long-running.bash;notify_when_long_running_commands_finish_install
Hi!
The idea is install and forget like it's possible with Bash. I installed the package from Ubuntu and started to work, but there is no plug and play option on Zsh.
Marcos Alano Linux System Administrator marcoshalano@gmail.com
On Fri, Feb 8, 2019, 16:05 Philipp A. <notifications@github.com wrote:
Am I missing something? I added the following to my .zshrc, and sleep 11 gave me a notification. So it seems to work already.
source /usr/share/undistract-me/long-running.bash;notify_when_long_running_commands_finish_install
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jml/undistract-me/issues/12#issuecomment-461892675, or mute the thread https://github.com/notifications/unsubscribe-auth/AFvvRwCjmPlp3Qxi6ILWkpccjn_R_r3uks5vLbyGgaJpZM4AilNg .
I see! so the autoactivation part is what isn’t working yet for zsh.
I'm running into the following with zsh (after adding source /usr/share/undistract-me/long-running.bash;notify_when_long_running_commands_finish_install
to my .zshrc
)
$ sleep 15
preexec:printf:2: %(: invalid directive
Just to follow up on this...
If you replace printf "%(%s)T
with printf "$(date +'%s')"
then it works also in zsh.
If you are like me just switched into zsh and ran into this, as matawed said, for now
sudo sed -i 's/printf "%(%s)T/printf "$(date +\'%s\')"/' /usr/share/undistract-me/long-running.bash
should fix the issue. It might get overwritten if the package updates though.
I made a fork-of-a-fork of undistract-me for zsh that can be installed with zplug: https://github.com/sztomi/undistract-me-zsh
Lots of people want undistract-me to work in zsh.
I'm not 100% convinced that it's a great idea to bundle such support together with the bash code, but not fully convinced the other way either. Leaving this ticket open as a way of documenting the facnt.