summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bw.el34
1 files changed, 28 insertions, 6 deletions
diff --git a/bw.el b/bw.el
index 322beb3..7e94a28 100644
--- a/bw.el
+++ b/bw.el
@@ -21,7 +21,31 @@
;;; Commentary:
-;; Show stuff in a bottom window.
+;; Show stuff in a bottom window. The idea is taken from ide-skel,
+;; which is a very nice extension, but doesn't fit into my workflow at
+;; all, the only really nice thing is that all *buffers* appear in a
+;; specialized window.
+
+;;; Usage:
+
+;; Make sure it's loadable, you should be able to do this by using:
+
+;; M-x package-install-file RET /path/to/bw.el RET
+
+;; or if you don't use package.el you could use:
+
+;; (add-to-list 'load-path "/path/to/bw/directory")
+;; (require 'bw)
+
+;; Once that is done you can set it up for use:
+
+;; (add-to-list 'display-buffer-alist
+;; '("^\\*.*\\*$"
+;; . ((bw-display-in-bottom-window . nil)))
+
+;; And perhaps even bind a key to it:
+
+;; (global-set-key (kbd "<f11>") 'bw-toggle-bottom-window)
;;; Code:
@@ -58,14 +82,15 @@
(window-list))
win))
+;;;###autoload
(defun bw-display-in-bottom-window (buffer alist)
"Show BUFFER in the bottom window, discard ALIST."
(let ((win (or (bw-get-window) (bw-create-window))))
(set-window-buffer win buffer)
(setq bw-last-shown-buffer buffer)
- (local-set-key (kbd "C-c C-q") 'delete-window)
win))
+;;;###autoload
(defun bw-display-in-other-window (buffer alist)
"Show BUFFER in any window that is not the bottom window.
@@ -75,10 +100,6 @@ Discard ALIST."
(setq win (next-window win 'no)))
(set-window-buffer win buffer)))
-(add-to-list 'display-buffer-alist
- '("^\\*.*\\*$" . ((bw-display-in-bottom-window . nil))))
-(add-to-list 'display-buffer-alist
- '(".*" . ((bw-display-in-other-window . nil))) t)
(add-to-list 'window-persistent-parameters (cons 'bw-bottom t))
(defun bw-find-appropriate-buffer ()
@@ -94,6 +115,7 @@ Discard ALIST."
(setq buffer "*scratch*"))
buffer))
+;;;###autoload
(defun bw-toggle-bottom-window ()
"Either show or delete the bottom window."
(interactive)