count down timer This code starts a count down timer every time org file is opened , but asks for a permission to reset timer every time . Can it be automated, meaning it should start counting as soon as org file is opened. Second, it should show a pop up when time is up. Can you please help
I can't help with the pop up but, in place of that, I suggest that you use a bell sound.
You should have a wav sound file for this and you could use a bell sound like org-pomodoro's.
C-h f org-timer-set-timer (org-timer-set-timer function help):
With two ‘C-u’ prefix arguments, use ‘org-timer-default-timer’ without prompting the user for a duration and automatically replace any running timer.
(let ((current-prefix-arg '(4))) ... ) emulates
(let ((current-prefix-arg '(16))) ... ) emulates
Putting the following in your init file should do the trick:
(setq org-clock-sound "/path/to/sound.wav") ; set `org-clock-sound' ;; set default org-timer to 10 minutes (for X minutes and Y seconds, use "X:Y") (setq org-timer-default-timer "10") (add-hook 'org-mode-hook (lambda () (interactive) (let ((current-prefix-arg '(16))) (call-interactively 'org-timer-set-timer))))
Don't forget to change
"/path/to/sound.wav" to the real path.
notify-send. also i'm curious: why u need a timer for org-files?