Created
May 3, 2013 17:49
-
-
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.
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
#!/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