Created
January 8, 2015 22:52
-
-
Save roman/42f4b2916c3760235cb5 to your computer and use it in GitHub Desktop.
Clocker's packages.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar clocker-packages | |
'(powerline | |
dash)) | |
(defface clocker/mode-line-clock-in-face | |
'((t (:foreground "white" :background "#F2686C" :inherit mode-line))) | |
"Clocker's face for CLOCK-IN mode-line message." | |
:group 'clocker) | |
(defun clocker/org-clocking-p () | |
(and (fboundp 'org-clocking-p) | |
(org-clocking-p))) | |
(defun clocker/add-clock-in-to-mode-line (lhs) | |
(let ((new-lhs | |
(if (not (clocker/org-clocking-p)) | |
(-insert-at 1 (powerline-raw "CLOCK-IN " | |
'clocker/mode-line-clock-in-face | |
'l) | |
lhs) | |
lhs))) | |
(setq ad-return-value new-lhs))) | |
(defun clocker/init-clocker () | |
(message "CALLING INIT CLOCKER!") | |
(use-package org | |
:config | |
(progn | |
(defadvice spacemacs/mode-line-prepare-left (around compile activate) | |
(clocker/add-clock-in-to-mode-line ad-do-it))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment