Compare commits

..

No commits in common. "612c0d1e31b72b3751e700229e1974ad0f440d41" and "dc3a934d622ad590490c126e29e47e0bc257378c" have entirely different histories.

2 changed files with 4 additions and 26 deletions

View File

@ -10,27 +10,6 @@ You can set the file to be written by customizing `org-clock-waybar-filename`; i
`$XDG_CACHE_HOME/waybar-current-task.json` (`$XDG_CACHE_HOME` defaults to `$HOME/.cache` on XDG
compatible systems, like Linux.)
### Quelpa
If you only have [`quelpa`](https://github.com/quelpa/quelpa) installed:
```elisp
(quelpa
'(org-clock-waybar
:fetcher git
:url "https://gitea.polonkai.eu/gergely/org-clock-waybar.git"))
```
or, if you have [`quelpa-use-package`](https://github.com/quelpa/quelpa-use-package) installed,
too:
```elisp
(quelpa-use-package org-clock-waybar
:quelpa (org-clock-waybar
:fetcher git
:url "https://gitea.polonkai.eu/gergely/org-clock-waybar.git"))
```
## Waybar configuration
To add the current task to Waybar, add this snippet to your config:

View File

@ -1,4 +1,4 @@
;;; org-clock-waybar.el --- Summary
;;; org-clock-waybar --- Summary
;; Copyright (C) 2021 Gergely Polonkai
@ -84,9 +84,9 @@
(defun org-clock-waybar--get-tags ()
"Get the tags of the currently clocked-in task."
(when (org-clocking-p)
(or (org-with-point-at org-clock-marker (org-get-tags))
"")
))
(save-window-excursion
(org-clock-goto)
(org-get-tags))))
(defun org-clock-waybar--get-clocked-task-json ()
"Get the currently clocked-in tasks data as a stringified JSON object.
@ -129,7 +129,6 @@ emacsclient --eval '(org-clock-waybar-output-task)'"
It adds `org-clock-waybar-save-task' to both `org-clock-in-hook' and
`org-clock-out-hook'."
(add-hook 'org-clock-cancel-hook #'org-clock-waybar-save-task)
(add-hook 'org-clock-in-hook #'org-clock-waybar-save-task)
(add-hook 'org-clock-out-hook #'org-clock-waybar-save-task)
(add-hook 'kill-emacs-hook #'org-clock-waybar-save-task))