Skip to content

Instantly share code, notes, and snippets.

@QiangF
Last active April 6, 2026 02:17
Show Gist options
  • Select an option

  • Save QiangF/e9ab472b87cc27432355a988c5ed2c7a to your computer and use it in GitHub Desktop.

Select an option

Save QiangF/e9ab472b87cc27432355a988c5ed2c7a to your computer and use it in GitHub Desktop.
test exwm on termux
(require 'package)
(setq package-check-signature nil)
(package-initialize nil)
(require 'use-package)
(use-package compat)
(use-package xelb
:config
;; (setq xcb:keysyms:auto-update nil)
(setq xcb:connection-timeout 5))
(use-package exwm
:ensure nil
:demand t
:custom
(use-dialog-box nil "Disable dialog boxes since they are unusable in EXWM")
:bind (:map exwm-mode-map
("s-a" . exwmx-appconfig)
("s-f" . exwm-floating-toggle-floating)
("s-F" . exwm-layout-toggle-fullscreen)
("s-q" . exwm-input-send-next-key))
:hook (after-init . exwm-wm-mode)
:hook (exwm-init . exwm-autostart)
:init
(setq exwm-input-global-keys `(([?\s-r] . exwm-reset) ;Reset to line-mode
([M-tab] . (lambda () (interactive) (rofi-in-elisp "window")))
([?\s-&] . (lambda (cmd) ;; s-&: Launch application.
(interactive (list (read-shell-command "$ ")))
(start-process-shell-command cmd nil cmd)))
([?\s-o] . other-window)
([?\s-T] . exwm-input-toggle-keyboard)))
(setq exwm-input-prefix-keys '(?\s-c ?\M-c ?\C-c ?\C-x ?\C-u ?\C-h ?\M-x ?\M-` ?\M-& ?\M-:))
(setq exwm-input-simulation-keys
'(([?\C-b] . [left])
([?\M-b] . [C-left])
([?\C-f] . [right])
([?\M-f] . [C-right])
([?\C-p] . [up])
([?\C-n] . [down])
([?\C-a] . [home])
([?\C-e] . [end])
([?\C-d] . [delete])))
:config
(exwm-debug-mode 1)
(defun exwm-autostart ()
"Start some applications after exwm init."
(imbot-set-env)
;; Start some external apps
(shell-command "systemctl --user import-environment DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS exwm_enabled")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment