spacemacs/layers/+web-services/wakatime/README.org

83 lines
2.4 KiB
Org Mode
Raw Normal View History

#+TITLE: Wakatime layer
2015-07-24 01:38:52 +00:00
2019-05-02 21:49:30 +00:00
#+TAGS: layer|web service
2015-07-24 01:38:52 +00:00
[[file:img/wakatime.png]]
2019-05-07 20:05:06 +00:00
* Table of Contents :TOC_5_gh:noexport:
2017-05-22 14:16:12 +00:00
- [[#description][Description]]
- [[#features][Features:]]
2017-05-22 14:16:12 +00:00
- [[#install][Install]]
- [[#wakatime-program][Wakatime Program]]
- [[#layer][Layer]]
- [[#api-keys][API Keys]]
- [[#note-to-venv-workon-users][Note to =venv-workon= users:]]
2015-07-24 01:38:52 +00:00
* Description
This layer adds support for Wakatime.
WakaTime was built to solve time tracking for programmers.
Since we work inside a text editor, why should we have to start and stop a
timer? WakaTime uses open-source text editor plugins to automatically track the
time you spend programming so you never have to manually track it again!
P.S. wakati means time in Swahili
** Features:
- Integration with Wakatime cloud based time tracking service
2015-07-24 01:38:52 +00:00
* Install
** Wakatime Program
You can follow wakatime installation instructions here
2018-09-19 03:54:47 +00:00
[[https://github.com/wakatime/wakatime-mode]].
2015-07-24 01:38:52 +00:00
In short it's just:
2018-07-10 10:57:25 +00:00
2015-07-24 01:38:52 +00:00
#+BEGIN_SRC sh
2018-09-19 03:54:47 +00:00
pip install wakatime
2015-07-24 01:38:52 +00:00
#+END_SRC
And for some linux users
2018-07-10 10:57:25 +00:00
2015-07-24 01:38:52 +00:00
#+BEGIN_SRC sh
2018-09-19 03:54:47 +00:00
sudo pip install wakatime
2015-07-24 01:38:52 +00:00
#+END_SRC
** Layer
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =wakatime= to the existing =dotspacemacs-configuration-layers= list in this
file.
2015-07-24 01:38:52 +00:00
Example:
2018-07-10 10:57:25 +00:00
2015-07-24 01:38:52 +00:00
#+BEGIN_SRC emacs-lisp
2015-10-13 13:57:59 +00:00
(setq-default dotspacemacs-configuration-layers
'(
;; ...
(wakatime :variables
wakatime-api-key "your-api-key"
;; use the actual wakatime path
wakatime-cli-path "/usr/bin/wakatime")
;; ...
))
2015-07-24 01:38:52 +00:00
#+END_SRC
** API Keys
After this go to your wakatime account and have your API key handy
2018-09-19 03:54:47 +00:00
[[https://wakatime.com/settings/account?apikey=true]].
2015-07-24 01:38:52 +00:00
Restart emacs and it will prompt you for the location of the wakatime installer
(just put in whatever =which wakatime= gives you in the terminal e.g.
=/usr/bin/wakatime= for example) and that's it.
2015-07-24 01:38:52 +00:00
*** Note to =venv-workon= users:
Right now wakatime uses =python= as python bin executable, so if you use
=venv-workon= because you have python projects which need to have a virtual
env., then wakatime, which is installed system-wide will have trouble locating
wakatime files, so it's best to define by yourself the python path where
wakatime can always find it's stuff, via this variable:
2015-07-24 01:38:52 +00:00
#+BEGIN_SRC emacs-lisp
2018-09-19 03:54:47 +00:00
(setq wakatime-python-bin "/path/to/python")
2015-07-24 01:38:52 +00:00
#+END_SRC