mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
emacs: telega.el on termux
This commit is contained in:
parent
eb9afec852
commit
15aa993b83
2 changed files with 41 additions and 23 deletions
|
|
@ -786,7 +786,8 @@ Obeys `widen-automatically', which see."
|
|||
:infix "g"
|
||||
"g" #'counsel-mark-ring
|
||||
"G" #'my/counsel-global-mark-ring
|
||||
"C" #'my/mark-ring-clear)
|
||||
"C" #'my/mark-ring-clear
|
||||
"m" #'my/push-mark-no-activate)
|
||||
|
||||
(general-define-key
|
||||
:keymaps 'global
|
||||
|
|
@ -1241,7 +1242,9 @@ Obeys `widen-automatically', which see."
|
|||
(when current-prefix-arg
|
||||
(my/regenerate-desktop)))
|
||||
|
||||
(my/switch-theme 'ef-duo-light)
|
||||
(if my/is-termux
|
||||
(my/switch-theme 'modus-operandi-tinted)
|
||||
(my/switch-theme 'ef-duo-light))
|
||||
|
||||
(with-eval-after-load 'transient
|
||||
(my/use-colors
|
||||
|
|
@ -5050,11 +5053,13 @@ KEYS is a list of cons cells like (<label> . <time>)."
|
|||
"\n"))
|
||||
|
||||
(setq my/org-config-files
|
||||
'("/home/pavel/Emacs.org"
|
||||
"/home/pavel/Desktop.org"
|
||||
"/home/pavel/Console.org"
|
||||
"/home/pavel/Guix.org"
|
||||
"/home/pavel/Mail.org"))
|
||||
(mapcar
|
||||
#'expand-file-name
|
||||
'("~/Emacs.org"
|
||||
"~/Desktop.org"
|
||||
"~/Console.org"
|
||||
"~/Guix.org"
|
||||
"~/Mail.org")))
|
||||
|
||||
(add-hook 'org-mode-hook
|
||||
(lambda ()
|
||||
|
|
@ -7511,7 +7516,7 @@ base toot."
|
|||
|
||||
(use-package telega
|
||||
:straight t
|
||||
:if (not (or my/remote-server my/is-termux))
|
||||
:if (not (or my/remote-server))
|
||||
:commands (telega)
|
||||
:init
|
||||
(my-leader-def "a l" (my/command-in-persp "telega" "telega" 3 (telega)))
|
||||
|
|
@ -7543,8 +7548,10 @@ base toot."
|
|||
(defun my/telega-server-build ()
|
||||
(interactive)
|
||||
(setq telega-server-libs-prefix
|
||||
(string-trim
|
||||
(shell-command-to-string "guix build tdlib")))
|
||||
(if (executable-find "guix")
|
||||
(string-trim
|
||||
(shell-command-to-string "guix build tdlib"))
|
||||
(expand-file-name "~/bin/td/build/res/usr/local")))
|
||||
(telega-server-build "CC=gcc"))
|
||||
|
||||
(add-hook 'telega-load-hook #'telega-mode-line-mode)
|
||||
|
|
@ -7562,6 +7569,7 @@ base toot."
|
|||
"]"))
|
||||
|
||||
(defun my/telega-chat-setup ()
|
||||
(interactive)
|
||||
(set (make-local-variable 'company-backends)
|
||||
(append (list 'telega-company-emoji
|
||||
'telega-company-username
|
||||
|
|
@ -7571,7 +7579,8 @@ base toot."
|
|||
'(telega-company-botcmd))))
|
||||
(company-mode 1)
|
||||
(setopt visual-fill-column-width
|
||||
(+ telega-chat-fill-column 4))
|
||||
(+ telega-chat-fill-column
|
||||
(if (display-graphic-p) 4 5)))
|
||||
(setq-local split-width-threshold 1))
|
||||
(add-hook 'telega-chat-mode-hook #'my/telega-chat-setup)
|
||||
|
||||
|
|
|
|||
33
Emacs.org
33
Emacs.org
|
|
@ -1345,7 +1345,8 @@ Keybindings:
|
|||
:infix "g"
|
||||
"g" #'counsel-mark-ring
|
||||
"G" #'my/counsel-global-mark-ring
|
||||
"C" #'my/mark-ring-clear)
|
||||
"C" #'my/mark-ring-clear
|
||||
"m" #'my/push-mark-no-activate)
|
||||
|
||||
(general-define-key
|
||||
:keymaps 'global
|
||||
|
|
@ -1990,7 +1991,9 @@ The built-in =load-theme= does not deactivate the previous theme, so here's a fu
|
|||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(my/switch-theme 'ef-duo-light)
|
||||
(if my/is-termux
|
||||
(my/switch-theme 'modus-operandi-tinted)
|
||||
(my/switch-theme 'ef-duo-light))
|
||||
#+end_src
|
||||
**** Extending current theme
|
||||
Colors that aren't set in themes.
|
||||
|
|
@ -6999,11 +7002,13 @@ One note is that by default running these commands will require the user to conf
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(setq my/org-config-files
|
||||
'("/home/pavel/Emacs.org"
|
||||
"/home/pavel/Desktop.org"
|
||||
"/home/pavel/Console.org"
|
||||
"/home/pavel/Guix.org"
|
||||
"/home/pavel/Mail.org"))
|
||||
(mapcar
|
||||
#'expand-file-name
|
||||
'("~/Emacs.org"
|
||||
"~/Desktop.org"
|
||||
"~/Console.org"
|
||||
"~/Guix.org"
|
||||
"~/Mail.org")))
|
||||
|
||||
(add-hook 'org-mode-hook
|
||||
(lambda ()
|
||||
|
|
@ -10356,7 +10361,7 @@ Or you can load up Element for a moment to see what the mention was, if that's e
|
|||
#+begin_src emacs-lisp
|
||||
(use-package telega
|
||||
:straight t
|
||||
:if (not (or my/remote-server my/is-termux))
|
||||
:if (not (or my/remote-server))
|
||||
:commands (telega)
|
||||
:init
|
||||
(my-leader-def "a l" (my/command-in-persp "telega" "telega" 3 (telega)))
|
||||
|
|
@ -10386,13 +10391,15 @@ Or you can load up Element for a moment to see what the mention was, if that's e
|
|||
telega-webpage-mode 3 "telega"))
|
||||
#+end_src
|
||||
|
||||
Building =telega-server= can create problems. It requires the latest version of =tdlib=, which isn't available anywhere, but I can inherit the Guix package definition.
|
||||
Building =telega-server= can create problems. On Guix I can use the Guix package definition, on termux just build manually.
|
||||
#+begin_src emacs-lisp
|
||||
(defun my/telega-server-build ()
|
||||
(interactive)
|
||||
(setq telega-server-libs-prefix
|
||||
(string-trim
|
||||
(shell-command-to-string "guix build tdlib")))
|
||||
(if (executable-find "guix")
|
||||
(string-trim
|
||||
(shell-command-to-string "guix build tdlib"))
|
||||
(expand-file-name "~/bin/td/build/res/usr/local")))
|
||||
(telega-server-build "CC=gcc"))
|
||||
#+end_src
|
||||
|
||||
|
|
@ -10416,6 +10423,7 @@ Setting up the modeline. The default mode string doesn't look great with my othe
|
|||
Configuring company backends for the chat buffer, as recommended in the manual:
|
||||
#+begin_src emacs-lisp
|
||||
(defun my/telega-chat-setup ()
|
||||
(interactive)
|
||||
(set (make-local-variable 'company-backends)
|
||||
(append (list 'telega-company-emoji
|
||||
'telega-company-username
|
||||
|
|
@ -10425,7 +10433,8 @@ Configuring company backends for the chat buffer, as recommended in the manual:
|
|||
'(telega-company-botcmd))))
|
||||
(company-mode 1)
|
||||
(setopt visual-fill-column-width
|
||||
(+ telega-chat-fill-column 4))
|
||||
(+ telega-chat-fill-column
|
||||
(if (display-graphic-p) 4 5)))
|
||||
(setq-local split-width-threshold 1))
|
||||
(add-hook 'telega-chat-mode-hook #'my/telega-chat-setup)
|
||||
#+end_src
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue