Permalink
Browse files

update quickup for newer osx terminal-notifier

  • Loading branch information...
jmoiron committed Sep 19, 2017
1 parent ee85a32 commit f00e9535e762ddcb237da3ee291e7ca0c2fdb2ab
Showing with 6 additions and 8 deletions.
  1. +1 −3 home/.bashrc
  2. +1 −1 home/.bashrc.osx
  3. +4 −4 home/.local/bin/quickup
@@ -215,9 +215,7 @@ pathclean() {
export PATH="$(printf "%s" "${PATH}" | /usr/bin/awk -v RS=: -v ORS=: '!($0 in a) {a[$0]; print}')"
}

eval "$(gimme 1.8.1)"

export GOPATH=$HOME/dev/go
eval "$(gimme 1.8.3)"
export PATH=$GOPATH/bin:$PATH
pathclean

@@ -9,7 +9,7 @@ if [ -n `which gdircolors` ]; then
eval "`gdircolors -b $DIR_COLORS`"
fi
if [ -n `which gls` ]; then
alias ls="gls -F --color=auto"
alias ls="gls -NF --color=auto"
fi

alias gvim="/Applications/MacVim.app/Contents/bin/mvim"
@@ -67,13 +67,13 @@ def base36(number):
return convert(num, dd) + dd[rem]
return convert(number)

def notify(message):
def notify(message, url=None):
if not enable_notifications:
return
if OS == 'Darwin':
# call terminal-notifier; use the terminal -sender because some
# versions don't work without it
subprocess.call(['terminal-notifier', '-open', 'quickup', '-message',
subprocess.call(['terminal-notifier', '-open', url, '-message',
message, '-sender', 'com.apple.Terminal'])
else:
if not pynotify.init("quickup"):
@@ -112,9 +112,9 @@ def main():
if not p.returncode:
copy(remote_url)
print "Uploaded %s to %s" % (local_name, remote_url)
notify("Uploaded %s to %s" % (local_name, remote_url))
notify("Uploaded %s to %s" % (local_name, remote_url), url=remote_url)
else:
notify("Something went wrong uploading %s to %s" % (local_name, remote_dest))
notify("Something went wrong uploading %s to %s" % (local_name, remote_dest), url=remote_url)

if __name__ == '__main__':
main()

0 comments on commit f00e953

Please sign in to comment.