https://github.com/fuco1/xmonad-config
XMonad config powered by stack & cabal
https://github.com/fuco1/xmonad-config
Last synced: 4 months ago
JSON representation
XMonad config powered by stack & cabal
- Host: GitHub
- URL: https://github.com/fuco1/xmonad-config
- Owner: Fuco1
- Created: 2017-05-27T19:51:13.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-29T13:49:33.000Z (almost 2 years ago)
- Last Synced: 2025-01-18T00:57:47.368Z (over 1 year ago)
- Language: Haskell
- Size: 41 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* My xmonad configuration.
This is slowly turning my xmonad setup into a homebrew desktop environment. Most features are implemented directly by the xmonad instance while some of the more sophisticated stuff is in external libraries.
The =xmonad.hs= file contains only updates to the default config and tons of keybindings. Most of the interesting stuff is implemented as separate modules under the =MyXMonad= directory.
* Project setup
Because this project is getting increasingly complex with tons of dependencies which pollute the global space I have converted the entire project to a [[https://docs.haskellstack.org/][stack]] project. I include the packages =xmonad=, =xmonad-contrib= and =mpris= locally as I hack on them quite often. The definition for the =xmonad= executable is inside =my-xmonad.cabal=.
For the first time you have to manually "bootstrap" xmonad by using =stack install= from inside the =~/.xmonad= directory. Since version =0.13= xmonad supports custom rebuild script which is located in =build= file inside =~/.xmonad=. For me this just rebuilds the program with stack:
#+BEGIN_SRC sh :results output code :exports results
cat build
#+END_SRC
#+RESULTS:
#+BEGIN_SRC sh
#!/bin/sh
cd ~/.xmonad
stack --stack-yaml stack.yaml ghc -- --make xmonad.hs -i -fforce-recomp -main-is main -v0 -o $1
#+END_SRC
* Contents
- =Brightness.hs= has some code to set brightness levels.
- =Constants.hs= contains constants and settings, such as managehooks,
printers, prompts and so on.
- =IdoFile.hs= is a prompt mirroring =ido-find-file= behaviour from emacs
- =Interactive.hs= is a library providing Emacs-like interactive prompts
- =MPD.hs= is an interface to =mpd=. It has some custom prompts and lifts
some of =Network.MPD= actions into =X= monad. Might interest you if you
use =mpd=.
- =Mount.hs= is some magic for semi-automatic mounting of volumes. Very
experimental.
- =Mpris.hs= is an interface to [[https://specifications.freedesktop.org/mpris-spec/latest/][mpris2]] protocol, powered by my other
library: [[https://github.com/Fuco1/mpris][mpris]]. It has some interop with =MPD.hs= to allow for
seamless switching.
- =PulseAudio.hs= controls pulseaudio volume levels.
- =StackSetExtra.hs= contains some extra operations on window sets or
helpers to execute stuff on other screens in multiscreen setup.
- =Utils.hs= is just regular pure functions used to make some things a
bit more convenient
- =Workspaces.hs= contains utils to work with workspaces. Currently
only some facilities to make binding of keys less annoying (you can
bind an action to a set of workspaces at once, such as "view the
workspace =n=").
** xmobar
Also included is =xmobar= config, see the file =xmobarrc=.
** todo
- Add some code to detect changes in attached displays and
automatically reconfigure (I now have a small C utility called
[[https://github.com/Fuco1/xmonitor][xmonitor]] for this, maybe I will integrate it with xmonad/haskell one
day).
* Old configuration history
Before the project was converted I kept the configuration in my [[https://github.com/Fuco1/dotfiles][dotfiles]] repository.