summary refs log tree commit diff
path: root/emacs.d/custom/fcuny-navigation.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.d/custom/fcuny-navigation.el')
-rw-r--r--emacs.d/custom/fcuny-navigation.el85
1 files changed, 33 insertions, 52 deletions
diff --git a/emacs.d/custom/fcuny-navigation.el b/emacs.d/custom/fcuny-navigation.el
index 4547e61..f51e99c 100644
--- a/emacs.d/custom/fcuny-navigation.el
+++ b/emacs.d/custom/fcuny-navigation.el
@@ -1,39 +1,45 @@
 (require 'fcuny-vars)
 
-(use-package avy
+(use-package ace-window
   :ensure t
-  :bind
-  (("C-c l" . avy-goto-line)))
-
-(use-package windmove
-  :bind (("<M-left>" . windmove-left)
-	 ("<M-up>" . windmove-up)
-	 ("<M-right>" . windmove-right)
-	 ("<M-down>" . windmove-down)))
+  :pretty-hydra
+  ((:title "Window Management"
+    :foreign-keys warn :quit-key "q")
+   ("Actions"
+    (("TAB" other-window "switch")
+     ("x" ace-delete-window "delete" :exit t)
+     ("m" ace-delete-other-windows "maximize" :exit t)
+     ("s" ace-swap-window "swap" :exit t)
+     ("a" ace-select-window "select" :exit t)
+     ("f" toggle-frame-fullscreen "fullscreen" :exit t))
+    "Resize"
+    (("h" shrink-window-horizontally "←")
+     ("j" enlarge-window "↓")
+     ("k" shrink-window "↑")
+     ("l" enlarge-window-horizontally "→")
+     ("n" balance-windows "balance"))
+    "Split"
+    (("b" split-window-right "horizontally")
+     ("v" split-window-below "vertically"))
+    "Zoom"
+    (("+" text-scale-increase "in")
+     ("-" text-scale-decrease "out")
+     ("0" (text-scale-increase 0) "reset"))))
+  :bind (([remap other-window] . ace-window)
+         ("C-c w" . ace-window-hydra/body))
+  :custom-face
+  (aw-leading-char-face ((t (:inherit font-lock-keyword-face :bold t :height 3.0))))
+  (aw-mode-line-face ((t (:inherit mode-line-emphasis :bold t))))
+  :hook (emacs-startup . ace-window-display-mode)
+  :config
+  ;; Bind hydra to dispatch list
+  (add-to-list 'aw-dispatch-alist '(?w ace-window-hydra/body) t))
 
 (use-package bookmark
   :custom
   (bookmark-default-file (expand-file-name "bookmarks" fcuny/path-emacs-var))
   (bookmark-save-flag 1))
 
-(use-package counsel
-  :diminish counsel-mode
-  :ensure t
-  :after ivy
-  :init (counsel-mode 1)
-  :bind
-  (("M-x"     . counsel-M-x)
-   ("C-s"     . counsel-grep-or-swiper)
-   ("C-x C-f" . counsel-find-file)
-   ("C-x C-r" . counsel-recentf)
-   ("C-c f"   . counsel-git)
-   ("C-c s"   . counsel-git-grep)
-   ("C-c /"   . counsel-rg)
-   ("C-x r l" . counsel-bookmark))
-  :custom
-  (counsel-find-file-ignore-regexp "\\.DS_Store\\|\\.localized\\'")
-  (counsel-find-file-at-point t))
-
 (use-package ls-lisp
   :ensure nil
   :custom
@@ -89,31 +95,6 @@
   :init
   (add-hook 'ibuffer-mode-hook (lambda () (ibuffer-switch-to-saved-filter-groups "default"))))
 
-(use-package ivy
-  :ensure t
-  :diminish ivy-mode
-  :init (ivy-mode 1)
-  :custom
-  (ivy-use-virtual-buffers t)
-  (ivy-count-format "(%d/%d) ")
-  (ivy-height 20)
-  (ivy-use-selectable-prompt t)
-  :bind (("C-x b"   . ivy-switch-buffer)
-         ("C-c C-r" . ivy-resume)
-         ("C-c s"   . swiper-at-point)
-         ("C-s"     . swiper)))
-
-(use-package ivy-rich
-  :ensure t
-  :after (ivy)
-  :config
-  (ivy-rich-mode 1)
-  :custom
-  (ivy-extra-directories '("../" "./"))
-  (ivy-virtual-abbreviate 'full)
-  (ivy-rich-switch-buffer-align-virtual-buffer t)
-  (ivy-rich-path-style 'abbrev))
-
 (use-package recentf
   :init (recentf-mode 1)
   :config