Update bundle--mk

This commit is contained in:
Marcus Kammer 2020-08-20 10:41:09 +02:00
parent f996eb4d3c
commit dabe5b4dcc
2 changed files with 24 additions and 24 deletions

View file

@ -7,3 +7,27 @@
(olivetti-mode) (olivetti-mode)
(defvar mode-line-format-current (defvar mode-line-format-current
(symbol-value 'mode-line-format))) (symbol-value 'mode-line-format)))
(defun me/split-windows-horizontal ()
"Split windows horizontal by equal width."
(interactive)
(setq count-windows 3)
(delete-other-windows)
(let ((width (/ (window-total-width) count-windows)))
(setq count 0)
(while (< count (1- count-windows))
(split-window-right (- 0 width))
(setq count (1+ count)))))
(defun me/split-windows-vertical ()
"Split windows vertical by equal width."
(interactive)
(setq count-windows 3)
(delete-other-windows)
(let ((height (/ (window-total-height) count-windows)))
(setq count 0)
(while (< count (1- count-windows))
(split-window-below (- 0 height))
(setq count (1+ count)))))
(me/split-windows-horizontal)

24
init.el
View file

@ -33,27 +33,3 @@
(put 'narrow-to-page 'disabled nil) (put 'narrow-to-page 'disabled nil)
(load "bundle--mk") (load "bundle--mk")
(defun me/split-windows-horizontal ()
"Split windows horizontal by equal width."
(interactive)
(setq count-windows 3)
(delete-other-windows)
(let ((width (/ (window-total-width) count-windows)))
(setq count 0)
(while (< count (1- count-windows))
(split-window-right (- 0 width))
(setq count (1+ count)))))
(me/split-windows-horizontal)
(defun me/split-windows-vertical ()
"Split windows vertical by equal width."
(interactive)
(setq count-windows 3)
(delete-other-windows)
(let ((height (/ (window-total-height) count-windows)))
(setq count 0)
(while (< count (1- count-windows))
(split-window-below (- 0 height))
(setq count (1+ count)))))