Skip to content

Instantly share code, notes, and snippets.

@jandrewthompson
Created May 3, 2013 17:49
Show Gist options
  • Save jandrewthompson/5511936 to your computer and use it in GitHub Desktop.
Save jandrewthompson/5511936 to your computer and use it in GitHub Desktop.
Notify me to start journaling. Open my journal if its not already open. Otherwise, send it to foreground.
#!/bin/bash
JPID=`pgrep -f journal.wiki`
#Send an alert
kdialog --title "JOURNAL" --passivepopup "Write in your journal!"
if [ -z $JPID ]
then
/usr/bin/gvim ~/Dropbox/vimwiki/journal.wiki &
else
wmctrl -a journal.wiki; #Raise the window
echo "Already running: $JPID";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment