diff --git a/lisp/init-windowmgmt.el b/lisp/init-windowmgmt.el index 5c2c5d8..2f3ba91 100644 --- a/lisp/init-windowmgmt.el +++ b/lisp/init-windowmgmt.el @@ -176,12 +176,28 @@ _a_ || _d_ |---| _w_ --- _s_ =" ("s" enlarge-window nil) ("q" nil nil :color red)) + ;; (set-window-margins nil novel--cur-margin novel--cur-margin) + (setq current-window-margin 0) + (setq current-window-margin-step 10) + + (defun tvd-window-margin-add() + (interactive) + (setq current-window-margin (+ current-window-margin current-window-margin-step)) + (set-window-margins nil current-window-margin current-window-margin)) + + (defun tvd-window-margin-sub() + (interactive) + (setq current-window-margin (- current-window-margin current-window-margin-step)) + (if (< current-window-margin 0) + (setq current-window-margin 0)) + (set-window-margins nil current-window-margin current-window-margin)) + (defhydra hydra-windows (:color blue) " ^Window Management^ ^^------------------------------------------------------------------------ -_+_ Increase Font | _-_ Decrease Font Resize ^ ^ _w_ ^ ^ +_+_: Increase Font | _-_: Decrease Font Resize ^ ^ _w_ ^ ^ _f_: Flip Windows ^^ Current _a_ ^ ^ _d_ _4_: Quarter Windows ^^ Window: ^ ^ _s_ ^ ^ _u_: Windows Undo @@ -189,7 +205,7 @@ _r_: Windows Redo ^^ _l_: Adjust Background brighter _i_: Invert Colors ^^ _b_: Adjust Background darker _h_: Toggle Highlight Line Mode ^^ _e_: Eyebrowse Workspaces (C-x C-x) -_n_: Toogle Line Number Mode +_n_: Toogle Line Number Mode ^^ _m_: increase | _M_: decrease margin ^^------------------------------------------------------------------------ Reach this hydra with @@ -212,6 +228,8 @@ Reach this hydra with ("e" hydra-eyebrowse/body nil) ("h" hl-line-mode nil) ("n" linum-mode nil) + ("m" tvd-window-margin-add nil :color pink) + ("M" tvd-window-margin-sub nil :color pink) ("q" nil nil :color red)) (global-set-key (kbd "C-x w") 'hydra-windows/body))