Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Stack/cabal setup for testing xmonad* and configurations

License

NotificationsYou must be signed in to change notification settings

xmonad/xmonad-testing

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.

XMonad and Custom Build Scripts

Starting with XMonad 0.13 you can customize how your configurationfile is compiled. Want to usestack? How aboutcabal? Noproblem! Here's what you do:

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

    Need a good default configuration file? Tryexample-config.hs.

  2. Create an executable file namedbuild in 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, thebuild script 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 thebuild-scripts directory 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.

Testing Contributions and Configs

Building All Dependencies with a Specific Configuration File

When using eitherstack orcabal, theX11 package needs to beconfigured first:

$ cd x11$ autoreconf$ cd ..

If usingstack, building everything is quite easy:

$ stack setup$ stack build

If using a recent enoughcabal, building everything is even easier:

$ cabal build

If you'd like to change which configuration file is being used for thebuild, just replaceconfig.hs with your own file.

Testing in Isolation

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 -h

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 forxmonad-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 ..
  3. Create a configuration file that will test the changes in thepull request. Ideally you will create a config file in theconfigs directory and symlink it toconfig.hs. The onlything that actually matters though is that the configuration endsup in theconfig.hs file at the root ofxmonad-testing.

  4. Build xmonad with your changes. Use the build instructionsabove. You can build withstack orcabal.

  5. Launchxmonad in a new xorg server using theTesting inIsolation instructions above.

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

About

Stack/cabal setup for testing xmonad* and configurations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published

Contributors9


[8]ページ先頭

©2009-2025 Movatter.jp