This file contains hidden or 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
#!/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" |
This file contains hidden or 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
(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)) |