emacs/config/hydra.org
2026-02-10 23:29:40 -06:00

846 B

Hail Hydra?!

I find that Hydra is great for providing visual menus for tasks that might otherwise be fairly unwieldy. I use them hydra's for windows, tabs, and a few other things in the future perhaps.

Tabs

Pretty simple tab hydra. Handles opening, closing, and simple navigation.

  (defhydra hydra-tab (:color red :hint nil)
    "
Movement^^    ^Modifier^
----------------------------------------------------------------
_h_ ←        _n_ ew
_l_ →        _c_ lose
"
    ("h" tab-previous)
    ("l" tab-next)
    ("n" tab-new)
    ("c" tab-close)
    ("SPC" nil))
  (global-set-key (kbd "C-c t") 'hydra-tab/body)

Pulling it all together

(use-package hydra
	:demand t
  :config
  <<tab-hydra>>)