forked from colonelpanic/dotfiles
[XMonad] Clean up definitions
This commit is contained in:
parent
9a4dc56b6d
commit
3925643643
@ -12,7 +12,6 @@ import Data.List
|
|||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import qualified Data.MultiMap as MM
|
import qualified Data.MultiMap as MM
|
||||||
import Data.Char (toLower)
|
|
||||||
import Graphics.X11.ExtraTypes.XF86
|
import Graphics.X11.ExtraTypes.XF86
|
||||||
import Network.HostName
|
import Network.HostName
|
||||||
import System.Directory
|
import System.Directory
|
||||||
@ -489,15 +488,15 @@ maybeUnminimizeClassAfter = (>> maximizeSameClassesInWorkspace)
|
|||||||
sameClassOnly action =
|
sameClassOnly action =
|
||||||
action >> minimizeOtherClassesInWorkspace >> maximizeSameClassesInWorkspace
|
action >> minimizeOtherClassesInWorkspace >> maximizeSameClassesInWorkspace
|
||||||
|
|
||||||
restoreAll windows = mapM_ maximizeWindow windows
|
restoreAll = mapM_ maximizeWindow
|
||||||
|
|
||||||
restoreAllMinimized = minimizedWindows >>= restoreAll
|
restoreAllMinimized = minimizedWindows >>= restoreAll
|
||||||
|
|
||||||
restoreOrMinimizeOtherClasses = null <$> maximizedOtherClass >>=
|
restoreOrMinimizeOtherClasses = null <$> maximizedOtherClass >>=
|
||||||
ifL restoreAllMinimized minimizeOtherClassesInWorkspace
|
ifL restoreAllMinimized minimizeOtherClassesInWorkspace
|
||||||
|
|
||||||
restoreThisClassOrMinimizeOtherClasses = minimizedSameClass >>= \windows ->
|
restoreThisClassOrMinimizeOtherClasses = minimizedSameClass >>= \ws ->
|
||||||
if' (null windows) minimizeOtherClassesInWorkspace $ restoreAll windows
|
if' (null ws) minimizeOtherClassesInWorkspace $ restoreAll ws
|
||||||
|
|
||||||
getClassPair w = flip (,) w <$> getClass w
|
getClassPair w = flip (,) w <$> getClass w
|
||||||
|
|
||||||
@ -609,7 +608,6 @@ bindBringAndRaise mask sym start query =
|
|||||||
, ((mask .|. shiftMask, sym), doRaiseNext)
|
, ((mask .|. shiftMask, sym), doRaiseNext)
|
||||||
]
|
]
|
||||||
where doRaiseNext = myRaiseNextMaybe start query
|
where doRaiseNext = myRaiseNextMaybe start query
|
||||||
alreadyFocused = join $ withFocusedD False $ runQuery query
|
|
||||||
|
|
||||||
bindBringAndRaiseMany :: [(KeyMask, KeySym, X (), Query Bool)] -> [((KeyMask, KeySym), X())]
|
bindBringAndRaiseMany :: [(KeyMask, KeySym, X (), Query Bool)] -> [((KeyMask, KeySym), X())]
|
||||||
bindBringAndRaiseMany = concatMap (\(a, b, c, d) -> bindBringAndRaise a b c d)
|
bindBringAndRaiseMany = concatMap (\(a, b, c, d) -> bindBringAndRaise a b c d)
|
||||||
|
Loading…
Reference in New Issue
Block a user