Commit 9c5bd2da9001

Vincent Demeester <vincent@sbr.pm>
2019-12-24 18:50:26
setup-windows.el: update ace-window setup…
… and clean shackle… … and add windmove 😛 Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent e46b827
Changed files (1)
lisp/setup-windows.el
@@ -62,37 +62,28 @@
    eyebrowse-wrap-around t))
 
 (use-package ace-window                 ; Better movements between windows
+  :custom
+  (aw-keys '(?a ?u ?i ?e ?, ?c ?t ?r ?m))
+  (aw-scope 'frame)
+  (aw-dispatch-always t)
+  (aw-dispatch-alist
+   '((?s aw-swap-window "Swap Windows")
+     (?2 aw-split-window-vert "Split Window Vertically")
+     (?3 aw-split-window-horz "Split Window Horizontally")
+     (?? aw-show-dispatch-help)))
+  (aw-minibuffer-flag t)
+  (aw-ignore-current nil)
+  (aw-display-mode-overlay t)
+  (aw-background t)
   :bind (("C-x o"   . ace-window)
          ("C-c w w" . ace-window)
-         ("C-c w s" . ace-swap-window))
-  :config (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)))
+         ("C-c w s" . ace-swap-window)))
 
-;; (use-package shackle
-;;   :config
-;;   (progn
-;;     (setq shackle-select-reused-windows nil)
-;;     (setq shackle-default-alignment 'below)
-;;     (setq shackle-default-size 0.20)
-
-;;     (setq shackle-rules
-;;           '(("*compilation*"               :select nil :popup t               :size 0.15 :align below)
-;;             ("*undo-tree*"                                                    :size 0.25 :align right)
-;;             ("*eshell*"                    :select t                          :other t               )
-;;             ("*Shell Command Output*"      :select nil                                               )
-;;             ("\\*Async Shell.*\\*" :regexp t :ignore t                                                 )
-;;             (occur-mode                    :select nil                                   :align t    )
-;;             ("*Help*"                      :select t   :inhibit-window-quit t :other t               )
-;;             ("*Completions*"                                                  :size 0.3  :align t    )
-;;             ("*Messages*"                  :select nil :inhibit-window-quit t :other t               )
-;;             ("\\*[Wo]*Man.*\\*"    :regexp t :select t   :inhibit-window-quit t :other t               )
-;;             ("\\*poporg.*\\*"      :regexp t :select t                          :other t               )
-;;             ("\\`\\*helm.*?\\*\\'"   :regexp t                                    :size 0.3  :align t    )
-;;             ("*Calendar*"                  :select t                          :size 0.3  :align below)
-;;             ("*info*"                      :select t   :inhibit-window-quit t                         :same t)
-;;             (magit-status-mode             :select t   :inhibit-window-quit t                         :same t)
-;;             (magit-log-mode                :select t   :inhibit-window-quit t                         :same t)
-;;             ))
-;;     (shackle-mode 1)))
+(use-package windmove
+  :bind (("M-<left>" . windmove-left)
+         ("M-<down>" . windmove-down)
+         ("M-<up>" . windmove-up)
+         ("M-<right>" . windmove-right)))
 
 (defun mu-find-side-windows (&optional side)
   "Get all side window if any.