-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bar Magal
committed
Feb 13, 2015
1 parent
1cad1cc
commit 27c3c63
Showing
3 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
(require 'purpose) | ||
|
||
(defvar pu-ext--window-layout | ||
'(nil (0 0 152 35) | ||
(:purpose edit :purpose-dedicated t :width 0.7466666666666667 :height 0.9722222222222222 :edges (0.0 0.0 0.7733333333333333 0.9722222222222222)) | ||
(t (116 0 152 35) (:purpose dired :purpose-dedicated t :width 0.21333333333333335 :height 0.5 :edges (0.7733333333333333 0.0 1.0133333333333334 0.5)) (:purpose ibuffer :purpose-dedicated t :width 0.22 :height 0.4722222222222222 :edges (0.7733333333333333 0.5 1.0133333333333334 0.9722222222222222))))) | ||
|
||
(defun pu-ext--setup-ibuffer () | ||
(purpose-set-mode-purpose 'ibuffer-mode 'ibuffer) | ||
(add-hook 'ibuffer-mode-hook | ||
#'(lambda () | ||
(ibuffer-filter-by-filename "."))) | ||
(add-hook 'ibuffer-mode-hook #'ibuffer-auto-mode) | ||
(setq ibuffer-formats '((mark " " name))) | ||
(setq ibuffer-display-summary nil) | ||
(setq ibuffer-use-header-line nil) | ||
;; not sure if we want this... | ||
;; (setq ibuffer-default-shrink-to-minimum-size t) | ||
(ibuffer-list-buffers)) | ||
|
||
(defun pu-ext-update-dired () | ||
(when (and (buffer-file-name) | ||
(cl-delete-if #'window-dedicated-p (purpose-windows-with-purpose 'dired))) | ||
(save-selected-window | ||
(dired (file-name-directory (buffer-file-name)))))) | ||
|
||
(defun pu-ext--setup-dired () | ||
(add-hook 'dired-mode-hook #'dired-hide-details-mode) | ||
(add-hook 'purpose-select-buffer-hook #'pu-ext-update-dired)) | ||
|
||
(defun pu-ext-setup () | ||
(interactive) | ||
(pu-ext--setup-ibuffer) | ||
(pu-ext--setup-dired) | ||
(purpose-set-window-layout pu-ext--window-layout)) | ||
|
||
(provide 'pu-ext-dired-ibuffer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters