X-Git-Url: https://code.delx.au/dotemacs/blobdiff_plain/5c421a7c44357af95dcd1b51c52b1899ec363be5..1e6aea58aa155b613de2008b1489bedc49ab9231:/lisp/my-shackle.el diff --git a/lisp/my-shackle.el b/lisp/my-shackle.el deleted file mode 100644 index 6965b96..0000000 --- a/lisp/my-shackle.el +++ /dev/null @@ -1,40 +0,0 @@ -;;; -*- lexical-binding: t -*- - -(require 'shackle) - -(defun my/shackle-rules () - (let ((rules-common - '(((:custom buffer-file-name) :other t) - (direx:direx-mode :align left :size 40 :select t) - ("*Flycheck error messages*" :align below :size 15 :select nil))) - (rules-wide - '(("magit-.*-popup" :regexp t :align right :select t) - ((magit-log-mode magit-status-mode) :align bottom :size 15 :select t) - ((magit-diff-mode magit-revision-mode) :align right :size 80))) - (rules-narrow-tall - '(("magit-.*-popup" :regexp t :align bottom :select t) - (magit-status-mode :align bottom :size 25 :select t) - ((magit-diff-mode magit-revision-mode) :align bottom :size 25))) - (rules-narrow-short - '(("magit-.*-popup" :regexp t :align bottom :select t) - (magit-status-mode :align bottom :size 0.8 :select t) - ((magit-diff-mode magit-revision-mode) :align bottom :size 0.65)))) - (cond - ((>= (frame-text-cols) 120) - (append rules-common rules-wide)) - ((>= (frame-text-lines) 30) - (append rules-common rules-narrow-tall)) - (t - (append rules-common rules-narrow-short))))) - -(setq shackle-default-rule '(:align below :select t :size 15)) - -(setq shackle-default-size 0.5) - -(defun shackle-match (buffer-or-name) - (cl-loop for (condition . plist) in (my/shackle-rules) - when (shackle--match buffer-or-name condition plist) - return plist - finally return shackle-default-rule)) - -(shackle-mode)