app/twitter: add support for +new modeline
This commit is contained in:
parent
593666933d
commit
22a2d1de60
1 changed files with 10 additions and 6 deletions
|
@ -40,16 +40,20 @@
|
|||
(after! solaire-mode
|
||||
(add-hook 'twittering-mode-hook #'solaire-mode))
|
||||
|
||||
;; Custom modeline for twitter buffers
|
||||
(def-modeline! twitter
|
||||
(bar matches " %b " selection-info)
|
||||
())
|
||||
|
||||
;; Custom header-line for twitter buffers
|
||||
(defun +twitter|switch-mode-and-header-line ()
|
||||
(setq header-line-format (or (doom-modeline 'twitter) mode-line-format)
|
||||
(setq header-line-format mode-line-format
|
||||
mode-line-format nil))
|
||||
(add-hook 'twittering-mode-hook #'+twitter|switch-mode-and-header-line)
|
||||
|
||||
(cond ((featurep! :ui doom-modeline +new)
|
||||
(setq-hook! 'twittering-mode-hook mode-line-format-right nil))
|
||||
((featurep! :ui doom-modeline)
|
||||
(def-modeline! 'twitter
|
||||
'(bar matches " %b " selection-info)
|
||||
'())
|
||||
(add-hook! 'twittering-mode-hook (doom-set-modeline 'twitter))))
|
||||
|
||||
(define-key! twittering-mode-map
|
||||
"q" #'+twitter/quit
|
||||
"Q" #'+twitter/quit-all
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue