Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background notifications on long-running commands #3301

Merged
merged 7 commits into from
Feb 22, 2015

Conversation

t413
Copy link
Contributor

@t413 t413 commented Nov 8, 2014

Get background notifications for long running commands! Running a build? A deploy? Moving files? Anything that takes more than 6 seconds (easily configurable) sends you a slick and unobtrusive system notification:

screenshot 2014-11-08 14 15 12

It works with osx notification center (using terminal-notifier), ubuntu's native notify-send, and cygwin:

Linux
screenshot from 2014-11-07 15 58 36

Windows
screenshot from 2014-11-07 15 55 00

It supports having a custom message hook (in case you need it to say 'holy smokes batman' for example).

There are a few hacks to do the same thing-- often making heavy use of AppleScript and being very platform-spesefic. This plugin makes a point to run on all three major platforms.

@t413 t413 changed the title Add background notification plugin (cross platform) Background notifications on long-running commands Dec 8, 2014
@t413
Copy link
Contributor Author

t413 commented Dec 8, 2014

Having this has been a huge productivity boost for me-- I'd love to see it more well used and easily enabled.

Similar scripts have cropped up but have been very platform specific. When I started running ubuntu desktop regularly this was the first thing I missed. Adding it as an oh-my-zsh plugin seems perfectly in-line with the project and I spent the time to build and test it to work with as many platforms as possible.

Any feedback on the code, documentation, and/or functionality?

@mcornella
Copy link
Member

@t413 thank you for this very well-crafted PR. Do you have a notion of another program that works on non-Unity Linux setups?

@t413
Copy link
Contributor Author

t413 commented Feb 22, 2015

Thanks! Researching notify-send on linux shows that it's actually a relatively standard utility. Here's the Arch linux wiki page on the topic. Are you running a particular setup you'd like me to test against?

@mcornella
Copy link
Member

Thanks! Researching notify-send on linux shows that it's actually a relatively standard utility. Here's the Arch linux wiki page on the topic. Are you running a particular setup you'd like me to test against?

Thank you for that initial push. I actually looked it up a little bit and found this post that got me in the right direction. TL;DR: on Debian you need to install libnotify-bin, as well as in Ubuntu (in which it's actually installed by default). It looks a little different on gnome-shell though:

Debian with Gnome 3

@robbyrussell robbyrussell added Feature New feature or request Area: plugin Issue or PR related to a plugin labels Feb 22, 2015
robbyrussell added a commit that referenced this pull request Feb 22, 2015
Background notifications on long-running commands
@robbyrussell robbyrussell merged commit 78cfe75 into ohmyzsh:master Feb 22, 2015
@robbyrussell
Copy link
Member

This looks really cool!

@aL3xa
Copy link

aL3xa commented Mar 27, 2015

+1 I kept smth like this in my custom plugins. Grabbed it from the reddit post. It's really cool that it made it to official plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants