Readd hydra for shortcuts

Turns out I am using those shortcuts indeed, but forget about it ;)
This commit is contained in:
Daniel - 2020-07-01 21:28:55 +02:00
parent d1c4ad5b5d
commit edf9afa68f
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
2 changed files with 16 additions and 1 deletions

View File

@ -162,6 +162,7 @@
(bind-key "<XF86Back>" #'winner-undo)
(bind-key "<XF86Forward>" #'winner-redo)
(bind-key "<f1>" #'db/run-or-hide-eshell)
(bind-key "<f2>" #'hydra-feature-shortcuts/body)
(bind-key "<f5>" #'rgrep)
(bind-key "<f6>" #'hydra-zoom/body)
(bind-key "<f7>" #'dictcc)
@ -554,6 +555,10 @@
:commands (endless/fill-or-unfill
db/delete-trailing-whitespace-maybe
db/run-or-hide-shell
db/gnus
db/org-agenda
db/scratch
db/find-user-init-file
db/run-or-hide-ansi-term
db/hex-to-ascii
db/text-to-hex
@ -578,7 +583,8 @@
(use-package db-hydras
:commands (hydra-toggle/body
hydra-zoom/body
hydra-rectangle/body))
hydra-rectangle/body
hydra-feature-shortcuts/body))
(use-package git-commit
:commands (global-git-commit-mode))

View File

@ -7,6 +7,7 @@
(autoload 'rectangle-exchange-point-and-mark "rect")
(require 'hydra)
(require 'db-customize)
(defhydra hydra-toggle (:color blue)
"toggle"
@ -52,5 +53,13 @@ _h_ _l_ _o_k _y_ank
("e" rectangle-exchange-point-and-mark nil)
("o" nil nil))
(eval
`(defhydra hydra-feature-shortcuts (:color blue)
""
,@(mapcar (lambda (entry)
(pcase-let ((`(,description ,shortcut ,function) entry))
(list (string shortcut) function description)))
db/frequently-used-features)))
(provide 'db-hydras)
;; db-hydras.el ends here