fix leader replacement and make chrome removal more robust

This commit is contained in:
Peter Tillemans 2024-11-11 17:08:02 +01:00
parent 3b3dbbb628
commit 1705e1b55f

View file

@ -412,7 +412,7 @@ muscle memory.
;; make vc commands available via leader key ;; make vc commands available via leader key
(evil-define-key 'normal 'global (evil-define-key 'normal 'global
(kbd "<leader>v") vc-prefix-map) (kbd "<leader>v") vc-prefix-map)
(keymap-global-set "C-c v") (keymap-global-set "C-c v" vc-prefix-map)
#+END_SRC #+END_SRC
#+RESULTS #+RESULTS
@ -435,10 +435,10 @@ muscle memory.
(kbd "<leader>fo") #'recentf (kbd "<leader>fo") #'recentf
(kbd "<leader>fr") #'revert-buffer (kbd "<leader>fr") #'revert-buffer
(kbd "<leader>fd") #'diff-buffer-with-file) (kbd "<leader>fd") #'diff-buffer-with-file)
(keymap-global-set "C-c ff") #'find-file (keymap-global-set "C-c f f" #'find-file)
(keymap-global-set "C-c fo") #'recentf (keymap-global-set "C-c f o" #'recentf)
(keymap-global-set "C-c fr") #'revert-buffer (keymap-global-set "C-c f r" #'revert-buffer)
(keymap-global-set "C-c fd") #'diff-buffer-with-file) (keymap-global-set "C-c f d" #'diff-buffer-with-file)
#+END_SRC #+END_SRC
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -447,20 +447,21 @@ muscle memory.
#+END_SRC #+END_SRC
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package harpoon (use-package harpoon
:ensure t :ensure t
:init :init
(setq pti-harpoon-map (make-sparse-keymap)) (setq pti-harpoon-map (make-sparse-keymap))
(keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) (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 "a") 'harpoon-add-file)
(keymap-set pti-harpoon-map (kbd "f") 'harpoon-toggle-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 "j") 'harpoon-go-to-1)
(keymap-set pti-harpoon-map (kbd "k") 'harpoon-go-to-2) (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 "l") 'harpoon-go-to-3)
(keymap-set pti-harpoon-map (kbd ";") 'harpoon-go-to-4) (keymap-set pti-harpoon-map (kbd ";") 'harpoon-go-to-4)
(keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu)
:bind :bind
(("<leader>h" . 'pti-harpoon-map))) (("<leader>h" . 'pti-harpoon-map)
("C-c h" . 'pti-harpoon-map)))
#+END_SRC #+END_SRC
@ -559,15 +560,9 @@ screen.
(defun pti-display-tweaks (&optional frame) (defun pti-display-tweaks (&optional frame)
"Configure a newly created FRAME." "Configure a newly created FRAME."
(interactive) (interactive)
(unless frame (menu-bar-mode -1)
(setq frame (selected-frame))) (tool-bar-mode -1)
(when (display-graphic-p) (scroll-bar-mode -1))
(with-selected-frame frame
;; remove chrome from UI
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
)))
(add-hook 'after-make-frame-functions #'pti-display-tweaks) (add-hook 'after-make-frame-functions #'pti-display-tweaks)
;; run it in the current frame, because the hooks have already fired ;; run it in the current frame, because the hooks have already fired
@ -580,7 +575,6 @@ screen.
*** Set Theme *** Set Theme
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; Set theme ;; Set theme
(use-package catppuccin-theme (use-package catppuccin-theme
:ensure t :ensure t
:demand t) :demand t)