- terminal-notifier (gem install terminal-notifier)
- envoy and terminal notifier wrapper (pip install envoy pync)
Last active
December 20, 2015 22:08
-
-
Save myoffe/6202354 to your computer and use it in GitHub Desktop.
Send OSX notifications during the day to remind you how much your branch is lagging behind master.
WIP: doesn't work. Trying to migrate to launchd plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
curbranch = rev-parse --abbrev-ref HEAD | |
offset = !git log $(git curbranch)..master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from pync import Notifier | |
import envoy | |
cmd = envoy.run('git offset | wc -l') | |
commits_behind = int(cmd.std_out) | |
if (commits_behind > 0): | |
branch = envoy.run('git curbranch').std_out | |
Notifier.notify('%s is behind master by %s commits.' % (branch, commits_behind), title='git') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sun-Thu, at 10am, 2pm and 6pm. | |
# Assumes "code" will get you to your working copy | |
* 10,14,18 * * 0,1,2,3,4 code && python ~/Scripts/behind-master-notify.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment