Skip to content

Instantly share code, notes, and snippets.

Avatar

Marc Planelles tmpbeing

  • Extrality
  • Paris, France
View GitHub Profile
@tmpbeing
tmpbeing / emacs-config.el
Created Sep 13, 2019
My script to display and control org-pomodoro from polybar as seen on my blog.
View emacs-config.el
(defun +org-pomodoro/restart-last-pomodoro ()
"Starts a new pomodoro on the last clocked-in task. Resets the pomodoro count without prompt when necessary.
This is useful for external scripts as the org-pomodoro function has y-or-n prompts"
(when (and org-pomodoro-last-clock-in
org-pomodoro-expiry-time
(org-pomodoro-expires-p))
(setq org-pomodoro-count 0))
(setq org-pomodoro-last-clock-in (current-time))
@tmpbeing
tmpbeing / org-pomodoro.sh
Last active Feb 8, 2021
My script to display org-pomodoro status in polybar. This is outdated. See https://gist.github.com/tmpbeing/57f04c0ed210fac1115def3f81532846 instead.
View org-pomodoro.sh
#!/usr/bin/env bash
OUTPUT_STYLE_FILE="/tmp/pomodoro-polybar-output-style"
# If the file doesn't exist, default to SIMPLE output style
if test -e "$OUTPUT_STYLE_FILE"
then
OUTPUT_STYLE=$(cat "$OUTPUT_STYLE_FILE")
else
OUTPUT_STYLE="SIMPLE"