forked from gergely/org-clock-waybar
Compare commits
5 Commits
612c0d1e31
...
main
Author | SHA1 | Date | |
---|---|---|---|
857d193205 | |||
c327eb18c6 | |||
201135cc21 | |||
754fd9d2fa | |||
a144ee13c0 |
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'xdg)
|
(require 'xdg nil t)
|
||||||
(require 'json)
|
(require 'json)
|
||||||
(require 'org-clock)
|
(require 'org-clock)
|
||||||
|
|
||||||
@@ -47,7 +47,9 @@
|
|||||||
:group 'emacs)
|
:group 'emacs)
|
||||||
|
|
||||||
(defcustom org-clock-waybar-filename
|
(defcustom org-clock-waybar-filename
|
||||||
|
(if (fboundp 'xdg-cache-home)
|
||||||
(expand-file-name "waybar-current-task.json" (xdg-cache-home))
|
(expand-file-name "waybar-current-task.json" (xdg-cache-home))
|
||||||
|
(expand-file-name "~/.cache/waybar-current-task.json"))
|
||||||
"Name of the file to save task data to."
|
"Name of the file to save task data to."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'org-clock-waybar)
|
:group 'org-clock-waybar)
|
||||||
@@ -122,7 +124,11 @@ value of `org-clock-waybar-not-clocked-in-text'."
|
|||||||
This function is ought to be used via Emacsclient:
|
This function is ought to be used via Emacsclient:
|
||||||
|
|
||||||
emacsclient --eval '(org-clock-waybar-output-task)'"
|
emacsclient --eval '(org-clock-waybar-output-task)'"
|
||||||
(org-clock-waybar--get-clocked-task-json))
|
(let* ((output (org-clock-waybar--get-clocked-task-json))
|
||||||
|
(start 0)
|
||||||
|
(end (length output)))
|
||||||
|
(set-text-properties start end nil output)
|
||||||
|
output))
|
||||||
|
|
||||||
(defun org-clock-waybar-setup ()
|
(defun org-clock-waybar-setup ()
|
||||||
"Setup org-clock-waybar.
|
"Setup org-clock-waybar.
|
||||||
|
Reference in New Issue
Block a user