]> git.donarmstrong.com Git - lib.git/blob - emacs_el/configuration/don-hydra.el
6eec45f1e89df9e64da79f56ec218bc87fbf2739
[lib.git] / emacs_el / configuration / don-hydra.el
1
2 (require 'hydra)
3
4 ;; org mode files
5 (defhydra my/hydra-orgmodes (:color blue :hint nil)
6   "
7 _n_: notes _c_: chaim _w_: wildman _o_: ool
8 _u_: uddin _s_: steve _r_: refile  _f_: fh    
9 _p_: read papers      _R_: paper notes
10 _q_: quit
11 _z_: quit
12 "
13   ("n" (find-file "~/projects/org-notes/notes.org"))
14   ("c" (find-file "~/projects/org-notes/chaim.org"))
15   ("w" (find-file "~/projects/org-notes/wildman.org"))
16   ("u" (find-file "~/projects/org-notes/uddin.org"))
17   ("o" (find-file "~/projects/org-notes/ool.org"))
18   ("f" (find-file "~/projects/org-notes/fh.org"))
19   ("s" (find-file "~/projects/org-notes/sndservers.org"))
20   ("r" (find-file "~/projects/org-notes/refile.org"))
21   ("p" (find-file "~/projects/research/papers_to_read.org"))
22   ("R" (find-file "~/projects/research/paper_notes.org"))
23   ("q" nil "quit")
24   ("z" nil "quit")
25   )
26 (global-set-key (kbd "C-c 2") 'my/hydra-orgmodes/body)
27 (global-set-key (kbd "C-c @") 'my/hydra-orgmodes/body)
28
29
30 ;; from https://github.com/abo-abo/hydra/wiki/Emacs
31 (defhydra my/hydra-outline (:color pink :hint nil)
32   "
33 ^Hide^             ^Show^           ^Move
34 ^^^^^^------------------------------------------------------
35 _q_: sublevels     _a_: all         _u_: up
36 _t_: body          _e_: entry       _n_: next visible
37 _o_: other         _i_: children    _p_: previous visible
38 _c_: entry         _k_: branches    _f_: forward same level
39 _l_: leaves        _s_: subtree     _b_: backward same level
40 _d_: subtree
41
42 "
43   ;; Hide
44   ("q" hide-sublevels)    ; Hide everything but the top-level headings
45   ("t" hide-body)         ; Hide everything but headings (all body lines)
46   ("o" hide-other)        ; Hide other branches
47   ("c" hide-entry)        ; Hide this entry's body
48   ("l" hide-leaves)       ; Hide body lines in this entry and sub-entries
49   ("d" hide-subtree)      ; Hide everything in this entry and sub-entries
50   ;; Show
51   ("a" show-all)          ; Show (expand) everything
52   ("e" show-entry)        ; Show this heading's body
53   ("i" show-children)     ; Show this heading's immediate child sub-headings
54   ("k" show-branches)     ; Show all sub-headings under this heading
55   ("s" show-subtree)      ; Show (expand) everything in this heading & below
56   ;; Move
57   ("u" outline-up-heading)                ; Up
58   ("n" outline-next-visible-heading)      ; Next
59   ("p" outline-previous-visible-heading)  ; Previous
60   ("f" outline-forward-same-level)        ; Forward - same level
61   ("b" outline-backward-same-level)       ; Backward - same level
62   ("z" nil "leave"))
63
64 (global-set-key (kbd "C-c #") 'my/hydra-outline/body) ; by example