Replace window splitting rules with shackle package

This commit is contained in:
Evie Litherland-Smith 2023-11-15 09:47:27 +00:00
parent 4727f60def
commit 422178a615
3 changed files with 23 additions and 16 deletions

View file

@ -78,6 +78,7 @@
which-key which-key
link-hint link-hint
darkroom darkroom
shackle
# writing-packages # writing-packages
markdown-mode markdown-mode

View file

@ -7,6 +7,7 @@
use-short-answers t use-short-answers t
load-prefer-newer t load-prefer-newer t
indent-tabs-mode nil indent-tabs-mode nil
even-window-sizes nil
global-auto-revert-non-file-buffers t global-auto-revert-non-file-buffers t
dired-auto-revert-buffer t dired-auto-revert-buffer t
dired-dwim-target t dired-dwim-target t
@ -45,11 +46,6 @@
;; Make shebang (#!) file executable when saved ;; Make shebang (#!) file executable when saved
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)
(setq even-window-sizes nil
display-buffer-base-action '((display-buffer-reuse-window
display-buffer-same-window)
(reusable-frames . t)))
(when (require 'package nil :noerror) (when (require 'package nil :noerror)
(add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/")) (add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
@ -100,7 +96,7 @@
(menu-bar-mode -1) (menu-bar-mode -1)
(tool-bar-mode -1) (tool-bar-mode -1)
(scroll-bar-mode -1) (scroll-bar-mode -1)
(tab-bar-mode +1) (tab-bar-mode -1)
(line-number-mode +1) (line-number-mode +1)
(column-number-mode +1) (column-number-mode +1)
(global-display-line-numbers-mode -1) (global-display-line-numbers-mode -1)
@ -243,6 +239,13 @@
:ensure t :ensure t
:bind (("C-c d" . darkroom-mode))) :bind (("C-c d" . darkroom-mode)))
(setq shackle-rules '((compilation-mode :noselect t)
(mu4e-main-mode :same t :inhibit-window-quit t))
shackle-default-rule '(:select t))
(use-package shackle
:ensure t
:config (shackle-mode +1))
(setq org-directory "~/Org" (setq org-directory "~/Org"
org-default-notes-file (expand-file-name "notes.org" org-directory) org-default-notes-file (expand-file-name "notes.org" org-directory)
org-pretty-entities-include-sub-superscripts t org-pretty-entities-include-sub-superscripts t

View file

@ -15,6 +15,7 @@
use-short-answers t use-short-answers t
load-prefer-newer t load-prefer-newer t
indent-tabs-mode nil indent-tabs-mode nil
even-window-sizes nil
global-auto-revert-non-file-buffers t global-auto-revert-non-file-buffers t
dired-auto-revert-buffer t dired-auto-revert-buffer t
dired-dwim-target t dired-dwim-target t
@ -54,15 +55,6 @@
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)
#+END_SRC #+END_SRC
** Control window splitting
#+begin_src emacs-lisp
(setq even-window-sizes nil
display-buffer-base-action '((display-buffer-reuse-window
display-buffer-same-window)
(reusable-frames . t)))
#+end_src
** package-archive with priorities ** package-archive with priorities
#+begin_src emacs-lisp :results output silent #+begin_src emacs-lisp :results output silent
(when (require 'package nil :noerror) (when (require 'package nil :noerror)
@ -129,7 +121,7 @@
(menu-bar-mode -1) (menu-bar-mode -1)
(tool-bar-mode -1) (tool-bar-mode -1)
(scroll-bar-mode -1) (scroll-bar-mode -1)
(tab-bar-mode +1) (tab-bar-mode -1)
(line-number-mode +1) (line-number-mode +1)
(column-number-mode +1) (column-number-mode +1)
(global-display-line-numbers-mode -1) (global-display-line-numbers-mode -1)
@ -284,6 +276,17 @@
:ensure t :ensure t
:bind (("C-c d" . darkroom-mode))) :bind (("C-c d" . darkroom-mode)))
#+end_src #+end_src
** Shackle
#+begin_src emacs-lisp
(setq shackle-rules '((compilation-mode :noselect t)
(mu4e-main-mode :same t :inhibit-window-quit t))
shackle-default-rule '(:select t))
(use-package shackle
:ensure t
:config (shackle-mode +1))
#+end_src
* Org-mode * Org-mode
For reference information, see [[https://orgmode.com][Org-mode website]] For reference information, see [[https://orgmode.com][Org-mode website]]