aboutsummaryrefslogtreecommitdiff
path: root/doom.d/modules/personal.org
blob: 61f2cfc5b970ca84d42dd1c2ab9575eeefa99162 (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
#+TITLE: Personal module

* Preclude
Personal functionality that aid my workflow or are just cool.
* Reload
#+BEGIN_SRC elisp
(defun oreodave/reload ()
  "Reload instance of doom"
  (interactive)
  (load-file (concat doom-private-dir "config.el")))
#+END_SRC
Reload the doom session by brute force fully loading the "config.el" file in the
doom private directory.
* Change theme
#+BEGIN_SRC elisp
(setq oreodave/themes/theme-list '(doom-solarized-dark doom-gruvbox doom-city-lights
                                                doom-outrun-electric doom-vibrant doom-molokai
                                                doom-solarized-light doom-acario-light))

(defun oreodave/themes/set-new-theme ()
  "Set the theme from my own selection, mutate as you see fit"
  (interactive)
  (ivy-read "Select theme: "
            oreodave/theme-list
            :caller 'oreodave/set-new-theme
            :action (lambda (x) ; Shamelessly copied from counsel in case of change
                      (condition-case nil
                          (progn
                            (mapc #'disable-theme custom-enabled-themes)
                            (load-theme (intern x) t)
                            (when (fboundp 'powerline-reset)
                              (powerline-reset)))
                        (error "Problem loading theme %s" x)))))
#+END_SRC
Allow user to set a theme from a limited set of candidates, based on
"oreodave/theme-list".

- Themes sanctioned by me:
  - doom-solarized-dark: just the right everything. best for day.
  - doom-gruvbox: good contrast, better for night.
  - doom-city-lights: Eh contrast, quite dark
  - doom-outrun-electric: Interesting colour palette
  - doom-vibrant: Good contrast, bit lighter
  - doom-molokai: hacker style
  - doom-solarized-light: Light orange theme that's actually okay on the eyes
  - doom-acario-light: Light theme with not bad colours
- Themes not sanctioned:
  - Any of the base16 themes for anything other than editing code, not org.
    Contrast isn't good enough
  - Light themes other than Emacs default, maybe sometimes solarized-light
  - Horrid low contrast ones with no colour. Grayscale particularly. I can't
    handle those.
* Password store
Function to get a password given a key.
#+BEGIN_SRC elisp
(defun oreodave/password-store/get-password (KEY)
  (shell-command-to-string (concat "pass " KEY)))
#+END_SRC
* Weather
#+BEGIN_SRC elisp
(defun oreodave/weather ()
  "Check the weather at the 'location' stored in password store"
  (interactive)
  (wttrin (oreodave/password-store/get-password "location")))
#+END_SRC
Function to quickly check weather, which is what I wanted wttrin for.