switch to meow and move edwina configs into the modal files

This commit is contained in:
Miranda Marquez 2024-10-16 12:44:24 -08:00
parent 8d3a1ee88b
commit 3f5f61dbff
3 changed files with 84 additions and 33 deletions

47
init.el
View File

@ -425,11 +425,12 @@ If the current window occupies the whole frame, split it."
;; (eldoc 'nothing) ;; (eldoc 'nothing)
;; load evil or meow ;; load evil or meow
(require 'mir-evil) ;; (require 'mir-evil)
;; (require 'mir-meow) (require 'mir-meow)
(use-package undo-fu (use-package undo-fu
:after evil ;; :after evil
:after meow
:if (< (string-to-number emacs-version) 28) :if (< (string-to-number emacs-version) 28)
:diminish) :diminish)
(use-package undo-fu-session (use-package undo-fu-session
@ -466,36 +467,14 @@ If the current window occupies the whole frame, split it."
"d" 'my/vundo-diff)) "d" 'my/vundo-diff))
(use-package altcaps (use-package altcaps
:after evil ;; :after evil
:after meow
:ensure (:host github :ensure (:host github
:repo "protesilaos/altcaps") :repo "protesilaos/altcaps")
:general (general-define-key :general (general-define-key
:states 'visual :states 'visual
"`" 'altcaps-region)) "`" 'altcaps-region))
;; edwina window manager, like the kool kids
(use-package edwina
:after evil
:custom
(edwina-mfact 0.59)
;; (display-buffer-base-action '(display-buffer-below-selected))
:init
(advice-add 'balance-windows
:override 'edwina-arrange)
(add-hook 'server-after-make-frame-hook #'edwina-arrange)
(add-hook 'after-init-hook #'edwina-arrange)
(add-hook 'elpaca-after-init-hook #'edwina-arrange)
:config
(edwina-mode)
(edwina-arrange)
:general
(general-define-key
[remap split-window-right] 'edwina-clone-window
[remap evil-window-move-far-left] 'edwina-zoom
[remap evil-window-move-far-right] 'edwina-zoom
[remap evil-window-increase-height] 'edwina-inc-mfact
[remap evil-window-decrease-height] 'edwina-dec-mfact
[remap balance-windows] 'edwina-arrange))
;; show command that caused last scrollback in eshell etc ;; show command that caused last scrollback in eshell etc
(use-package sticky-shell (use-package sticky-shell
@ -546,7 +525,8 @@ If the current window occupies the whole frame, split it."
:hook :hook
(eshell-mode . eat-eshell-visual-command-mode) (eshell-mode . eat-eshell-visual-command-mode)
(eshell-mode . eat-eshell-mode) (eshell-mode . eat-eshell-mode)
(eat-mode . evil-insert-state)) ;; (eat-mode . evil-insert-state)
(eat-mode . meow-insert))
(use-package hide-mode-line (use-package hide-mode-line
:commands (hide-mode-line-mode)) :commands (hide-mode-line-mode))
(use-package eshell-syntax-highlighting (use-package eshell-syntax-highlighting
@ -836,10 +816,13 @@ targets."
(show-paren-delay 0) (show-paren-delay 0)
(show-paren-style 'parenthesis)) (show-paren-style 'parenthesis))
(use-package evil-paredit (use-package evil-paredit
:after paredit) :after (evil paredit))
(use-package lispyville
:diminish ;; (use-package lispyville
:hook (paredit-mode . lispyville-mode)) ;; ;; :after evil
;; :after meow
;; :diminish
;; :hook (paredit-mode . lispyville-mode))
;; org mode and messy things ;; org mode and messy things
(use-package org (use-package org

View File

@ -99,6 +99,30 @@
(evil-goggles-default-face (evil-goggles-default-face
((t (:background "#303030" :foreground "#2233aa"))))) ((t (:background "#303030" :foreground "#2233aa")))))
;; edwina window manager, like the kool kids
(use-package edwina
;; :after evil
:custom
(edwina-mfact 0.59)
;; (display-buffer-base-action '(display-buffer-below-selected))
:init
(advice-add 'balance-windows
:override 'edwina-arrange)
(add-hook 'server-after-make-frame-hook #'edwina-arrange)
(add-hook 'after-init-hook #'edwina-arrange)
(add-hook 'elpaca-after-init-hook #'edwina-arrange)
:config
(edwina-mode)
(edwina-arrange)
:general
(general-define-key
[remap split-window-right] 'edwina-clone-window
[remap evil-window-move-far-left] 'edwina-zoom
[remap evil-window-move-far-right] 'edwina-zoom
[remap evil-window-increase-height] 'edwina-inc-mfact
[remap evil-window-decrease-height] 'edwina-dec-mfact
[remap balance-windows] 'edwina-arrange))
(provide 'mir-evil) (provide 'mir-evil)
;;; mir-evil.el ends here ;;; mir-evil.el ends here

View File

@ -29,6 +29,7 @@
:custom :custom
(meow-cheatsheet-layout meow-cheatsheet-layout-qwerty) (meow-cheatsheet-layout meow-cheatsheet-layout-qwerty)
(meow-keypad-self-insert-undefined nil) (meow-keypad-self-insert-undefined nil)
(meow-use-clipboard t)
:init :init
;; (require 'esc-intercept) ;; (require 'esc-intercept)
;; Visual moving ;; Visual moving
@ -139,7 +140,7 @@
'("Y" . meow-sync-grab) '("Y" . meow-sync-grab)
'("z" . meow-pop-selection) '("z" . meow-pop-selection)
'("'" . repeat) '("'" . repeat)
;; '("ESC" . mir/meow-esc-dwim) '("ESC" . mir/meow-esc-dwim)
)) ))
(defun mir/meow-esc-dwim () (defun mir/meow-esc-dwim ()
"Escape the current search, action, or state. "Escape the current search, action, or state.
@ -172,5 +173,48 @@
(add-hook 'meow-keypad-mode-hook (lambda () (setq-local evil-state 'keypad))) (add-hook 'meow-keypad-mode-hook (lambda () (setq-local evil-state 'keypad)))
) )
;; why why why does it literally pass C-w
;; i need that for my window controls instead
(defun mir/meow-kill-no-kb ()
"Kill region. Don't run the kbd macro thing."
(interactive)
(let ((select-enable-clipboard meow-use-clipboard))
(when (meow--allow-modify-p)
(meow--with-selection-fallback
(cond
((equal '(expand . join) (meow--selection-type))
(delete-indentation nil (region-beginning) (region-end)))
(t
(meow--prepare-region-for-kill)
(call-interactively #'kill-region)))))))
(advice-add 'meow-kill
:override #'mir/meow-kill-no-kb)
;; (setq meow--kbd-kill-region "M-x kill-region RET")
(use-package edwina
:custom (edwina-mfact 0.59)
:init
(advice-add 'balance-windows
:override 'edwina-arrange)
(add-hook 'server-after-make-frame-hook #'edwina-arrange)
(add-hook 'after-init-hook #'edwina-arrange)
(add-hook 'elpaca-after-init-hook #'edwina-arrange)
:config
(edwina-mode)
(edwina-arrange)
:general
(general-define-key
:prefix-map 'mir-windmove-prefix
:prefix "C-w"
"l" 'windmove-right
"h" 'windmove-left
"k" 'windmove-up
"j" 'windmove-down
"H" 'edwina-zoom
"L" 'edwina-zoom
"+" 'edwina-inc-mfact
"-" 'edwina-dec-mfact
"=" 'edwina-arrange))
(provide 'mir-meow) (provide 'mir-meow)
;;; mir-meow.el ends here ;;; mir-meow.el ends here