28 Commits

Author SHA1 Message Date
Tomas Janousek
6dc1e319d1 Make layouts Typeable
This makes it possible to query the current layout state, which might be
useful to e.g. show the current X.L.WorkspaceDir in xmobar.

Example of use (assuming myLayout is the layout that is assigned to
layoutHook):

    asMyLayout (Layout l) = (`asTypeOf` myLayout) <$> cast l

    …

    layout <- asMyLayout . W.layout . W.workspace . W.current <$> gets windowset
    case layout of
        Just (WorkspaceDir d) -> …

Unfortunately this requires adding the Typeable constraint to a bunch of
classes in xmonad-contrib, so we need to merge those changes there first
(fortunately it doesn't need to go in lockstep, adding a Typeable
constraint to those classes in xmonad-contrib is harmless).
2020-11-04 15:28:04 +00:00
Peter Simons
c54e7088f0
Merge pull request #167 from mgsloan/log-recompilation-info
Log information about xmonad compile + avoid unnecessary recompile
2018-08-20 13:49:10 +02:00
Peter Simons
425c3c0872 Core: derive 'MonadFail X' instance for GHC 8.6.x and beyond
A side effect of that change is that our code no longer compiles with GHC
versions prior to 8.0.x. We could work around that, no doubt, but the resulting
code would require CPP and Cabal flags and whatnot. It feels more reasonable to
just require a moderately recent compiler instead of going through all that
trouble.
2018-08-20 10:40:03 +02:00
Peter Simons
4ef9c12d13
Merge pull request #99 from gliptak/warnings1
Cleanup build warnings
2018-07-30 12:40:09 +02:00
Peter Simons
d6705fd595
Merge pull request #128 from madnight/patch-1
Remove unused CPP extension from Core.hs
2018-07-30 12:38:16 +02:00
Michael Sloan
b6d92b4e38 Log information about xmonad compile + avoid unnecessary recompile
Particularly with the addition of build scripts, it can be tricky to figure out
what XMonad is doing when attempting recompilation.  This makes it clearer by
adding some logging.

Due to this logging, I noticed that the lag of xmonad start was because it was
always recompiling!  When I startup my computer, I do not want it to delay
rebuilding my window manager. This also fixes that issue such that it only
recompiles XMonad if it is going to reinvoke due to getProgName not being the
expected string.
2018-05-09 18:41:46 -07:00
aplaice
d216e95f97
Fix typo Utils -> Util
This is extremely minor, but it results in haddock incorrectly
hyperlinking XMonad.Utils.ExtensibleState at
https://hackage.haskell.org/package/xmonad-0.13/docs/XMonad-Core.html#v:extensibleState
2018-04-11 23:46:11 +02:00
Brent Yorgey
63d6a66133
Merge branch 'master' into master 2018-03-21 14:52:50 -05:00
Michiel Derhaeg
c3cb4ad65f forgot to remote windows specific code 2018-03-18 00:08:03 +01:00
Michiel Derhaeg
126f891d11 restored compatability with GHC versions prior to 8.0.1 2018-03-17 23:23:11 +01:00
Vanessa McHale
c96a59fa0d update to work with latest GHC 2018-02-05 17:46:57 -06:00
Fabian Beuke
179b6a30f4 Remove unused CPP extension from Core.hs 2017-08-08 00:46:00 +02:00
Gábor Lipták
0c97a89754
Cleanup build warnings
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2017-04-15 18:16:40 -04:00
Peter Jones
f18bda7dc7
Having an executable build script implies force = True' in recompile'
This is slight change to the original implementation.  This version
forces a recompile if XMonad detects a custom build script.  The
previous version took into consideration the time stamps of the source
files.

For a custom build script, the source files may be located in another
location, or there could be dependencies unknown to XMonad.  Better to
just always call the build script and let it work out if something
needs to be built.
2017-02-08 19:48:42 -07:00
Peter Jones
2baab28602
When looking for a directory, prefer ~/.xmonad over XDG BDS
This fixes issue #71
2017-02-07 13:28:53 -07:00
Peter Jones
e1c555e3e6
Implement recommendations from Brent's review 2017-01-03 15:46:07 -07:00
Peter Jones
ab20f7df8d
Stop using the term XDG unqualified
This change makes it clear that xmonad can use the "XDG Base Directory
Specification" a la the directory package without making any other XDG
claims.
2017-01-03 15:15:26 -07:00
Peter Jones
f58b2399bd
Fix compatibility issue with GHC 7.6.x and 7.8.x 2017-01-03 15:15:25 -07:00
Peter Jones
91d23656a3
Fix compile issue when using directory-1.2.3 2017-01-03 15:15:24 -07:00
Peter Jones
0248e3c9fa
Custom entry point for people using build tools (cabal, stack, etc.)
The xmonadNoArgs function is now exposed as launch.  This allows users
to start xmonad from a custom binary and skip the configuration
complication check. (This is related to issue #62.)

In order to make the new launch function easier to use, resume state
has been removed from the command line and is now stored in a
temporary file.  As a bonus this fixes issue #12.

This commit also includes a method of migrating from older command
line state to the newer state file.  This should allow you have an
older xmonad instance start a newer xmonad and maintain state.
2017-01-03 15:15:22 -07:00
Peter Jones
40fc10b6a5
Allow customization of xmonad directories
Users can specify directory overrides via environment variables.  If
those aren't set, xmonad now prefers XDG directories.  If ~/.xmonad
exists and none of the others do, it will be used instead.

See: xmonad/xmonad#61
2017-01-03 15:15:22 -07:00
Peter Jones
dc078490d0
Guard most calls to getWindowAttributes since it may throw an exception
This is a continuation of the work done by Adam Sjøgren (@asjo) to
resolve an issue where RGBA windows have transparent borders.  It also
fixes bugs related to windows suddenly disappearing right before
xmonad calls getWindowAttributes.

For more information see xmonad/xmonad#9
2016-12-14 14:18:45 -07:00
Philipp Balzarek
b0f9a3d0b9 clean up build-script handling 2016-12-10 11:10:04 +01:00
Philipp Balzarek
75d297a633 Add support for rebuild script
(#46)
2016-12-10 11:10:04 +01:00
Michael Sloan
0f0aa5e8cb Replace unicode characters in ghc error messages 2016-10-14 17:40:51 -07:00
Adam Vogt
307b82a53d Make ~/.xmonad/xmonad-$arch-$os handle args like /usr/bin/xmonad 2015-04-14 18:48:21 +00:00
Adam Vogt
d9e3ebf531 don't encode paths for spawnPID (#348) 2014-10-20 14:04:10 +00:00
Adam Vogt
d10abdcdd0 move library part to src/ 2014-05-02 17:51:59 +00:00