summaryrefslogtreecommitdiff
path: root/README
blob: 512d5fbe2e137ff80847d3942ae2091a0fcbf0c5 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
-*- mode: org -*-

* About

  =Emacs-Redshift= (aka =redshift.el=) provides an Emacs interface to
  [[https://github.com/jonls/redshift][Redshift]] for changing display
  color temperature.

* Installation

  Emacs-Redshift can be used from a Git checkout and can be installed
  using Guix.

** Git checkout

   Clone a Git repository:

   #+BEGIN_SRC sh
     git clone https://github.com/wigust/emacs-redshift
   #+END_SRC

   Add it to Emacs =load-path= in your init file and load:

   #+BEGIN_SRC emacs-lisp
     (add-to-list 'load-path (expand-file-name "~/emacs-redshift"))
     (require 'redshift)
   #+END_SRC

** Guix

   Clone a Git repository:

   #+BEGIN_SRC sh
     git clone https://github.com/wigust/emacs-redshift
     cd emacs-redshift
   #+END_SRC

   Install a Guix package with:

   #+BEGIN_SRC sh
     guix package -f guix.scm
   #+END_SRC

* Usage

  Call =M-x redshift-set-temp= to set a display temperature.

  Call =M-x redshift-increase-temp= to increase a display temperature.

  Call =M-x redshift-decrease-temp= to decrease a display temperature.

  To change increment for =redshift-increase-temp= and
  =redshift-decrease-temp= set =redshift-temp-increment= to a number.

  #+BEGIN_SRC emacs-lisp
    (setq redshift-temp-increment 100)
  #+END_SRC

* Keys

  You could use [[https://github.com/abo-abo/hydra][Hydra]] to get an
  interactive interface:

  #+BEGIN_SRC emacs-lisp
    (defhydra hydra-redshift () "redshift"
        ("g" redshift-set-temp "set")
        ("n" redshift-decrease-temp "decrease")
        ("p" redshift-increase-temp "increase"))
  #+END_SRC