Hot answers tagged

6

Long answer: There are three modes* in EXWM. I. Sending all the keys to the apps except the global bindings (for e.g. this is a global (exwm-input-set-key (kbd "s-c") #'list-processes). EXWM calls this char-mode II. Sending all the keys to the apps with some simulations. EXWM calls this line-mode. You can define simulations like. (exwm-input-set-...


4

I do not think there's a built-in way to do this, but you could add the code below to your init-file. (defvar exwm-workspace-previous-index nil "The previous active workspace index.") (defun exwm-workspace--current-to-previous-index (_x) (setq exwm-workspace-previous-index exwm-workspace-current-index)) (advice-add 'exwm-workspace-switch :before #'exwm-...


2

Thanks to the owner of exwm this is no longer an issue. See this issue.


2

You can use exwm-manage-finish-hook to perform functions when a window has loaded. Combine that with exwm-class-name and exwm-workspace-move-window and you could do something like this: (require 'subr-x) ;; Because of when-let (defvar exwm-workspace-window-assignments '(("Firefox" . 2) ("Thunderbird" . 3)) "An alist of window classes and which ...


2

Answered my own question. In case anyone might encounter this issue in the future, here's how I fixed it: (require 'exwm-randr) (setq exwm-randr-workspace-output-plist '(0 "HDMI-2" 1 "eDP-1")) (add-hook 'exwm-randr-screen-change-hook (lambda () (start-process-shell-command "xrandr" nil "xrandr --output HDMI-2 --output eDP-1 --auto"))...


2

The reason your emacs bindings don't work in firefox is because they are not bound through EXWM. EXWM is the medium emacs uses to communicate to x-windows so you need to set the bindings through it. EXWM by default enables only a subset of your emacs bindings are available in x windows (and only in line-mode). Like in Emacs, there are two kinds of bindings ...


2

The best solution is simply to hit C-c C-k (exwm-input-release-keyboard) which puts the X-window containing the inner emacs into char-mode. Then, when that window has focus, almost all keyboard input, including C-x C-c is passed to the inner emacs. Hit s-r (exwm-reset) to get the window back to normal line-mode.


2

The problem is that any commands you execute such as C-x C-c will be captured by the Emacs instance running EXWM. The first thing to try - which did not work for OP - is to execute M-x exwm-input-grab-keyboard with the secondary Emacs window selected. This will set the window to char mode, and send the keys you type directly to that window. So C-x C-c will ...


1

So it seems the answer was already in the docs on github. We regard fullscreen as a third layout mode here. An X window in either tiling or floating mode can be made fullscreen explicitly by invoking C-c C-f.


1

I look for the existence of a window manager using wmctrl -m. If that command outputs anything on stderr I assume there is no window manager and run the EXWM startup. (when (get-buffer "*window-manager*") (kill-buffer "*window-manager*")) (when (get-buffer "*window-manager-error*") (kill-buffer "*window-manager-error*&...


1

Try this instead: (defun my-new-exwm-launch (command) "Doc-string." (start-process-shell-command command nil command)) (exwm-input-set-key (kbd "s-g") (lambda () (interactive) (my-new-exwm-launch "gkamus"))) Based upon a comment from the O.P., here is a different example using a previous answer written by @sds at https://emacs.stackexchange.com/a/...


1

You need to create /usr/share/xsessions/emacs.desktop with the following content: [Desktop Entry] Name=EmacsWM Comment=Emacs Window Manager Exec=emacs Type=Application After that you should be able to select it from that menu.


1

I'm reading the guide and seems it's also possible to prefix all the usual shortcuts with C-c C-q (exwm-input-send-next-key) without switching to char-mode. So instead of C-a/C-c/C-v use C-c-q-a/C-c-q-c/C-c-q-v.


1

The command to do that is exwm-workspace-switch-to-buffer and it requires exwm-layout-show-all-buffers to be nil. With an appropriate font-face or theme workspaces with X-windows will be highlighted.


Only top voted, non community-wiki answers of a minimum length are eligible