mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-25 17:21:52 -07:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
bb13853929 | ||
|
3d1720c3f3 | ||
|
0614ffb65c | ||
|
85b47fc3ac | ||
|
1a99280227 | ||
|
e8133eb9a6 | ||
|
4ccaff8f25 | ||
|
56dc186e68 | ||
|
10b2efe81c |
15
CHANGES.md
15
CHANGES.md
@@ -2,6 +2,21 @@
|
||||
|
||||
## unknown (unknown)
|
||||
|
||||
## 0.15 (September 30, 2018)
|
||||
|
||||
* Reimplement `sendMessage` to deal properly with windowset changes made
|
||||
during handling.
|
||||
|
||||
* Add new library functions `windowBracket` and `modifyWindowSet` to
|
||||
`XMonad.Operations`.
|
||||
|
||||
## 0.14.2 (August 21, 2018)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Add the sample configuration file xmonad.hs again to the release tarball.
|
||||
[https://github.com/xmonad/xmonad/issues/181]
|
||||
|
||||
## 0.14.1 (August 20, 2018)
|
||||
|
||||
### Breaking Changes
|
||||
|
@@ -1,6 +1,6 @@
|
||||
.\" Automatically generated by Pandoc 2.2.1
|
||||
.\"
|
||||
.TH "XMONAD" "1" "20 August 2018" "Tiling Window Manager" ""
|
||||
.TH "XMONAD" "1" "30 September 2018" "Tiling Window Manager" ""
|
||||
.hy
|
||||
.SH Name
|
||||
.PP
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<meta name="author" content="" />
|
||||
<meta name="dcterms.date" content="2018-08-20" />
|
||||
<meta name="dcterms.date" content="2018-09-30" />
|
||||
<title>XMONAD(1) Tiling Window Manager</title>
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
@@ -84,7 +84,7 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
|
||||
<header>
|
||||
<h1 class="title">XMONAD(1) Tiling Window Manager</h1>
|
||||
<p class="author"></p>
|
||||
<p class="date">20 August 2018</p>
|
||||
<p class="date">30 September 2018</p>
|
||||
</header>
|
||||
<nav id="TOC">
|
||||
<ul>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
% XMONAD(1) Tiling Window Manager
|
||||
%
|
||||
% 20 August 2018
|
||||
% 30 September 2018
|
||||
|
||||
# Name
|
||||
|
||||
|
@@ -21,7 +21,7 @@ import XMonad.Layout (Full(..))
|
||||
import qualified XMonad.StackSet as W
|
||||
|
||||
import Data.Maybe
|
||||
import Data.Monoid (Endo(..))
|
||||
import Data.Monoid (Endo(..),Any(..))
|
||||
import Data.List (nub, (\\), find)
|
||||
import Data.Bits ((.|.), (.&.), complement, testBit)
|
||||
import Data.Ratio
|
||||
@@ -30,6 +30,7 @@ import qualified Data.Set as S
|
||||
|
||||
import Control.Applicative((<$>), (<*>))
|
||||
import Control.Arrow (second)
|
||||
import Control.Monad (void)
|
||||
import Control.Monad.Reader
|
||||
import Control.Monad.State
|
||||
import qualified Control.Exception.Extensible as C
|
||||
@@ -176,6 +177,25 @@ windows f = do
|
||||
unless isMouseFocused $ clearEvents enterWindowMask
|
||||
asks (logHook . config) >>= userCodeDef ()
|
||||
|
||||
-- | Modify the @WindowSet@ in state with no special handling.
|
||||
modifyWindowSet :: (WindowSet -> WindowSet) -> X ()
|
||||
modifyWindowSet f = modify $ \xst -> xst { windowset = f (windowset xst) }
|
||||
|
||||
-- | Perform an @X@ action and check its return value against a predicate p.
|
||||
-- If p holds, unwind changes to the @WindowSet@ and replay them using @windows@.
|
||||
windowBracket :: (a -> Bool) -> X a -> X a
|
||||
windowBracket p action = withWindowSet $ \old -> do
|
||||
a <- action
|
||||
when (p a) . withWindowSet $ \new -> do
|
||||
modifyWindowSet $ \_ -> old
|
||||
windows $ \_ -> new
|
||||
return a
|
||||
|
||||
-- | A version of @windowBracket@ that discards the return value, and handles an
|
||||
-- @X@ action reporting its need for refresh via @Any@.
|
||||
windowBracket_ :: X Any -> X ()
|
||||
windowBracket_ = void . windowBracket getAny
|
||||
|
||||
-- | Produce the actual rectangle from a screen and a ratio on that screen.
|
||||
scaleRationalRect :: Rectangle -> W.RationalRect -> Rectangle
|
||||
scaleRationalRect (Rectangle sx sy sw sh) (W.RationalRect rx ry rw rh)
|
||||
@@ -371,15 +391,16 @@ setFocusX w = withWindowSet $ \ws -> do
|
||||
-- Message handling
|
||||
|
||||
-- | Throw a message to the current 'LayoutClass' possibly modifying how we
|
||||
-- layout the windows, then refresh.
|
||||
-- layout the windows, in which case changes are handled through a refresh.
|
||||
sendMessage :: Message a => a -> X ()
|
||||
sendMessage a = do
|
||||
sendMessage a = windowBracket_ $ do
|
||||
w <- W.workspace . W.current <$> gets windowset
|
||||
ml' <- handleMessage (W.layout w) (SomeMessage a) `catchX` return Nothing
|
||||
whenJust ml' $ \l' ->
|
||||
windows $ \ws -> ws { W.current = (W.current ws)
|
||||
modifyWindowSet $ \ws -> ws { W.current = (W.current ws)
|
||||
{ W.workspace = (W.workspace $ W.current ws)
|
||||
{ W.layout = l' }}}
|
||||
return (Any $ isJust ml')
|
||||
|
||||
-- | Send a message to all layouts, without refreshing.
|
||||
broadcastMessage :: Message a => a -> X ()
|
||||
|
@@ -18,7 +18,7 @@ prop_delete x =
|
||||
where _ = x :: T
|
||||
|
||||
-- delete is reversible with 'insert'.
|
||||
-- It is the identiy, except for the 'master', which is reset on insert and delete.
|
||||
-- It is the identity, except for the 'master', which is reset on insert and delete.
|
||||
--
|
||||
prop_delete_insert (x :: T) =
|
||||
case peek x of
|
||||
|
31
xmonad.cabal
31
xmonad.cabal
@@ -1,5 +1,5 @@
|
||||
name: xmonad
|
||||
version: 0.14.1
|
||||
version: 0.15
|
||||
synopsis: A tiling window manager
|
||||
description: xmonad is a tiling window manager for X. Windows are arranged
|
||||
automatically to tile the screen without gaps or overlap, maximising
|
||||
@@ -12,20 +12,20 @@ description: xmonad is a tiling window manager for X. Windows are arrange
|
||||
screens.
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
author: Spencer Janssen, Don Stewart, Adam Vogt, David Roundy, Jason Creighton
|
||||
, Brent Yorgey, Peter Jones, Peter Simons, Andrea Rossato, Devin Mullins
|
||||
, Lukas Mai, Alec Berryman, Stefan O'Rear, Daniel Wagner, Peter J. Jones
|
||||
, Daniel Schoepe, Karsten Schoelzel, Neil Mitchell, Joachim Breitner
|
||||
, Peter De Wachter, Eric Mertens, Geoff Reedy, Michiel Derhaeg
|
||||
, Philipp Balzarek, Valery V. Vorotyntsev, Alex Tarkovsky, Fabian Beuke
|
||||
, Felix Hirn, Michael Sloan, Tomas Janousek, Vanessa McHale, Nicolas Pouillard
|
||||
, Aaron Denney, Austin Seipp, Benno Fünfstück, Brandon S Allbery, Chris Mears
|
||||
, Christian Thiemann, Clint Adams, Daniel Neri, David Lazar, Ferenc Wagner
|
||||
, Francesco Ariis, Gábor Lipták, Ivan N. Veselov, Ivan Tarasov, Javran Cheng
|
||||
, Jens Petersen, Joey Hess, Jonne Ransijn, Josh Holland, Khudyakov Alexey
|
||||
, Klaus Weidner, Michael G. Sloan, Mikkel Christiansen, Nicolas Dudebout
|
||||
, Ondřej Súkup, Paul Hebble, Shachaf Ben-Kiki, Siim Põder, Tim McIver
|
||||
, Trevor Elliott, Wouter Swierstra, Conrad Irwin, Tim Thelion
|
||||
author: Spencer Janssen, Don Stewart, Adam Vogt, David Roundy, Jason Creighton,
|
||||
Brent Yorgey, Peter Jones, Peter Simons, Andrea Rossato, Devin Mullins,
|
||||
Lukas Mai, Alec Berryman, Stefan O'Rear, Daniel Wagner, Peter J. Jones,
|
||||
Daniel Schoepe, Karsten Schoelzel, Neil Mitchell, Joachim Breitner,
|
||||
Peter De Wachter, Eric Mertens, Geoff Reedy, Michiel Derhaeg,
|
||||
Philipp Balzarek, Valery V. Vorotyntsev, Alex Tarkovsky, Fabian Beuke,
|
||||
Felix Hirn, Michael Sloan, Tomas Janousek, Vanessa McHale, Nicolas Pouillard,
|
||||
Aaron Denney, Austin Seipp, Benno Fünfstück, Brandon S Allbery, Chris Mears,
|
||||
Christian Thiemann, Clint Adams, Daniel Neri, David Lazar, Ferenc Wagner,
|
||||
Francesco Ariis, Gábor Lipták, Ivan N. Veselov, Ivan Tarasov, Javran Cheng,
|
||||
Jens Petersen, Joey Hess, Jonne Ransijn, Josh Holland, Khudyakov Alexey,
|
||||
Klaus Weidner, Michael G. Sloan, Mikkel Christiansen, Nicolas Dudebout,
|
||||
Ondřej Súkup, Paul Hebble, Shachaf Ben-Kiki, Siim Põder, Tim McIver,
|
||||
Trevor Elliott, Wouter Swierstra, Conrad Irwin, Tim Thelion
|
||||
maintainer: xmonad@haskell.org
|
||||
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.3, GHC == 8.6.1
|
||||
category: System
|
||||
@@ -42,6 +42,7 @@ extra-source-files: README.md
|
||||
man/xmonad.1.markdown
|
||||
man/xmonad.1
|
||||
man/xmonad.1.html
|
||||
man/xmonad.hs
|
||||
util/GenerateManpage.hs
|
||||
util/hpcReport.sh
|
||||
cabal-version: >= 1.8
|
||||
|
Reference in New Issue
Block a user