This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+window-management/exwm/README.org

79 lines
3.4 KiB
Org Mode
Raw Normal View History

#+TITLE: EXWM layer
Add Emacs Window Manager (EXWM) Layer AKA SpacemacsOS (#3321) * Add Emacs Window Manager (EXWM) Layer The time has come of SpacemacsOS * set window manager name to EXWM * update copyright notice * start server when EXWM is active When using EXWM, Emacs should be ready to receive clients but the final choice should be the user's in their shell configuration. * respect Spacemacs naming conventions and layer organization * leave keyboard remapping to users * add EXWM states for Evil * add support for helm-exwm when helm is in use * use both exwm-randr and exwm-systemtray * set up workspaces to match displays by default * use ido-config instead of the deprecated workaround When using helm-exwm, its sources distinguish title and class automatically. It is only necessary to keep the buffer name updated when the window title changes. When using ido, rename differently for different applications. * add bindings for common X keys * use standard prefix commands where available Spacemacs already has prefix commands for controlling windows. These are directly available in exwm-state as well as in exwm-insert-state through leader * remove most keybindings as they are available directly in exwm-state * enable exwm directly in the layer configuration It is safe to enable it here as an existing window manager will simply fail with a warning. * add user-configurable variables for RandR and workspaces By default, create as many workspaces as there are displays and assign them in RandR order. * fix naming convention for variables * use helm for launching applications when possible * fix conditional helm-exwm leader keys * remove redundant function EXWM provides the equivalent * conform to naming convention for Spacemacs * separate prefix commands into those for major mode and global * remove all default bindings * improve readability * clean up bindings * remove obsolete comments Co-authored-by: M. Domenzain <luis.domenzain@parrot.com>
2021-04-19 20:53:59 +00:00
#+TAGS: layer|tool
[[file:img/exwm.jpg]]
* Table of Contents :TOC_5_gh:noexport:
- [[#description][Description]]
- [[#features][Features:]]
- [[#install][Install]]
- [[#system-tray-integratios][System Tray Integratios]]
- [[#xdg-autostart][XDG Autostart]]
- [[#key-bindings][Key bindings]]
Add Emacs Window Manager (EXWM) Layer AKA SpacemacsOS (#3321) * Add Emacs Window Manager (EXWM) Layer The time has come of SpacemacsOS * set window manager name to EXWM * update copyright notice * start server when EXWM is active When using EXWM, Emacs should be ready to receive clients but the final choice should be the user's in their shell configuration. * respect Spacemacs naming conventions and layer organization * leave keyboard remapping to users * add EXWM states for Evil * add support for helm-exwm when helm is in use * use both exwm-randr and exwm-systemtray * set up workspaces to match displays by default * use ido-config instead of the deprecated workaround When using helm-exwm, its sources distinguish title and class automatically. It is only necessary to keep the buffer name updated when the window title changes. When using ido, rename differently for different applications. * add bindings for common X keys * use standard prefix commands where available Spacemacs already has prefix commands for controlling windows. These are directly available in exwm-state as well as in exwm-insert-state through leader * remove most keybindings as they are available directly in exwm-state * enable exwm directly in the layer configuration It is safe to enable it here as an existing window manager will simply fail with a warning. * add user-configurable variables for RandR and workspaces By default, create as many workspaces as there are displays and assign them in RandR order. * fix naming convention for variables * use helm for launching applications when possible * fix conditional helm-exwm leader keys * remove redundant function EXWM provides the equivalent * conform to naming convention for Spacemacs * separate prefix commands into those for major mode and global * remove all default bindings * improve readability * clean up bindings * remove obsolete comments Co-authored-by: M. Domenzain <luis.domenzain@parrot.com>
2021-04-19 20:53:59 +00:00
2021-04-23 13:52:28 +00:00
* Description
Add Emacs Window Manager (EXWM) Layer AKA SpacemacsOS (#3321) * Add Emacs Window Manager (EXWM) Layer The time has come of SpacemacsOS * set window manager name to EXWM * update copyright notice * start server when EXWM is active When using EXWM, Emacs should be ready to receive clients but the final choice should be the user's in their shell configuration. * respect Spacemacs naming conventions and layer organization * leave keyboard remapping to users * add EXWM states for Evil * add support for helm-exwm when helm is in use * use both exwm-randr and exwm-systemtray * set up workspaces to match displays by default * use ido-config instead of the deprecated workaround When using helm-exwm, its sources distinguish title and class automatically. It is only necessary to keep the buffer name updated when the window title changes. When using ido, rename differently for different applications. * add bindings for common X keys * use standard prefix commands where available Spacemacs already has prefix commands for controlling windows. These are directly available in exwm-state as well as in exwm-insert-state through leader * remove most keybindings as they are available directly in exwm-state * enable exwm directly in the layer configuration It is safe to enable it here as an existing window manager will simply fail with a warning. * add user-configurable variables for RandR and workspaces By default, create as many workspaces as there are displays and assign them in RandR order. * fix naming convention for variables * use helm for launching applications when possible * fix conditional helm-exwm leader keys * remove redundant function EXWM provides the equivalent * conform to naming convention for Spacemacs * separate prefix commands into those for major mode and global * remove all default bindings * improve readability * clean up bindings * remove obsolete comments Co-authored-by: M. Domenzain <luis.domenzain@parrot.com>
2021-04-19 20:53:59 +00:00
Thanks to @ch11ng and his [[https://github.com/ch11ng/exwm][EXWM]] project we can now use Emacs as our window
manager, that means that you can spawn a Browser Window, or your music player,
or anything.
Add Emacs Window Manager (EXWM) Layer AKA SpacemacsOS (#3321) * Add Emacs Window Manager (EXWM) Layer The time has come of SpacemacsOS * set window manager name to EXWM * update copyright notice * start server when EXWM is active When using EXWM, Emacs should be ready to receive clients but the final choice should be the user's in their shell configuration. * respect Spacemacs naming conventions and layer organization * leave keyboard remapping to users * add EXWM states for Evil * add support for helm-exwm when helm is in use * use both exwm-randr and exwm-systemtray * set up workspaces to match displays by default * use ido-config instead of the deprecated workaround When using helm-exwm, its sources distinguish title and class automatically. It is only necessary to keep the buffer name updated when the window title changes. When using ido, rename differently for different applications. * add bindings for common X keys * use standard prefix commands where available Spacemacs already has prefix commands for controlling windows. These are directly available in exwm-state as well as in exwm-insert-state through leader * remove most keybindings as they are available directly in exwm-state * enable exwm directly in the layer configuration It is safe to enable it here as an existing window manager will simply fail with a warning. * add user-configurable variables for RandR and workspaces By default, create as many workspaces as there are displays and assign them in RandR order. * fix naming convention for variables * use helm for launching applications when possible * fix conditional helm-exwm leader keys * remove redundant function EXWM provides the equivalent * conform to naming convention for Spacemacs * separate prefix commands into those for major mode and global * remove all default bindings * improve readability * clean up bindings * remove obsolete comments Co-authored-by: M. Domenzain <luis.domenzain@parrot.com>
2021-04-19 20:53:59 +00:00
* Features:
- Support for using Emacs as window manager
Add Emacs Window Manager (EXWM) Layer AKA SpacemacsOS (#3321) * Add Emacs Window Manager (EXWM) Layer The time has come of SpacemacsOS * set window manager name to EXWM * update copyright notice * start server when EXWM is active When using EXWM, Emacs should be ready to receive clients but the final choice should be the user's in their shell configuration. * respect Spacemacs naming conventions and layer organization * leave keyboard remapping to users * add EXWM states for Evil * add support for helm-exwm when helm is in use * use both exwm-randr and exwm-systemtray * set up workspaces to match displays by default * use ido-config instead of the deprecated workaround When using helm-exwm, its sources distinguish title and class automatically. It is only necessary to keep the buffer name updated when the window title changes. When using ido, rename differently for different applications. * add bindings for common X keys * use standard prefix commands where available Spacemacs already has prefix commands for controlling windows. These are directly available in exwm-state as well as in exwm-insert-state through leader * remove most keybindings as they are available directly in exwm-state * enable exwm directly in the layer configuration It is safe to enable it here as an existing window manager will simply fail with a warning. * add user-configurable variables for RandR and workspaces By default, create as many workspaces as there are displays and assign them in RandR order. * fix naming convention for variables * use helm for launching applications when possible * fix conditional helm-exwm leader keys * remove redundant function EXWM provides the equivalent * conform to naming convention for Spacemacs * separate prefix commands into those for major mode and global * remove all default bindings * improve readability * clean up bindings * remove obsolete comments Co-authored-by: M. Domenzain <luis.domenzain@parrot.com>
2021-04-19 20:53:59 +00:00
2021-04-23 13:59:07 +00:00
* Install
To use =exwm= layer, add it to your =~/.spacemacs=.
The default layer variables are:
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'((exwm :variables exwm-enable-systray nil
exwm-autostart-xdg-applications nil
exwm-terminal-command "xterm"
exwm-locking-command nil
exwm-hide-tiling-modeline nil
exwm-workspace-switch-wrap t
exwm-randr-command nil)))
#+END_SRC
Please refer to [[https://github.com/ch11ng/exwm/wiki][EXWM Wiki]] for setting up display manager.
Add Emacs Window Manager (EXWM) Layer AKA SpacemacsOS (#3321) * Add Emacs Window Manager (EXWM) Layer The time has come of SpacemacsOS * set window manager name to EXWM * update copyright notice * start server when EXWM is active When using EXWM, Emacs should be ready to receive clients but the final choice should be the user's in their shell configuration. * respect Spacemacs naming conventions and layer organization * leave keyboard remapping to users * add EXWM states for Evil * add support for helm-exwm when helm is in use * use both exwm-randr and exwm-systemtray * set up workspaces to match displays by default * use ido-config instead of the deprecated workaround When using helm-exwm, its sources distinguish title and class automatically. It is only necessary to keep the buffer name updated when the window title changes. When using ido, rename differently for different applications. * add bindings for common X keys * use standard prefix commands where available Spacemacs already has prefix commands for controlling windows. These are directly available in exwm-state as well as in exwm-insert-state through leader * remove most keybindings as they are available directly in exwm-state * enable exwm directly in the layer configuration It is safe to enable it here as an existing window manager will simply fail with a warning. * add user-configurable variables for RandR and workspaces By default, create as many workspaces as there are displays and assign them in RandR order. * fix naming convention for variables * use helm for launching applications when possible * fix conditional helm-exwm leader keys * remove redundant function EXWM provides the equivalent * conform to naming convention for Spacemacs * separate prefix commands into those for major mode and global * remove all default bindings * improve readability * clean up bindings * remove obsolete comments Co-authored-by: M. Domenzain <luis.domenzain@parrot.com>
2021-04-19 20:53:59 +00:00
** System Tray Integratios
To enable system tray integration, set =exwm-enable-systray= to =t=.
** XDG Autostart
If =exwm-autostart-xdg-applications= is non-nil, =.desktop= files in
=$XDG_CONFIG_HOME/autostart= and =XDG_CONFIG_DIRS= will be used to run applications at
startup. (See [[https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html][Desktop Application Autostart Specification]] for details).
For the purpose of controlling whether an entry should be run under Emacs,
the =OnlyShowIn= and =NotShotIn= keys are checked for the string =EXWM=.
This is disabled per default.
2021-04-23 13:59:07 +00:00
* Key bindings
Add Emacs Window Manager (EXWM) Layer AKA SpacemacsOS (#3321) * Add Emacs Window Manager (EXWM) Layer The time has come of SpacemacsOS * set window manager name to EXWM * update copyright notice * start server when EXWM is active When using EXWM, Emacs should be ready to receive clients but the final choice should be the user's in their shell configuration. * respect Spacemacs naming conventions and layer organization * leave keyboard remapping to users * add EXWM states for Evil * add support for helm-exwm when helm is in use * use both exwm-randr and exwm-systemtray * set up workspaces to match displays by default * use ido-config instead of the deprecated workaround When using helm-exwm, its sources distinguish title and class automatically. It is only necessary to keep the buffer name updated when the window title changes. When using ido, rename differently for different applications. * add bindings for common X keys * use standard prefix commands where available Spacemacs already has prefix commands for controlling windows. These are directly available in exwm-state as well as in exwm-insert-state through leader * remove most keybindings as they are available directly in exwm-state * enable exwm directly in the layer configuration It is safe to enable it here as an existing window manager will simply fail with a warning. * add user-configurable variables for RandR and workspaces By default, create as many workspaces as there are displays and assign them in RandR order. * fix naming convention for variables * use helm for launching applications when possible * fix conditional helm-exwm leader keys * remove redundant function EXWM provides the equivalent * conform to naming convention for Spacemacs * separate prefix commands into those for major mode and global * remove all default bindings * improve readability * clean up bindings * remove obsolete comments Co-authored-by: M. Domenzain <luis.domenzain@parrot.com>
2021-04-19 20:53:59 +00:00
As other window managers the ~s~ or *Super* key (Windows Key) is the one that
is the prefix to every action. We'll use a lot of ~s~.
Some emacs keybindings are disabled in X Window, for example ~C-x~ and ~C-c~ are
disabled so that they can be used for Cutting and Copying text.
| Key binding | Description |
|-----------------------+----------------------------------------|
| ~M-m~ | Spacemacs Leader Key |
| ~C-q~ | Send next key pressed to the X window |
| ~s-i~ | Toggle between line mode and char mode |
| ~s-l~ | Lock Screen |
| ~s-r~ | Reset window state |
| ~s-w~ | Workspace Switch Menu |
| ~s-[1 2 3 ... 8 9 0]~ | Switch to workspace [1 2 3 ... 8 9 10] |
| ~s-TAB~ | Switch to last workspace |
| ~s-[~ / ~s-]~ | Switch to prev,next workspace |
| ~s-SPC~ | App Launcher |
| ~s-RET~ | Spawn terminal |
| ~s-:~ and ~s-;~ | Helm M-x (same as ~SPC :~) |
| ~s-u,U~ | Undo, Redo window configurations |
| ~s-b~ | Show all opened buffers |
| ~s-[h j k l]~ | Switch to window in the direction |
| ~s-[H J K L]~ | Move window to the direction |
| ~M-s-[h j k l]~ | Resize window toward the direction |