2017-06-08 11:47:56 +02:00
|
|
|
;;; app/twitter/config.el -*- lexical-binding: t; -*-
|
2017-04-09 21:55:33 -04:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! twittering-mode
|
2017-04-09 21:55:33 -04:00
|
|
|
:commands twit
|
|
|
|
:config
|
2019-07-23 12:30:47 +02:00
|
|
|
(setq twittering-private-info-file
|
|
|
|
(expand-file-name "twittering-mode.gpg" doom-etc-dir)
|
2018-01-24 17:37:39 -05:00
|
|
|
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-06-18 02:26:05 +02:00
|
|
|
(set-popup-rule! "^\\*twittering-edit" :size 15 :ttl nil :quit nil :select t)
|
2018-01-24 17:37:39 -05:00
|
|
|
|
|
|
|
(defface twitter-divider
|
2018-05-14 20:35:26 +02:00
|
|
|
'((((background dark)) (:underline (:color "#141519")))
|
|
|
|
(((background light)) (:underline (:color "#d3d3d3"))))
|
2018-01-24 17:37:39 -05:00
|
|
|
"The vertical divider between tweets."
|
|
|
|
:group 'twittering-mode)
|
|
|
|
|
|
|
|
(add-hook 'doom-real-buffer-functions #'+twitter-buffer-p)
|
2018-05-14 18:34:18 +02:00
|
|
|
(when (featurep! :ui popup)
|
2019-07-23 12:30:47 +02:00
|
|
|
(setq twittering-pop-to-buffer-function #'+twitter-display-buffer-fn))
|
2018-01-24 17:37:39 -05:00
|
|
|
|
2018-07-25 18:27:21 +02:00
|
|
|
;; Custom header-line for twitter buffers
|
2019-07-28 14:52:59 +02:00
|
|
|
(add-hook! 'twittering-mode-hook
|
2019-07-23 12:30:47 +02:00
|
|
|
(defun +twitter-switch-mode-and-header-line-h ()
|
|
|
|
(setq header-line-format mode-line-format
|
|
|
|
mode-line-format nil)))
|
2018-07-25 18:27:21 +02:00
|
|
|
|
2018-07-25 18:27:38 +02:00
|
|
|
;; `epa--decode-coding-string' isn't defined in later versions of Emacs 27
|
|
|
|
(unless (fboundp 'epa--decode-coding-string)
|
|
|
|
(defalias 'epa--decode-coding-string #'decode-coding-string))
|
|
|
|
|
2018-06-03 15:46:00 +02:00
|
|
|
(define-key! twittering-mode-map
|
|
|
|
"q" #'+twitter/quit
|
|
|
|
"Q" #'+twitter/quit-all
|
|
|
|
[remap twittering-kill-buffer] #'+twitter/quit
|
|
|
|
[remap delete-window] #'+twitter/quit
|
|
|
|
[remap +workspace/close-window-or-workspace] #'+twitter/quit)
|
2019-04-21 19:59:44 -04:00
|
|
|
(when (featurep! :editor evil +everywhere)
|
2018-06-03 15:46:00 +02:00
|
|
|
(define-key! twittering-mode-map
|
|
|
|
[remap evil-window-delete] #'+twitter/quit
|
|
|
|
"f" #'twittering-favorite
|
|
|
|
"F" #'twittering-unfavorite
|
|
|
|
"\C-f" #'twittering-follow
|
|
|
|
"\C-F" #'twittering-unfollow
|
|
|
|
"d" #'twittering-delete-status
|
|
|
|
"r" #'twittering-retweet
|
|
|
|
"R" #'twittering-toggle-or-retrieve-replied-statuses
|
|
|
|
"o" #'twittering-update-status-interactive
|
|
|
|
"O" #'+twitter/ace-link
|
|
|
|
"/" #'twittering-search
|
|
|
|
"J" #'twittering-goto-next-status
|
|
|
|
"K" #'twittering-goto-previous-status
|
|
|
|
"g" nil
|
|
|
|
"gg" #'twittering-goto-first-status
|
|
|
|
"G" #'twittering-goto-last-status
|
|
|
|
"gj" #'twittering-goto-next-status-of-user
|
|
|
|
"gk" #'twittering-goto-previous-status-of-user)))
|