Skip to content

Commit 4449e7c

Browse files
authored
Update README.md
1 parent 90ece2a commit 4449e7c

File tree

1 file changed

+12
-28
lines changed

1 file changed

+12
-28
lines changed

README.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# OrgModeClockingXBar
1+
<h1>OrgModeClockingXBar</h1>
2+
23
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
34
**Table of Contents**
45

5-
- [OrgModeClockingXBar](#orgmodeclockingxbar)
66
- [Setup for Emacs](#setup-for-emacs)
7-
- [Xbar](#xbar)
8-
- [XBar](#xbar)
7+
- [xbar/BitBar](#xbarbitbar)
8+
- [Conky and other monitors](#conky-and-other-monitors)
99
- [Alternatives](#alternatives)
1010
- [Linux/Gnome](#linuxgnome)
1111
- [Tips](#tips)
@@ -22,54 +22,38 @@ The code is not perfect, if you quit your Emacs, without clocking-out the conten
2222

2323
I have been using this for 2 years, and it's pretty robust. I didn't have time to share it before.
2424

25-
Can also be easily used with [Conky](https://github.com/brndnmtthws/conky), or anyother system monitor if you can `cat ~/.OrgModeClockingXBar.txt`)
2625

2726
[Reddit discussion](https://www.reddit.com/r/orgmode/comments/ytdsho/orgmodeclockingxbar_see_a_task_when_you_clock_in/)
2827

2928
# Setup for Emacs
3029

3130
Setup the code for Emacs, add this line to your `~/.emacs.el`, in my case:
3231

33-
(load-file "/Users/magnus/workspace/OrgModeClockingXBar/OrgModeClockingXBar.el")
32+
```emacs-lisp
33+
(load-file "/Users/magnus/workspace/OrgModeClockingXBar/OrgModeClockingXBar.el")
34+
```
3435

3536
# xbar/BitBar
3637
Install https://xbarapp.com .
3738

3839
Put into `OrgModeClockingXBar.1s.sh` `~/Library/Application Support/xbar/plugins`, you can also Open Plugin folder:
3940

40-
![sc 2022-11-12 at 18 41 48](https://user-images.githubusercontent.com/118740/201487364-c498bc2d-4d90-45d3-bc28-25b68227e3cc.jpg)
41-
42-
(change the path for `OrgModeClockingXBar.py` in `OrgModeClockingXBar.1s.sh`, in my case this is:
43-
41+
<img style="width:200px" src="https://user-images.githubusercontent.com/118740/201487364-c498bc2d-4d90-45d3-bc28-25b68227e3cc.jpg">
4442

4543
cat ~/.OrgModeClockingXBar.txt
4644
# or via python script to do more processing
4745
# python /Users/magnus/workspace/OrgModeClockingXBar/OrgModeClockingXBar.py
46+
# ^ change the path for `OrgModeClockingXBar.py` in `OrgModeClockingXBar.1s.sh`
47+
48+
# Conky and other monitors
49+
Can also be easily used with [Conky](https://github.com/brndnmtthws/conky), or anyother system monitor if you can `cat ~/.OrgModeClockingXBar.txt`.
4850

4951
# Alternatives
5052
(not tested by @mmagnus)
5153

5254
## Linux/Gnome
5355
Thanks for reddit to like to this https://github.com/freddez/gnome-shell-simple-message with the code for Emacs as well (see below). See also https://extensions.gnome.org/extension/5018/simple-message/
5456

55-
```emacs-lisp
56-
(defun current-task-to-status ()
57-
(interactive)
58-
(if (fboundp 'org-clocking-p)
59-
(if (org-clocking-p)
60-
(call-process "dconf" nil nil nil "write"
61-
"/org/gnome/shell/extensions/simple-message/message"
62-
(concat "'" (org-clock-get-clock-string) "'"))
63-
(call-process "dconf" nil nil nil "write"
64-
"/org/gnome/shell/extensions/simple-message/message"
65-
"'No active clock'"))))
66-
(run-with-timer 0 60 'current-task-to-status)
67-
(add-hook 'org-clock-in-hook 'current-task-to-status)
68-
(add-hook 'org-clock-out-hook 'current-task-to-status)
69-
(add-hook 'org-clock-cancel-hook 'current-task-to-status)
70-
(add-hook 'org-clock-goto-hook 'current-task-to-status)
71-
```
72-
7357
# Tips
7458

7559
There is a Python script that can be added to XBar to process `~/.OrgModeClockingXBar.txt` to do even more.

0 commit comments

Comments
 (0)