The Emacs Hydra Package: Some Use Cases
;;; Hydra
(defhydra
hydra-jump-to-directory
(:color amaranth)
"Jump to directory"
("e" (find-file "/home/red/Documents/elements") "Elements")
("m" (find-file "/home/red/Documents/Marriage") "Marriage")
("S" (find-file "/home/red/Source") "Source")
("d" (find-file "/home/red/Desktop") "Desktop")
("v" (find-file "/home/red/Videos") "Videos")
("p" (find-file "/home/red/Pictures") "Pictures")
("s" (find-file "/home/red/Desktop/scripts") "Scripts")
("q" nil "Quit" :color blue)) ; Add :color blue
(global-set-key (kbd "C-c 1") 'hydra-jump-to-directory/body)
(defhydra hydra-jump-to-system-file
(:color amaranth)
"Jump to system file"
("a" (find-file "/home/red/Documents/agenda.org") "agenda.org")
("b" (find-file "/home/red/.bashrc") ".bashrc")
("u" (find-file "/home/red/Documents/urls.org") "urls.org")
("q" nil "Quit" :color blue)) ; Add :color blue
(global-set-key (kbd "C-c 2") 'hydra-jump-to-system-file/body)
(defhydra
my-org-hydra
(:color amaranth)
"Org mode commands"
("a" org-agenda "org-agenda")
("l" org-agenda-list "org-agenda-list")
("f" find-agenda-file "find agenda file")
("w" cfw:open-org-calendar "open-org-calendar")
("c" calendar "calendar")
("q" nil "Quit" :color blue))
(global-set-key (kbd "C-c 3") 'my-org-hydra/body)
Return to Home