mirror of https://github.com/Flinner/dots.git
feat(emacs+polybar): add org clock :D
This commit is contained in:
parent
298851f455
commit
04a7755cb9
|
@ -2159,6 +2159,25 @@ ivy bibtex
|
||||||
(keyfreq-autosave-mode 1))
|
(keyfreq-autosave-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Polybar
|
||||||
|
*** org clock
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun my/polybar/org-clock ()
|
||||||
|
"Gets polybar formatted message"
|
||||||
|
(let ((message nil)
|
||||||
|
(icon nil)
|
||||||
|
(icon-color nil))
|
||||||
|
(if (org-clock-is-active)
|
||||||
|
(setq message (substring-no-properties (org-clock-get-clock-string))
|
||||||
|
icon ""
|
||||||
|
icon-color "#BA68C8")
|
||||||
|
(setq message ""
|
||||||
|
icon ""
|
||||||
|
icon-color "#FDD835"))
|
||||||
|
(concat "%{F" icon-color "}" icon "%{F-}" message)))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Elfeed org
|
* Elfeed org
|
||||||
=;; (setq rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org"))=
|
=;; (setq rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org"))=
|
||||||
** Elfeed-org
|
** Elfeed-org
|
||||||
|
|
|
@ -144,7 +144,7 @@ font-1 = "waffle:size=10;3"
|
||||||
;modules-right = color-switch sep mail sep network sep keyboard battery volume backlight sep sysmenu try
|
;modules-right = color-switch sep mail sep network sep keyboard battery volume backlight sep sysmenu try
|
||||||
#modules-right = color-switch sep network sep keyboard battery volume backlight sep sysmenu try
|
#modules-right = color-switch sep network sep keyboard battery volume backlight sep sysmenu try
|
||||||
|
|
||||||
modules-left = launcher sep workspaces sep memory_bar cpu_bar sep temperature sep title
|
modules-left = launcher sep workspaces sep memory_bar cpu_bar sep temperature sep org-clock
|
||||||
modules-center = date sep mu4e_edu mu4e ssh keepassxc
|
modules-center = date sep mu4e_edu mu4e ssh keepassxc
|
||||||
modules-right = color-switch sep network sep keyboard sep volume brightness sep filesystem_bar sep battery sep sysmenu tray
|
modules-right = color-switch sep network sep keyboard sep volume brightness sep filesystem_bar sep battery sep sysmenu tray
|
||||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||||
|
|
|
@ -72,6 +72,35 @@ label-padding = 1
|
||||||
format-prefix = ""
|
format-prefix = ""
|
||||||
format-prefix-foreground = ${color.green}
|
format-prefix-foreground = ${color.green}
|
||||||
|
|
||||||
|
[module/org-clock]
|
||||||
|
type = custom/script
|
||||||
|
|
||||||
|
## At time of writing:
|
||||||
|
# (defun my/polybar/org-clock ()
|
||||||
|
# "Gets polybar formatted message"
|
||||||
|
# (let ((message nil)
|
||||||
|
# (icon nil)
|
||||||
|
# (icon-color nil))
|
||||||
|
# (if (org-clock-is-active)
|
||||||
|
# (setq message (substring-no-properties (org-clock-get-clock-string))
|
||||||
|
# icon ""
|
||||||
|
# icon-color "#BA68C8")
|
||||||
|
# (setq message ""
|
||||||
|
# icon ""
|
||||||
|
# icon-color "#FDD835"))
|
||||||
|
# (concat "%{F" icon-color "}" icon "%{F-}" message)))
|
||||||
|
|
||||||
|
|
||||||
|
exec = emacsclient --eval '(my/polybar/org-clock)' | sed 's/"//g'
|
||||||
|
|
||||||
|
|
||||||
|
interval = 5
|
||||||
|
|
||||||
|
format = <label>
|
||||||
|
label-padding = 1
|
||||||
|
format-prefix = ""
|
||||||
|
format-prefix-foreground = ${color.purple}
|
||||||
|
|
||||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||||
|
|
||||||
[module/updates]
|
[module/updates]
|
||||||
|
|
Loading…
Reference in New Issue