diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 405a184..d424da1 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -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 - (shell-command-to-string "xkb-switch -p")) - "us") + (if (or + (not (executable-find "xkb-switch")) + (equal (string-trim + (shell-command-to-string "xkb-switch -p")) + "us")) (toggle-input-method) (my/run-in-background "xkb-switch -s us")))) @@ -7219,6 +7221,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)) diff --git a/Emacs.org b/Emacs.org index 34e941d..b66f604 100644 --- a/Emacs.org +++ b/Emacs.org @@ -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 - (shell-command-to-string "xkb-switch -p")) - "us") + (if (or + (not (executable-find "xkb-switch")) + (equal (string-trim + (shell-command-to-string "xkb-switch -p")) + "us")) (toggle-input-method) (my/run-in-background "xkb-switch -s us")))) #+end_src @@ -10022,6 +10024,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.