From 4dc37c750bd2de0c83e12a90f028bca3929afce4 Mon Sep 17 00:00:00 2001 From: BardofSprites <89086143+BardofSprites@users.noreply.github.com> Date: Sun, 7 Sep 2025 16:57:31 -0400 Subject: frame settings and popup term --- bard-elisp/bard-window.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bard-elisp') diff --git a/bard-elisp/bard-window.el b/bard-elisp/bard-window.el index 8f7cbd5..de84cb5 100644 --- a/bard-elisp/bard-window.el +++ b/bard-elisp/bard-window.el @@ -63,6 +63,17 @@ This as the action function in a `display-buffer-alist' entry." (when (apply fn args) (throw 'success fn)))))) +;; from protesilaos prot-shell library +(defun prot-window-shell-or-term-p (buffer &rest _) + "Check if BUFFER is a shell or terminal. +This is a predicate function for `buffer-match-p', intended for +use in `display-buffer-alist'." + (when (string-match-p "\\*.*\\(e?shell\\|v?term\\|terminal\\).*" (buffer-name (get-buffer buffer))) + (with-current-buffer buffer + ;; REVIEW 2022-07-14: Is this robust? + (and (not (derived-mode-p 'message-mode 'text-mode)) + (derived-mode-p 'eshell-mode 'shell-mode 'term-mode 'comint-mode 'fundamental-mode))))) + ;; taken from https://github.com/hylophile/.files/blob/1f3f01e4e25b00f7b61eca286fcf4f865885090c/.config/doom/config.org#fancy-tab-bar (defun hy/tab-bar-format-align-center () -- cgit v1.2.3