emacs: termux fixes

This commit is contained in:
Pavel Korytov 2024-06-11 11:06:24 +03:00
parent 409f37817f
commit 5a15695859
2 changed files with 22 additions and 6 deletions

View file

@ -542,9 +542,11 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(interactive)
(if (derived-mode-p 'exwm-mode)
(my/run-in-background "xkb-switch -n")
(if (equal (string-trim
(if (or
(not (executable-find "xkb-switch"))
(equal (string-trim
(shell-command-to-string "xkb-switch -p"))
"us")
"us"))
(toggle-input-method)
(my/run-in-background "xkb-switch -s us"))))
@ -7192,6 +7194,10 @@ ENTRY is an instance of `elfeed-entry'."
:straight t
:defer t)
(unless (display-graphic-p)
(defun image-transforms-p () nil)
(setq image-types '(svg png gif tiff jpeg xpm xbm pbm)))
(defun my/mastodon-configure ()
(display-line-numbers-mode -1))

View file

@ -978,9 +978,11 @@ I also want to call =xkb-switch= in EXWM buffers with the same keybindig.
(interactive)
(if (derived-mode-p 'exwm-mode)
(my/run-in-background "xkb-switch -n")
(if (equal (string-trim
(if (or
(not (executable-find "xkb-switch"))
(equal (string-trim
(shell-command-to-string "xkb-switch -p"))
"us")
"us"))
(toggle-input-method)
(my/run-in-background "xkb-switch -s us"))))
#+end_src
@ -9981,6 +9983,14 @@ The default UI is rather rough, but Nicolas Rougier's [[https://github.com/rougi
:straight t
:defer t)
#+end_src
Compatibility with termux.
#+begin_src emacs-lisp
(unless (display-graphic-p)
(defun image-transforms-p () nil)
(setq image-types '(svg png gif tiff jpeg xpm xbm pbm)))
#+end_src
**** UI and keymaps
=display-line-numbers-mode= screws the UI for some reason.