Skip to content

Instantly share code, notes, and snippets.

View jason-neal's full-sized avatar
👨‍💻

Jason Neal jason-neal

👨‍💻
  • NZ
View GitHub Profile
@jason-neal
jason-neal / git-updater
Last active May 2, 2018 10:17 — forked from adilbaig/git-updater
A bash script to update your git repos in the background. It also pops up a user notification when a repo is synced
#!/bin/bash
# This is required for `notify-send` to work from within a cron.
# For Ubuntu
# http://askubuntu.com/questions/298608/notify-send-doesnt-work-from-crontab/346580#346580
# eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)";
# For Fedora
export DISPLAY=:0.0
export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME session)/environ)