Change my hidden modeline implementation to hide-mode-line

This commit is contained in:
Gergely Polonkai 2023-10-20 05:16:19 +02:00
parent 93851abbe2
commit 12a66c6ee7
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4

View File

@ -1786,6 +1786,14 @@ INFO plist."
("C-c o" . ciel-co)))
#+end_src
** ~hide-mode-line~ to hide the modeline occasionally
#+begin_src emacs-lisp
(use-package hide-mode-line
:bind (:map gpolonkai/pers-map
("h" . hide-mode-line-mode)))
#+end_src
* Dired extras
** ~dired-collapse~, to collapse directories that contain a single file somewhere deep
@ -3083,7 +3091,6 @@ Because thats still my favourite language.
("c" . gpolonkai/org-clock-map)
("C-c" . calc)
("M-C" . clean-buffer-list)
("h" . hidden-mode-line-mode)
("i" . string-inflection-all-cycle)
("C-i e" . "gergely@polonkai.eu")
("C-i w" . "http://gergely.polonkai.eu/")
@ -3105,42 +3112,6 @@ Because thats still my favourite language.
("SPC" . gpolonkai/goto-next-char))
#+end_src
* Custom commands and functions
** Frame manipulation
*** Hidden modeline mode
:PROPERTIES:
:SOURCE: http://emacs-doctor.com/emacs-strip-tease.html
:END:
To temporarily hide the mode line.
#+BEGIN_SRC emacs-lisp
(defvar hidden-mode-line-mode nil)
(defvar hide-mode-line nil)
(define-minor-mode hidden-mode-line-mode
"Minor mode to hide the mode-line in the current buffer."
:init-value nil
:global nil
:variable hidden-mode-line-mode
:group 'editing-basics
(if hidden-mode-line-mode
(setq hide-mode-line mode-line-format
mode-line-format nil)
(setq mode-line-format hide-mode-line
hide-mode-line nil))
(force-mode-line-update)
(redraw-display)
(when (and (called-interactively-p 'interactive)
hidden-mode-line-mode)
(run-with-idle-timer
0 nil 'message
(concat "Hidden Mode Line Mode enabled. "
"Use M-x hidden-mode-line-mode to make mode-line appear."))))
#+END_SRC
* And finally, server mode
Sometimes i start an ~emacsclient~ process, like for editing a commit message or something