mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-06-14 12:21:20 +00:00
Moved this, added aux function to specify time
This commit is contained in:
parent
1126cc266d
commit
434ea9c8ea
1 changed files with 13 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
;;; ringer.el --- This is my system interrupt -*- lexical-binding: t -*-
|
||||
;;; system-clock.el --- This is my system interrupt -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2020 Benson Chu
|
||||
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
(defvar current-system-clock nil)
|
||||
|
||||
(defvar system-clock-time 60)
|
||||
(defvar system-clock-time 5)
|
||||
|
||||
(define-minor-mode system-clock-mode
|
||||
nil nil nil nil
|
||||
|
|
@ -36,5 +36,14 @@
|
|||
(t
|
||||
(cancel-timer current-system-clock))))
|
||||
|
||||
(provide 'ringer)
|
||||
;;; ringer.el ends here
|
||||
(defun activate-system-clock (seconds)
|
||||
(interactive "p")
|
||||
(when system-clock-mode
|
||||
(system-clock-mode nil))
|
||||
(setq system-clock-time seconds)
|
||||
(system-clock-mode))
|
||||
|
||||
(define-key *root-map* (kbd "S") #'activate-system-clock)
|
||||
|
||||
(provide 'system-clock)
|
||||
;;; system-clock.el ends here
|
||||
Loading…
Reference in a new issue