spacemacs/layers/+window-management/exwm/config.el

55 lines
2.0 KiB
EmacsLisp
Raw Permalink Normal View History

;;; config.el --- EXWM Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
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
(defvar exwm-terminal-command "xterm"
"Terminal command to run.")
(defvar exwm-locking-command nil
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
"Command to run when locking session")
(defvar exwm-hide-tiling-modeline nil
"Whether to hide modeline.")
;; (defvar exwm-leader-key nil
;; "Key to use for EXWM global commands")
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
(defvar exwm-enable-systray nil
"When non-nil, enable system tray integration for EXWM.")
(defvar exwm-autostart-xdg-applications nil
"When non-nil, autostart applications in $XDG_USER_HOME/autostart directory.")
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
(defvar exwm-workspace-switch-wrap t
"When non-nil, `exwm/exwm-workspace-next' and `exwm/exwm-workspace-prev' should wrap.")
(defvar exwm--randr-displays (thread-first
"xrandr --listmonitors | grep \"[0-9]\\+:\" | cut -d' ' -f2,6 "
(shell-command-to-string)
(string-trim)
(split-string ": "))
"List of defined monitors.")
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
(defvar exwm-randr-command nil
"`xrandr' command to set up displays prior to EXWM init.
For example,
\"xrandr --output VGA1 --left-of LVDS1 --auto\".")