Skip to content

Instantly share code, notes, and snippets.

@ShawnMilo

ShawnMilo/whatsup.sh Secret

Created Jan 17, 2018
Embed
What would you like to do?
#!/bin/bash
STAMP=$(date "+%Y-%m")
SEP="--------------------------------------------------------------------------------"
FILE="/home/shawn/Documents/time_tracking/$STAMP"
# only have one copy open
if [ "$(pgrep -f $FILE)" ]; then
exit
fi
#preferred format for date stamp
STAMP=$(date "+%Y-%m-%d %H:%M:%S (%A)")
printf "\n$SEP\n$STAMP\n\n" >> $FILE
DISPLAY=:0 mousepad $FILE &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment