2017-06-08 11:47:56 +02:00
|
|
|
;;; app/twitter/config.el -*- lexical-binding: t; -*-
|
2017-04-09 21:55:33 -04:00
|
|
|
|
|
|
|
(def-package! twittering-mode
|
|
|
|
:commands twit
|
|
|
|
:config
|
2018-01-24 17:37:39 -05:00
|
|
|
(setq twittering-private-info-file (expand-file-name "twittering-mode.gpg" doom-etc-dir)
|
|
|
|
twittering-use-master-password t
|
|
|
|
twittering-request-confirmation-on-posting t
|
|
|
|
;; twittering-icon-mode t
|
2017-04-09 21:55:33 -04:00
|
|
|
;; twittering-use-icon-storage t
|
|
|
|
;; twittering-icon-storage-file (concat doom-cache-dir "twittering-mode-icons.gz")
|
|
|
|
;; twittering-convert-fix-size 12
|
|
|
|
twittering-timeline-header ""
|
|
|
|
twittering-timeline-footer ""
|
|
|
|
twittering-edit-skeleton 'inherit-any
|
2018-01-24 17:37:39 -05:00
|
|
|
twittering-status-format "%FACE[font-lock-function-name-face]{ @%s} %FACE[italic]{%@} %FACE[error]{%FIELD-IF-NONZERO[❤ %d]{favorite_count}} %FACE[warning]{%FIELD-IF-NONZERO[↺ %d]{retweet_count}}
|
|
|
|
%FOLD[ ]{%FILL{%t}%QT{
|
|
|
|
%FOLD[ ]{%FACE[font-lock-function-name-face]{@%s}\t%FACE[shadow]{%@}
|
|
|
|
%FOLD[ ]{%FILL{%t}}
|
|
|
|
}}}
|
|
|
|
|
|
|
|
%FACE[twitter-divider]{ }
|
|
|
|
"
|
|
|
|
;; twittering-timeline-spec-alias '()
|
2017-04-09 21:55:33 -04:00
|
|
|
twittering-initial-timeline-spec-string
|
|
|
|
'(":home" ":mentions" ":direct_messages"))
|
|
|
|
|
2018-01-24 17:37:39 -05:00
|
|
|
(set! :popup "^\\*twittering-edit" nil '((transient) (quit) (select . t) (modeline . minimal)))
|
|
|
|
|
|
|
|
(defface twitter-divider
|
|
|
|
`((t (:underline (:color ,(doom-darken 'vertical-bar 0.2)))))
|
|
|
|
"The vertical divider between tweets."
|
|
|
|
:group 'twittering-mode)
|
|
|
|
|
|
|
|
(add-hook 'doom-real-buffer-functions #'+twitter-buffer-p)
|
|
|
|
(when (featurep! :feature popup)
|
|
|
|
(setq twittering-pop-to-buffer-function #'+twitter-display-buffer))
|
|
|
|
|
|
|
|
(after! solaire-mode
|
|
|
|
(add-hook 'twittering-mode-hook #'solaire-mode))
|
|
|
|
|
|
|
|
;; Custom modeline for twitter buffers
|
|
|
|
(def-modeline! twitter
|
|
|
|
(bar matches " %b " selection-info)
|
|
|
|
())
|
|
|
|
|
2017-04-09 21:55:33 -04:00
|
|
|
(add-hook! twittering-mode
|
2017-04-25 18:25:54 -04:00
|
|
|
(setq header-line-format (or (doom-modeline 'twitter) mode-line-format)
|
2017-04-09 21:55:33 -04:00
|
|
|
mode-line-format nil))
|
|
|
|
|
|
|
|
(map! :map twittering-mode-map
|
2017-04-17 02:17:10 -04:00
|
|
|
[remap twittering-kill-buffer] #'+twitter/quit
|
|
|
|
"Q" #'+twitter/quit-all
|
|
|
|
"o" #'ace-link-addr
|
|
|
|
"J" #'twittering-goto-next-status
|
2018-01-24 17:37:39 -05:00
|
|
|
"K" #'twittering-goto-previous-status
|
|
|
|
(:when (featurep! :feature evil)
|
|
|
|
"j" #'evil-next-visual-line
|
|
|
|
"k" #'evil-previous-visual-line
|
|
|
|
"h" #'evil-window-left
|
|
|
|
"l" #'evil-window-right)))
|