rework zoom.el and how it sizes windows for golden ratio and similar
This commit is contained in:
parent
2086d8b9d2
commit
41ecbc30d4
|
@ -505,13 +505,30 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; zoom (replaces golden-ratio)
|
||||
(require 'zoom)
|
||||
(setq zoom-size '(0.618 . 0.618))
|
||||
(zoom-mode t)
|
||||
(global-set-key (kbd "C-x +") 'zoom)
|
||||
; zoom-mode can be bound to a key for toggle purposes
|
||||
|
||||
; sizing
|
||||
;(setq zoom-size '(0.618 . 0.618))
|
||||
(defun kmn-zoom-size-callback ()
|
||||
(cond
|
||||
((equal major-mode 'dired-mode) '(0.20 . 0.20))
|
||||
((equal major-mode 'eww-mode) '(0.75 . 0.75))
|
||||
((equal major-mode 'eshell-mode) '(0.75 . 0.75))
|
||||
((string-equal (window-dedicated-p) "side") '(0.15 . 0.15))
|
||||
(t '(0.618 . 0.618))
|
||||
))
|
||||
|
||||
; tuning
|
||||
(custom-set-variables
|
||||
'(zoom-ignored-major-modes '(dired-mode eshell-mode))
|
||||
'(temp-buffer-resize-mode t))
|
||||
'(zoom-size 'kmn-zoom-size-callback)
|
||||
'(temp-buffer-resize-mode t)
|
||||
; '(zoom-ignored-major-modes '(dired-mode))
|
||||
; '(zoom-ignore-predicates '((lambda ()
|
||||
; (if (string-equal (window-dedicated-p) "side") 'Y' nil)
|
||||
; )))
|
||||
)
|
||||
|
||||
(global-set-key (kbd "C-x +") 'zoom)
|
||||
(zoom-mode t)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; popup windows
|
||||
|
|
Reference in a new issue