mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 19:40:24 +10:00
Moving to Doom Emacs!
This commit is contained in:
31
.emacs.d/modules/ui/hydra/README.org
Normal file
31
.emacs.d/modules/ui/hydra/README.org
Normal file
@@ -0,0 +1,31 @@
|
||||
#+TITLE: ui/hydra
|
||||
#+DATE: october 29, 2019
|
||||
#+SINCE: 2.0
|
||||
#+STARTUP: inlineimages
|
||||
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#configuration][Configuration]]
|
||||
|
||||
* Description
|
||||
This module adds hydra to Doom Emacs, as well as a few custom built hydras to
|
||||
start with :
|
||||
|
||||
+ A hydra to control windows ~+hydra/window-nav/body~
|
||||
+ A hydra to control text zoom level ~+hydra/text-zoom/body~
|
||||
|
||||
** Module Flags
|
||||
This module provides no flags.
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/abo-abo/hydra][hydra]]
|
||||
|
||||
* Prerequisites
|
||||
This module has no prereqisites.
|
||||
|
||||
* Configuration
|
||||
Configuring this module is only setting bindings to the provided hydra, or
|
||||
creating your own ones !
|
||||
47
.emacs.d/modules/ui/hydra/autoload/windows.el
Normal file
47
.emacs.d/modules/ui/hydra/autoload/windows.el
Normal file
@@ -0,0 +1,47 @@
|
||||
;;; ui/hydra/autoload/windows.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload (autoload '+hydra/text-zoom/body "ui/hydra/autoload/windows" nil t)
|
||||
(defhydra +hydra/text-zoom (:hint t :color red)
|
||||
"
|
||||
Text zoom: _j_:zoom in, _k_:zoom out, _0_:reset
|
||||
"
|
||||
("j" doom/increase-font-size "in")
|
||||
("k" doom/decrease-font-size "out")
|
||||
("0" doom/reset-font-size "reset"))
|
||||
|
||||
;;;###autoload (autoload '+hydra/window-nav/body "ui/hydra/autoload/windows" nil t)
|
||||
(defhydra +hydra/window-nav (:hint nil)
|
||||
"
|
||||
Split: _v_ert _s_:horz
|
||||
Delete: _c_lose _o_nly
|
||||
Switch Window: _h_:left _j_:down _k_:up _l_:right
|
||||
Buffers: _p_revious _n_ext _b_:select _f_ind-file
|
||||
Resize: _H_:splitter left _J_:splitter down _K_:splitter up _L_:splitter right
|
||||
Move: _a_:up _z_:down _i_menu
|
||||
"
|
||||
("z" scroll-up-line)
|
||||
("a" scroll-down-line)
|
||||
("i" idomenu)
|
||||
|
||||
("h" windmove-left)
|
||||
("j" windmove-down)
|
||||
("k" windmove-up)
|
||||
("l" windmove-right)
|
||||
|
||||
("p" previous-buffer)
|
||||
("n" next-buffer)
|
||||
("b" switch-to-buffer)
|
||||
("f" find-file)
|
||||
|
||||
("s" split-window-below)
|
||||
("v" split-window-right)
|
||||
|
||||
("c" delete-window)
|
||||
("o" delete-other-windows)
|
||||
|
||||
("H" hydra-move-splitter-left)
|
||||
("J" hydra-move-splitter-down)
|
||||
("K" hydra-move-splitter-up)
|
||||
("L" hydra-move-splitter-right)
|
||||
|
||||
("q" nil))
|
||||
15
.emacs.d/modules/ui/hydra/config.el
Normal file
15
.emacs.d/modules/ui/hydra/config.el
Normal file
@@ -0,0 +1,15 @@
|
||||
;;; ui/hydra/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! hydra-examples
|
||||
:commands (hydra-move-splitter-up
|
||||
hydra-move-splitter-down
|
||||
hydra-move-splitter-right
|
||||
hydra-move-splitter-left))
|
||||
|
||||
;;;###package hydra
|
||||
(setq lv-use-separator t)
|
||||
|
||||
(defadvice! +hydra--inhibit-window-switch-hooks-a (orig-fn)
|
||||
:around #'lv-window
|
||||
(let ((doom-inhibit-switch-window-hooks t))
|
||||
(funcall orig-fn)))
|
||||
4
.emacs.d/modules/ui/hydra/packages.el
Normal file
4
.emacs.d/modules/ui/hydra/packages.el
Normal file
@@ -0,0 +1,4 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/hydra/packages.el
|
||||
|
||||
(package! hydra)
|
||||
Reference in New Issue
Block a user