-
Notifications
You must be signed in to change notification settings - Fork 79
Home
You can make emacs show pomodoro count in your agenda clock report.
(setq org-agenda-clockreport-parameter-plist
'(:fileskip0 t :link t :maxlevel 2 :formula "$5=($3+$4)*(60/25);t"))
See: http://emacs.stackexchange.com/questions/12839/use-formula-in-agenda-clockreport-to-convert-time
To switch between tasks in the middle of a pomodoro, you can use org-clock-in
. The pomodoro will continue and org will add the time to the previous time and clock-out the new task.
You can add hooks to org-pomodoro to run external processes. This can be used to run external progress bars if you wish.
Add the following to your .emacs:
(add-hook 'org-pomodoro-finished-hook
(lambda ()
(interactive)
(call-process "yadKill")
(start-process-shell-command "yad Break timers command" nil "yadBreakTime")
))
(add-hook 'org-pomodoro-started-hook
(lambda ()
(interactive)
;Kill of old break timer window if it exist.
(call-process "yadKill")
(start-process-shell-command "yad Break timers command" nil "yadBottomProgressBar")
))
Now create three bash scripts and place them into your path:
yadBottomProgressBar
xpixels=$(xrandr --current | grep "Screen" | cut -d ',' -f2 | cut -d ' ' -f3) #grab total x of combined monitors.
xposOfYad=$(expr $xpixels / 2 - 154) #place in the middle of total space.
ypixels=$(xrandr --current | grep "Screen" | cut -d ',' -f2 | cut -d ' ' -f5)
yPosOfYad=$(expr $ypixels + 10)
echo $xposOfYad " " $yPosOfYad
yad --on-top --sticky --info --text="$*" --timeout=1500 --timeout-indicator=top --text-align=center --no-buttons --center --undecorated --geometry=50x5+$xposOfYad+$yPosOfYad
yadBreakTime
#!/bin/sh
xpixels=$(xrandr --current | grep "Screen" | cut -d ',' -f2 | cut -d ' ' -f3) #grab total x of combined monitors.
xposOfYad=$(expr $xpixels / 2 - 400) #place in the middle of total space.
yad --on-top --sticky --info --text="$*" --timeout=300 --timeout-indicator=bottom --text-align=center --no-buttons --center --undecorated --geometry=800x50+$xposOfYad+-5
yadKill
pkill yad
Now it'll open progress bars for when a pomodoro starts. the yadKill is useful if you start a pomodoro before finishing a break.
The break/progress bars can be closed by pressing escape on them.
For positioning, see the --geometry property and man pages. also inspect the xrandr output to customize to your needs.
Activating emacs
You may find that yad steals focus. In that case you can append some lines in the yad script to re-activate emacs with xdotool
sleep 0.1
xdotool search --onlyvisible --class emacs windowactivate