eflanigan00 edited this page Dec 4, 2016 · 3 revisions
Clone this wiki locally


Character ordering in new frames

Set this to maintain the ordering of the window character assignment in old frames after you open a new one:

(setq aw-reverse-frame-list t)

Manage 100% Window operations

A way to customize ace-window to perform all of the my windows operations through it:


(use-package ace-window
          :ensure t
          :defer 1
          (set-face-attribute 'aw-leading-char-face nil :foreground "deep sky blue" :weight 'bold :height 3.0)
          (set-face-attribute 'aw-mode-line-face nil :inherit 'mode-line-buffer-id :foreground "lawn green")
          (setq aw-keys   '(?a ?s ?d ?f ?j ?k ?l)
                aw-dispatch-always t
                '((?x aw-delete-window     "Ace - Delete Window")
                  (?c aw-swap-window       "Ace - Swap Window")
                  (?n aw-flip-window)
                  (?v aw-split-window-vert "Ace - Split Vert Window")
                  (?h aw-split-window-horz "Ace - Split Horz Window")
                  (?m delete-other-windows "Ace - Maximize Window")
                  (?g delete-other-windows)
                  (?b balance-windows)
                  (?u winner-undo)
                  (?r winner-redo)))

          (when (package-installed-p 'hydra)
            (defhydra hydra-window-size (:color red)
              "Windows size"
              ("h" shrink-window-horizontally "shrink horizontal")
              ("j" shrink-window "shrink vertical")
              ("k" enlarge-window "enlarge vertical")
              ("l" enlarge-window-horizontally "enlarge horizontal"))
            (defhydra hydra-window-frame (:color red)
              ("f" make-frame "new frame")
              ("x" delete-frame "delete frame"))
            (defhydra hydra-window-scroll (:color red)
              "Scroll other window"
              ("n" joe-scroll-other-window "scroll")
              ("p" joe-scroll-other-window-down "scroll down"))
            (add-to-list 'aw-dispatch-alist '(?w hydra-window-size/body) t)
            (add-to-list 'aw-dispatch-alist '(?o hydra-window-scroll/body) t)
            (add-to-list 'aw-dispatch-alist '(?\; hydra-window-frame/body) t))
          (ace-window-display-mode t))