summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-01-26 23:20:48 -0600
committerCase Duckworth2021-01-26 23:20:48 -0600
commit852ac93e2fa3ce63ab93a0eb3fa41c007454bb95 (patch)
treef9b971df513dd202b7c826e7c49453b7f71fc2db
parentNormalize line endings (diff)
downloademacs-852ac93e2fa3ce63ab93a0eb3fa41c007454bb95.tar.gz
emacs-852ac93e2fa3ce63ab93a0eb3fa41c007454bb95.zip
Mess around with the modeline
-rw-r--r--config.org50
1 files changed, 45 insertions, 5 deletions
diff --git a/config.org b/config.org index 22de108..726d6cf 100644 --- a/config.org +++ b/config.org
@@ -148,9 +148,12 @@ and have made a custom fringe bitmap.
148 #b00000000]) 148 #b00000000])
149#+end_src 149#+end_src
150 150
151*** Nyan mode 151*** COMMENT Nyan mode
152 152
153Fuck it, let's have some fun. 153+Fuck it, let's have some fun.+ COMMENTED out because it messes up my
154modeline :(
155
156This obviously needs a lot more research.
154 157
155#+begin_src emacs-lisp :noweb-ref packages 158#+begin_src emacs-lisp :noweb-ref packages
156 (straight-use-package 'nyan-mode) 159 (straight-use-package 'nyan-mode)
@@ -162,6 +165,12 @@ I add it to the modeline [[*Simple modeline][below]].
162 (setq-default nyan-bar-length 20) 165 (setq-default nyan-bar-length 20)
163#+end_src 166#+end_src
164 167
168But I still have to enable the mode ?!
169
170#+begin_src emacs-lisp :noweb-ref settings
171 (nyan-mode +1)
172#+end_src
173
165** Windows 174** Windows
166 175
167*** Splitting windows sensibly 176*** Splitting windows sensibly
@@ -505,11 +514,12 @@ landed on a good one: =simple-modeline=.
505 514
506#+begin_src emacs-lisp :noweb-ref settings 515#+begin_src emacs-lisp :noweb-ref settings
507 (setq-default simple-modeline-segments 516 (setq-default simple-modeline-segments
508 '((simple-modeline-segment-modified 517 '(;; left side
518 (simple-modeline-segment-modified
509 simple-modeline-segment-buffer-name 519 simple-modeline-segment-buffer-name
510 simple-modeline-segment-position) 520 simple-modeline-segment-position)
511 (nyan-create 521 ;; right side
512 simple-modeline-segment-minor-modes 522 (simple-modeline-segment-minor-modes
513 simple-modeline-segment-input-method 523 simple-modeline-segment-input-method
514 simple-modeline-segment-vc 524 simple-modeline-segment-vc
515 simple-modeline-segment-misc-info 525 simple-modeline-segment-misc-info
@@ -521,6 +531,36 @@ landed on a good one: =simple-modeline=.
521 (simple-modeline-mode +1) 531 (simple-modeline-mode +1)
522#+end_src 532#+end_src
523 533
534***** COMMENT Functions to figure out what window is focused
535
536How is this not built into Emacs? Oh well, I have [[https://github.com/jamesnvc/dotfiles/blob/master/emacs.d/modules/cogent-modeline.el][Cogent]] to thank.
537
538#+begin_src emacs-lisp :noweb-ref variables
539 (defvar cogent-line-selected-window (frame-selected-window))
540#+end_src
541
542#+begin_src emacs-lisp :noweb-ref functions
543 (defun cogent-line-set-selected-window (&rest _args)
544 (when (not (minibuffer-window-active-p (frame-selected-window)))
545 (setq cogent-line-selected-window (frame-selected-window))
546 (force-mode-line-update)))
547
548 (defun cogent-line-unset-selected-window ()
549 (setq cogent-line-selected-window nil)
550 (force-mode-line-update))
551
552 (defun cogent-line-selected-window-active-p ()
553 (eq cogent-line-selected-window (selected-window)))
554#+end_src
555
556#+begin_src emacs-lisp :noweb-ref hooks
557 (add-hook 'window-configuration-change-hook #'cogent-line-set-selected-window)
558 (add-hook 'focus-in-hook #'cogent-line-set-selected-window)
559 (add-hook 'focus-out-hook #'cogent-line-unset-selected-window)
560 (advice-add 'handle-switch-frame :after #'cogent-line-set-selected-window)
561 (advice-add 'select-window :after #'cogent-line-set-selected-window)
562#+end_src
563
524**** Blackout some modes :package: 564**** Blackout some modes :package:
525 565
526Like =diminish= or =delight=, =blackout= allows me to remove some 566Like =diminish= or =delight=, =blackout= allows me to remove some