Skip to content

Instantly share code, notes, and snippets.

View tmpbeing's full-sized avatar

Marc Planelles tmpbeing

  • Paris, France
  • 22:26 (UTC +02:00)
View GitHub Profile
@tmpbeing
tmpbeing / emacs-config.el
Created September 13, 2019 10:17
My script to display and control org-pomodoro from polybar as seen on my blog.
(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 February 8, 2021 06:11
My script to display org-pomodoro status in polybar. This is outdated. See https://gist.github.com/tmpbeing/57f04c0ed210fac1115def3f81532846 instead.
#!/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"