Git Product home page Git Product logo

xmonad-testing's Introduction

XMonad Testing Repository

This repository is useful for testing new features introduced into XMonad (and xmonad-contrib) as well as troubleshooting new/existing configurations. It is also an example of how to build your own XMonad using stack or cabal.

XMonad and Custom Build Scripts

Starting with XMonad 0.13 you can customize how your configuration file is compiled. Want to use stack? How about cabal? No problem! Here's what you do:

  1. Set up a directory (or use ~/.xmonad) where your source code can live. Most build tools require that you also have a *.cabal file. If you need inspiration you can use the xmonad-testing.cabal file from this repository.

    Need a good default configuration file? Try example-config.hs.

  2. Create an executable file named ~/.xmonad/build. Use your favorite scripting language or shell flavor to execute your preferred build tool. (Don't for get to chmod +x, it needs to be executable.)

    When called, the build script will be given a single command-line argument, the name of the output file it should produce. This should be the executable generated by building your source code.

    There are example scripts in the build-scripts directory of this repository that show how to use either stack and cabal to build your source code.

Now, when you run xmonad --recompile XMonad will use your build script instead of using GHC directly.

NOTE: Keep in mind that if you are using a build script XMonad might take longer to start. This is because XMonad invokes your script when it starts and needs to wait for it to finish. You may want to consider exiting the script early if the source code hasn't changed since the last time it was compiled.

Testing Contributions and Configs

Building All Dependencies with a Specific Configuration File

Using stack, building everything is quite easy:

$ stack setup
$ stack build

Using a recent enough cabal, building everything is even easier:

$ cabal new-build

If you'd like to change which configuration file is being used for the build, just replace config.hs with your own file.

Testing in Isolation

Don't want to replace your current window manager just to play with XMonad or experiment with your configuration? No problem.

Build XMonad with your configuration file of choice using the direction above and then use the following script to run your custom XMonad in another xorg session using Xephyr:

$ bin/run-in-xephyr.sh

Testing Someone Else's Pull Request

  1. Clone this repository:

    $ git clone --recursive https://github.com/xmonad/xmonad-testing.git $ cd xmonad-testing

  2. Bring 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 for xmonad.

    At the bottom of the pull request page there should be some text that looks like:

    Add more commits by pushing to the BRANCH branch on REPO.

    Here I will be using BRANCH and REPO as placeholders. Replace them in the following commands as necessary.

    You will need the URL for REPO, so either click on that link and copy the URL or use whatever support your browser gives you for copying the URL of a link. Below I will refer to the URL for REPO as REPO_URL.

    $ cd xmonad-contrib $ git checkout -b BRANCH master $ git pull REPO_URL BRANCH $ cd ..

  3. Create a configuration file that will test the changes in the pull request. Ideally you will create a config file in the configs directory and symlink it to config.hs. The only thing that actually matters though is that the configuration ends up in the config.hs file at the root of xmonad-testing.

  4. Build xmonad with your changes. Use the build instructions above. You can build with stack or cabal.

  5. Launch xmonad in a new xorg server using the Testing in Isolation instructions above.

  6. Add a comment to the pull request detailing your experience testing the changes.

xmonad-testing's People

Contributors

pjones avatar hvr avatar

Watchers

James Cloos avatar Leif Grele avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.