Add alarm feature for org-clock, there are mainly three goals for this package:
-
record work time in order to analysis latter on
-
alarm you to take a rest before you are worn out
-
balance your time on projects
added by org-clock-watch:
-
if system not idle and you forgot to clock in or set effort then alarm you to set them
-
if system idle over threshold, then stop alarm until you are back
-
if over effort threshold, then periodically notify you to take a rest by sound and pop up window
-
if you need more time to work, just click the button "5 min" on pop up window, it will postpone the alarm
org-clock already have:
-
analysis time distribution spend on projects
-
interactively resolve clock in time if system idle over threshold
-
show current alarm and time in mode line
-
use quelpa to install, you only need to eval below code in emacs, see details on quelpa repo
gitee:
(quelpa
(org-clock-watch :fetcher git :url "https://gitee.com/zongtao_wang/org-clock-watch.git" :branch "master" :files (:defaults "resources")))`github:
(quelpa
(org-clock-watch :fetcher git :url "https://github.com/wztdream/org-clock-watch.git" :branch "master" :files (:defaults "resources")))` -
set your work plan file path, it should be an org file, org-clock-watch will open it and let you clock in some task in it
setq org-clock-watch-work-plan-file-path "/path/to/your/work/plan/org/file"
-
add below code in you init file to start the watcher
(org-clock-watch-toggle 'on)
-
use system idle time
If you want to use system idle time not emacs idle time, you need to install
xprintidle
.If you are using ubuntu, it is easy:
1. `sudo apt install xprintidle` 2. `M-x customize-varialbe org-clock-x11idle-program-name` and set it to xprintidle
For other system please check emacs manual
On computers using macOS, idleness is based on actual user idleness, not just Emacs’ idle time. For X11, you can install a utility program ‘x11idle.c’, available in the ‘contrib/scripts/’ directory of the Org Git distribution, or install the xprintidle package and set it to the variable org-clock-x11idle-program-name if you are running Debian, to get the same general treatment of idleness. On other systems, idle time refers to Emacs idle time only.
-
key binding
If you like hydra key, reference below setting:
(defhydra hydra-org-clock (:color pink :hint nil)
"
org-clock hydra key
clock ^^^^effort ^^watcher
-------------------------------^^^^^^^---------------------------------
[_i_] clock in [_c_] cancel [_e_] set effort [_t_] toggle
[_L_] clock last [_o_] clock out [_E_] reset effort [_s_] start
[_r_] resolve ^^^^[_S_] stop
[_g_] goto ^^^^[_w_] status
[_J_] jump2current ^^^^[_O_] open plan
[_q_] cancel
"
("i" org-clock-in)
("o" org-clock-out :exit t)
("r" org-resolve-clocks :exit t)
("g" org-clock-goto :exit t)
("J" spacemacs/org-clock-jump-to-current-clock :exit t)
("c" org-clock-cancel :exit t)
("L" org-clock-in-last)
("e" org-set-effort :exit t)
("E" org-clock-modify-effort-estimate :exit t)
("t" org-clock-watch-toggle :exit t)
("s" (org-clock-watch-toggle 'on) :exit t)
("S" (org-clock-watch-toggle 'off) :exit t)
("w" (org-clock-watch-status))
("O" org-clock-watch-goto-work-plan)
("q" nil :color blue))
(global-set-key (kbd "C-c .") 'hydra-org-clock/body)
-
open emacs
-
do things you like, not necessarily in emacs
-
forgot to clock in? org-clock-watch pop up notify window, play sound to alarm you, you can clock in by
org-clock-in
-
forgot to set effort? org-clock-watch popup window, play sound to alarm and focus to current clock in task, you can set effort by
org-set-effort
, org clock treat effort as overtime threshold -
of cause you can manually open work plan file and clock in and set effort, org-clock-watch can handle this scenario
-
if overtime, alarm you periodically until you clock out
org-clock-out
-
you need 5 more min to finish the work, click the button "5 min" on pop up window, the alarm will postpone 5 min
-
you can reset the effort by
org-clock-modify-effort-estimate
-
you walk way for a while, it will stop alarm until you came back, then org-clock may guide you to resolve the clock in time, reduce 10 min for example
-
one week latter, you want to see where is your time spend. Open work plan and run
org-clock-report
, there will be a report table shown up
So, you only need to run org-clock command, others are all auto
I think you can figure out how to use it by work flow and the hydra key, anyway here are the main commands:
-
start clock in.
org-clock-in
-
set over time threshold.
org-set-effort
-
stop clock.
org-clock-out
-
reset over time threshold.
org-clock-modify-effort-estimate
-
check org-clock-watch status.
org-clock-watch-status
-
close org-clock-watch.
C-u C-u org-clock-watch-toggle
-
open org-clock-watch.
C-u org-clock-watch-toggle
-
toggle org-clock-watch.
org-clock-watch-toggle
-
open work plan file.
org-clock-watch-goto-work-plan
you can customize the icon, sound and alarm interval by M-x custom-group org-clock-watch
-
keep it simple for simple task
-
org-clock is powerful, org-clock-watch only watch it, so you can use all the features of org-clock
Enjoy it!