Add :tools wakatime module

This commit is contained in:
Henrik Lissner 2018-06-07 18:33:00 +02:00
parent e918040e70
commit 70ce322e99
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,13 @@
;;; tools/wakatime/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(add-hook 'doom-after-switch-buffer-hook #'+wakatime-init)
;;;###autoload
(defun +wakatime-init ()
"Initialize wakatime (if `wakatime-api-key' is set, otherwise no-op with a
warning)."
(if wakatime-api-key
(global-wakatime-mode +1)
(message "No `wakatime-api-key' set! wakaktime-mode will stay disabled."))
(remove-hook 'doom-after-switch-buffer-hook #'+wakatime-init))