Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork20
Stack/cabal setup for testing xmonad* and configurations
License
xmonad/xmonad-testing
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository is useful for testing new features introduced intoXMonad (and xmonad-contrib) as well as troubleshootingnew/existing configurations. It is also an example of how to buildyour own XMonad usingstack orcabal.
Starting with XMonad 0.13 you can customize how your configurationfile is compiled. Want to usestack? How aboutcabal? Noproblem! Here's what you do:
Set up a directory (or use
~/.config/xmonador~/.xmonad)where your source code can live. Most build tools require thatyou also have a*.cabalfile. If you need inspiration youcan use thexmonad-testing.cabalfile from this repository.Need a good default configuration file? Try
example-config.hs.Create an executable file named
buildin the directory youchose in step 1. Use your favorite scripting language or shellflavor to execute your preferred build tool. (Don't forget tochmod +x, it needs to be executable.)When called, the
buildscript will be given a singlecommand-line argument, the name of the output file it shouldproduce. This should be the executable generated by buildingyour source code.There are example scripts in the
build-scriptsdirectory ofthis repository that show how to use either stack and cabal tobuild your source code.
Now, when you runxmonad --recompile XMonad will use your buildscript instead of using GHC directly.
NOTE: Keep in mind that if you are using abuild script XMonad mighttake longer to start. This is because XMonad invokes your script whenit starts and needs to wait for it to finish, and it can't test forrecompilation needed because it doesn't know what yourbuild scriptwill do. You may want to consider exiting the script early if thesource code hasn't changed since the last time it was compiled.
When using eitherstack orcabal, theX11 package needs to beconfigured first:
$ cd x11$ autoreconf$ cd ..If usingstack, building everything is quite easy:
$ stack setup$ stack buildIf using a recent enoughcabal, building everything is even easier:
$ cabal buildIf you'd like to change which configuration file is being used for thebuild, just replaceconfig.hs with your own file.
Don't want to replace your current window manager just to play withXMonad or experiment with your configuration? No problem.
Build XMonad with your configuration file of choice using thedirection above and then use the following script to run your customXMonad in another xorg session usingXephyr:
$ bin/run-in-xephyr.sh -hClone this repository:
$ git clone --recursive https://github.com/xmonad/xmonad-testing.git$ cd xmonad-testingBring in the changes from the pull request:
For this example we will use an example pull request for
xmonad-contrib. The steps are the same forxmonad.At the bottom of the pull request page there should be some textthat looks like:
Add more commits by pushing to the BRANCH branch on REPO.
Here I will be usingBRANCH andREPO as placeholders.Replace them in the following commands as necessary.
You will need the URL forREPO, so either click on that linkand copy the URL or use whatever support your browser gives youfor copying the URL of a link. Below I will refer to the URL forREPO asREPO_URL.
$ cd xmonad-contrib$ git checkout -b BRANCH master$ git pull REPO_URL BRANCH$ cd ..Create a configuration file that will test the changes in thepull request. Ideally you will create a config file in the
configsdirectory and symlink it toconfig.hs. The onlything that actually matters though is that the configuration endsup in theconfig.hsfile at the root ofxmonad-testing.Build xmonad with your changes. Use the build instructionsabove. You can build with
stackorcabal.Launch
xmonadin a new xorg server using theTesting inIsolation instructions above.Add a comment to the pull request detailing your experiencetesting the changes.
About
Stack/cabal setup for testing xmonad* and configurations
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Contributors9
Uh oh!
There was an error while loading.Please reload this page.