From 1705e1b55f01fb3677270944e8a5f34fd467a018 Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Mon, 11 Nov 2024 17:08:02 +0100 Subject: [PATCH] fix leader replacement and make chrome removal more robust --- init.org | 54 ++++++++++++++++++++++++------------------------------ 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/init.org b/init.org index 98a6174..ad5c3ce 100644 --- a/init.org +++ b/init.org @@ -412,7 +412,7 @@ muscle memory. ;; make vc commands available via leader key (evil-define-key 'normal 'global (kbd "v") vc-prefix-map) - (keymap-global-set "C-c v") + (keymap-global-set "C-c v" vc-prefix-map) #+END_SRC #+RESULTS @@ -435,10 +435,10 @@ muscle memory. (kbd "fo") #'recentf (kbd "fr") #'revert-buffer (kbd "fd") #'diff-buffer-with-file) - (keymap-global-set "C-c ff") #'find-file - (keymap-global-set "C-c fo") #'recentf - (keymap-global-set "C-c fr") #'revert-buffer - (keymap-global-set "C-c fd") #'diff-buffer-with-file) + (keymap-global-set "C-c f f" #'find-file) + (keymap-global-set "C-c f o" #'recentf) + (keymap-global-set "C-c f r" #'revert-buffer) + (keymap-global-set "C-c f d" #'diff-buffer-with-file) #+END_SRC #+BEGIN_SRC emacs-lisp @@ -447,21 +447,22 @@ muscle memory. #+END_SRC #+BEGIN_SRC emacs-lisp - (use-package harpoon - :ensure t - :init - (setq pti-harpoon-map (make-sparse-keymap)) - (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) - (keymap-set pti-harpoon-map (kbd "a") 'harpoon-add-file) - (keymap-set pti-harpoon-map (kbd "f") 'harpoon-toggle-file) - (keymap-set pti-harpoon-map (kbd "j") 'harpoon-go-to-1) - (keymap-set pti-harpoon-map (kbd "k") 'harpoon-go-to-2) - (keymap-set pti-harpoon-map (kbd "l") 'harpoon-go-to-3) - (keymap-set pti-harpoon-map (kbd ";") 'harpoon-go-to-4) - (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) - :bind - (("h" . 'pti-harpoon-map))) - + (use-package harpoon + :ensure t + :init + (setq pti-harpoon-map (make-sparse-keymap)) + (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) + (keymap-set pti-harpoon-map (kbd "a") 'harpoon-add-file) + (keymap-set pti-harpoon-map (kbd "f") 'harpoon-toggle-file) + (keymap-set pti-harpoon-map (kbd "j") 'harpoon-go-to-1) + (keymap-set pti-harpoon-map (kbd "k") 'harpoon-go-to-2) + (keymap-set pti-harpoon-map (kbd "l") 'harpoon-go-to-3) + (keymap-set pti-harpoon-map (kbd ";") 'harpoon-go-to-4) + (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) + :bind + (("h" . 'pti-harpoon-map) + ("C-c h" . 'pti-harpoon-map))) + #+END_SRC #+RESULTS: @@ -559,15 +560,9 @@ screen. (defun pti-display-tweaks (&optional frame) "Configure a newly created FRAME." (interactive) - (unless frame - (setq frame (selected-frame))) - (when (display-graphic-p) - (with-selected-frame frame - ;; remove chrome from UI - (menu-bar-mode -1) - (tool-bar-mode -1) - (scroll-bar-mode -1) - ))) + (menu-bar-mode -1) + (tool-bar-mode -1) + (scroll-bar-mode -1)) (add-hook 'after-make-frame-functions #'pti-display-tweaks) ;; run it in the current frame, because the hooks have already fired @@ -580,7 +575,6 @@ screen. *** Set Theme #+BEGIN_SRC emacs-lisp ;; Set theme - (use-package catppuccin-theme :ensure t :demand t)