3.5 KiB
3.5 KiB
xmonad-custom
: Custom modules for my xmonad configuration
Usage
Install via stack similar as xmonad and xmonad-contrib,
see e.g. [brianbuccola][this guide].
Write xmonad.hs
as glue code to import modules.
Goals of this setup
Design
- Keybindings optimized for neo keyboard layout:
- positional keybindings taken from default XMonad config,
e.g. now
n
andd
are used to rotate through workspaces, as they match the positions ofj
andö
in the standard qwertz layout. - mnemonic keybindings (partially) remapped to avoid conflicts,
e.g.
r
for running programs,x
for killing windows
- positional keybindings taken from default XMonad config,
e.g. now
Super
andAlt_L
as main and secondary modifier.- 20 numbered workspaces, reachable by
<Super>-1
, ...,<Super>-0
and<Alt_L>-1
, ...,<Alt_L>-0
. Moving to these workspaces with additional<Shift>
. - Workspaces associated to programs, reachably my
<Alt>
and mnemonic keys for the programs:- launching programs automatically when opening workspace
Prevent launching with
<Control>
- binding programs to these workspaces (to be implemented)
- launching programs automatically when opening workspace
Prevent launching with
- Many keybindings for custom menus lanuching (custom) scripts,
e.g.
u
for stuff associated to my [uni-setup][University Setup] or<Esc>
for reboot, hibernate, suspend etc. (still many missing) - Use polybar as status bar
Implementational
- Use ezconfig for all bindings to simplify code.
- Use submap for menus.
- separation into multiple modules to clean up the main
xmonad.hs
config file and increase modularization/reusability. E.g., it is now trivial to remove university setup keys or bind the submenu to another key. - Deduplication as strong as reasonably possible. This means a single place where all modifier keys are defined etc. Also ensures that changing modifier layout is as easy as possible
- Reasonably separate code from real configuration
- Reduce
xmonad.hs
to gluing code / selection of loaded modules. In particular, no configuration (read: key definitions) should be present there - Pack modules into
.cabal
package. This ensures thatxmonad-custom
can be installed just asxmonad
orxmonad-contrib
(e.g. via Stack) andxmonad.hs
can conveniently import all my stuff. In particular, no [build-script][custom build script] is needed to buildxmonad
. - Use xmonad-dbus for communication with PolyBar.
Non-goals
- Write a library that is directly usable for others. This is for personal use, although you are of course invited to reuse/adapt/fork this
- Complete separation of code and configuration.
This means that the modules do directly contain my keybindings.
This also means that the source code of this package itself must me modified for
customization (in contrast to
xmonad
itself, e.g.) I went with this option since complete separation is just too ugly to implement and somewhat defies the purpose ofxmonad
not using configuration files but Haskell code. Also I believe that users ofxmonad
will want to customize more than just my keybindings, so more code has to be written anyways.