Make this more elegant

This commit is contained in:
Jeremy Dormitzer 2019-02-06 19:14:56 -05:00
parent d4bb4e09ae
commit b309892571

View File

@ -1835,20 +1835,19 @@ Add a w3m filter to handle the code block delimiters:
It needs a helper script to work properly.
#+BEGIN_SRC emacs-lisp
(defvar wakatime-path
(setq wakatime-path
(if (file-exists-p "/usr/local/bin/wakatime")
"/usr/local/bin/wakatime"
"/usr/local/bin/wakatime"
(when (file-exists-p "/usr/bin/wakatime")
"/usr/bin/wakatime")))
"/usr/bin/wakatime")))
(when wakatime-path
(let ((wakatime-key (password-store-get "wakatime-api-key")))
(use-package wakatime-mode
:init
(setq wakatime-api-key wakatime-key
wakatime-cli-path wakatime-path)
:config
(global-wakatime-mode))))
(use-package wakatime-mode
:if wakatime-path
:init
(setq wakatime-api-key (password-store-get "wakatime-api-key")
wakatime-cli-path wakatime-path)
:config
(global-wakatime-mode))
#+END_SRC
* Elfeed