Skip to content

Instantly share code, notes, and snippets.

@psamim
Created February 29, 2016 07:27
Show Gist options
  • Save psamim/20b8f0a90389f526d003 to your computer and use it in GitHub Desktop.
Save psamim/20b8f0a90389f526d003 to your computer and use it in GitHub Desktop.
#!/bin/sh
elisp=$(cat <<'END_HEREDOC'
(concat
(if (org-clock-is-active) (org-clock-get-clock-string) "")
" "
(when (org-pomodoro-active-p)
(format
(propertize org-pomodoro-format 'face 'org-pomodoro-mode-line)
(org-pomodoro-format-seconds))))
END_HEREDOC
)
if [[ -z $(pidof emacs) ]]
then
echo ""
else
emacsclient --eval "$elisp" \
| grep -s -o "\".*\"" | sed 's/\"//g' | sed 's/^ //g' | sed 's/ $//g' | sed 's/\[//g' | sed 's/\]//g'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment