1 ;;; -*- lexical-binding: t -*-
5 (defun my/shackle-rules ()
7 '(((:custom buffer-file-name) :other t)
8 (direx:direx-mode :align left :size 40 :select t)
9 ("*Flycheck error messages*" :align below :size 15 :select nil)))
11 '(("magit-.*-popup" :regexp t :align right :select t)
12 ((magit-log-mode magit-status-mode) :align bottom :size 15 :select t)
13 ((magit-diff-mode magit-revision-mode) :align right :size 80)))
15 '(("magit-.*-popup" :regexp t :align bottom :select t)
16 (magit-status-mode :align bottom :size 25 :select t)
17 ((magit-diff-mode magit-revision-mode) :align bottom :size 25)))
19 '(("magit-.*-popup" :regexp t :align bottom :select t)
20 (magit-status-mode :align bottom :size 0.8 :select t)
21 ((magit-diff-mode magit-revision-mode) :align bottom :size 0.65))))
23 ((>= (frame-text-cols) 120)
24 (append rules-common rules-wide))
25 ((>= (frame-text-lines) 30)
26 (append rules-common rules-narrow-tall))
28 (append rules-common rules-narrow-short)))))
30 (setq shackle-default-rule '(:align below :select t :size 15))
32 (setq shackle-default-size 0.5)
34 (defun shackle-match (buffer-or-name)
35 (cl-loop for (condition . plist) in (my/shackle-rules)
36 when (shackle--match buffer-or-name condition plist)
38 finally return shackle-default-rule))