diff --git a/init.el b/init.el index 2fdb641..448ee34 100644 --- a/init.el +++ b/init.el @@ -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 "") 'find-file) (global-set-key (kbd "") 'revert-buffer-no-confirm) +(global-set-key (kbd "C-") 'my/toggle-buffer) (global-set-key (kbd "") '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