Add an example to hide the modeline

This commit is contained in:
Sameer Rahmani 2023-06-20 23:33:53 +01:00
parent ffe4bb81f7
commit e31be3310f
Signed by: lxsameer
GPG Key ID: B0A4AF28AB9FD90B
2 changed files with 29 additions and 2 deletions

View File

@ -312,6 +312,5 @@ It reports them back in a status bar like frame."
(mapc #'noether--teardown-views noether-views)))
(provide 'noether)
;;; noether.el ends here

View File

@ -36,7 +36,8 @@
:separator "|"
:frame
(list
:position '(110 . 120)
:position (cons (- (frame-outer-width) 10)
(- (frame-outer-height) 40))
:border-width 1
;; :left-fringe 5
;; :right-fringe 5
@ -48,10 +49,37 @@
(buffer-name-unit)
(mode-name-unit)))
(defface noether-active-modeline
'((((background light))
:background "#55ced1" :height 0.14 :box nil)
(t
:background "#008b8b" :height 0.14 :box nil))
"A new face for modeline in active state."
:group 'noether)
(defface noether-inactive-modeline
'((((background light))
:background "#55ced1" :height 0.14 :box nil)
(t
:background "#339933" :height 0.14 :box nil))
"A new face for modeline in inactive state."
:group 'noether)
(setq noether-views (list example-bar))
(add-hook
'noether-global-mode-hook
(lambda ()
(setq-default mode-line-format "")
(let ((face-remaps (default-value 'face-remapping-alist)))
(setf (alist-get 'mode-line face-remaps)
'noether-active-modeline
(alist-get 'mode-line-inactive face-remaps)
'noether-inactive-modeline
(default-value 'face-remapping-alist) face-remaps))))
(noether-global-mode t)
(provide 'noether.example)
;;; noether.example.el ends here