emacs: update telega.el

This commit is contained in:
Pavel Korytov 2024-01-18 12:16:05 +03:00
parent 19e54a894d
commit a4f823a5f7
2 changed files with 26 additions and 8 deletions

View file

@ -548,8 +548,10 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
:straight t
:commands (visual-fill-column-mode)
:config
(add-hook 'visual-fill-column-mode-hook
(lambda () (setq visual-fill-column-center-text t))))
;; How did it get here?
;; (add-hook 'visual-fill-column-mode-hook
;; (lambda () (setq visual-fill-column-center-text t)))
)
(use-package accent
:straight t
@ -850,6 +852,10 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
:config
(setq wakatime-ignore-exit-codes '(0 1 102 112))
(advice-add 'wakatime-init :after (lambda () (setq wakatime-cli-path (expand-file-name "~/bin/wakatime-cli"))))
(when (file-exists-p "~/.wakatime.cfg")
(setq wakatime-api-key
(string-trim
(shell-command-to-string "awk '/api-key/{print $NF}' ~/.wakatime.cfg"))))
;; (setq wakatime-cli-path (executable-find "wakatime"))
(global-wakatime-mode))
@ -7303,6 +7309,7 @@ base toot."
:background (my/color-value 'fg)))
:config
(setq telega-emoji-use-images nil)
(setq telega-chat-fill-column 80)
(general-define-key
:keymaps '(telega-root-mode-map telega-chat-mode-map)
:states '(normal)
@ -7342,13 +7349,15 @@ base toot."
(defun my/telega-chat-setup ()
(set (make-local-variable 'company-backends)
(append (list telega-emoji-company-backend
(append (list 'telega-company-emoji
'telega-company-username
'telega-company-hashtag
'telega-company-markdown-precode)
(when (telega-chat-bot-p telega-chatbuf--chat)
'(telega-company-botcmd))))
(company-mode 1))
(company-mode 1)
(setopt visual-fill-column-width
(+ telega-chat-fill-column 4)))
(add-hook 'telega-chat-mode-hook #'my/telega-chat-setup)
(defun my/telega-online-status ()

View file

@ -986,8 +986,10 @@ References:
:straight t
:commands (visual-fill-column-mode)
:config
(add-hook 'visual-fill-column-mode-hook
(lambda () (setq visual-fill-column-center-text t))))
;; How did it get here?
;; (add-hook 'visual-fill-column-mode-hook
;; (lambda () (setq visual-fill-column-center-text t)))
)
#+end_src
**** Accents
Input accented characters.
@ -1410,6 +1412,10 @@ Before I figure out how to package this for Guix:
:config
(setq wakatime-ignore-exit-codes '(0 1 102 112))
(advice-add 'wakatime-init :after (lambda () (setq wakatime-cli-path (expand-file-name "~/bin/wakatime-cli"))))
(when (file-exists-p "~/.wakatime.cfg")
(setq wakatime-api-key
(string-trim
(shell-command-to-string "awk '/api-key/{print $NF}' ~/.wakatime.cfg"))))
;; (setq wakatime-cli-path (executable-find "wakatime"))
(global-wakatime-mode))
#+end_src
@ -10054,6 +10060,7 @@ Or you can load up Element for a moment to see what the mention was, if that's e
:background (my/color-value 'fg)))
:config
(setq telega-emoji-use-images nil)
(setq telega-chat-fill-column 80)
(general-define-key
:keymaps '(telega-root-mode-map telega-chat-mode-map)
:states '(normal)
@ -10102,13 +10109,15 @@ Configuring company backends for the chat buffer, as recommended in the manual:
#+begin_src emacs-lisp
(defun my/telega-chat-setup ()
(set (make-local-variable 'company-backends)
(append (list telega-emoji-company-backend
(append (list 'telega-company-emoji
'telega-company-username
'telega-company-hashtag
'telega-company-markdown-precode)
(when (telega-chat-bot-p telega-chatbuf--chat)
'(telega-company-botcmd))))
(company-mode 1))
(company-mode 1)
(setopt visual-fill-column-width
(+ telega-chat-fill-column 4)))
(add-hook 'telega-chat-mode-hook #'my/telega-chat-setup)
#+end_src