Update init.el

This commit is contained in:
tar 2026-01-31 20:31:40 +01:00
parent 6cc5377a85
commit 3d98cc6ddb
1 changed files with 27 additions and 19 deletions

46
init.el
View File

@ -277,12 +277,16 @@ Shows a message if no path is available."
(interactive)
(kill-buffer nil))
(defun list-buffers-please ()
(defun my/list-buffers-please ()
(interactive)
(list-buffers)
(other-window 1)
(delete-other-windows))
(defun my/toggle-buffer ()
(interactive)
(switch-to-buffer (other-buffer)))
(defun make-json-great-again ()
(interactive)
(when (string-match-p ".json\\'" (buffer-name))
@ -301,8 +305,9 @@ Shows a message if no path is available."
(global-set-key (kbd "<f1>") 'find-file)
(global-set-key (kbd "<f5>") 'revert-buffer-no-confirm)
(global-set-key (kbd "C-<tab>") 'my/toggle-buffer)
(global-set-key (kbd "<f12>") 'kill-buffer-no-confirm)
(global-set-key (kbd "C-b") 'list-buffers-please)
(global-set-key (kbd "C-b") 'my/list-buffers-please)
(global-set-key (kbd "C-n") 'my/create-new-file)
(global-set-key (kbd "C-d") 'my/duplicate-line-or-region)
(global-set-key (kbd "C-x d") 'my/dired-open-current-file-directory)
@ -375,29 +380,32 @@ Shows a message if no path is available."
(setq modus-themes-to-toggle '(modus-operandi-tinted modus-vivendi-tinted))
(use-package ef-themes
:ensure t)
:ensure t
:init
(modus-themes-include-derivatives-mode 1)
:config
(setq modus-themes-mixed-fonts t)
(setq modus-themes-italic-constructs t)
(setq ef-themes-to-toggle '(ef-elea-light ef-elea-dark))
(setq ef-themes-headings ; read the manual's entry or the doc string
'((0 . (variable-pitch light 1.9))
(1 . (variable-pitch light 1.8))
(2 . (variable-pitch regular 1.7))
(3 . (variable-pitch regular 1.6))
(4 . (variable-pitch regular 1.5))
(5 . (variable-pitch 1.4)) ; absence of weight means `bold'
(6 . (variable-pitch 1.3))
(7 . (variable-pitch 1.2))
(t . (variable-pitch 1.1))))
(setq ef-themes-variable-pitch-ui t))
(setq ef-themes-to-toggle '(ef-elea-light ef-elea-dark))
(setq ef-themes-headings ; read the manual's entry or the doc string
'((0 . (variable-pitch light 1.9))
(1 . (variable-pitch light 1.8))
(2 . (variable-pitch regular 1.7))
(3 . (variable-pitch regular 1.6))
(4 . (variable-pitch regular 1.5))
(5 . (variable-pitch 1.4)) ; absence of weight means `bold'
(6 . (variable-pitch 1.3))
(7 . (variable-pitch 1.2))
(t . (variable-pitch 1.1))))
(setq ef-themes-mixed-fonts t
ef-themes-variable-pitch-ui t)
(defun my-setup-display-based-on-type ()
"Load different themes and disable menu bar for console mode."
(if (display-graphic-p)
(progn
(ef-themes-select 'ef-elea-light)
;;(modus-themes-load-theme 'ef-elea-light)
(modus-themes-load-theme 'modus-operandi-tinted)
;;(load-theme 'doom-monokai-pro)
(menu-bar-mode 1))
(progn