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