mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 12:11:52 -07:00
Fixes for windowset -> workspace rename
This commit is contained in:
2
Dmenu.hs
2
Dmenu.hs
@@ -24,7 +24,7 @@ runProcessWithInput cmd args input = do
|
||||
-- http://www.jcreigh.com/dmenu/dmenu-2.8-xinerama.patch
|
||||
dmenuXinerama :: [String] -> X String
|
||||
dmenuXinerama opts = do
|
||||
ws <- gets workspace
|
||||
ws <- gets windowset
|
||||
let curscreen = fromIntegral $ fromMaybe 0 (M.lookup (W.current ws) (W.ws2screen ws)) :: Int
|
||||
io $ runProcessWithInput "dmenu" ["-xs", show (curscreen+1)] (unlines opts)
|
||||
|
||||
|
@@ -41,7 +41,7 @@ findEmptyWorkspace = findKey (([],[]) ==) . W.stacks
|
||||
|
||||
withEmptyWorkspace :: (WorkspaceId -> X ()) -> X ()
|
||||
withEmptyWorkspace f = do
|
||||
ws <- gets workspace
|
||||
ws <- gets windowset
|
||||
whenJust (findEmptyWorkspace ws) f
|
||||
|
||||
-- | Find and view an empty workspace. Do nothing if all workspaces are
|
||||
|
@@ -204,5 +204,5 @@ unName :: NamedWindow -> Window
|
||||
unName (NW _ w) = w
|
||||
|
||||
withNamedWindow :: (NamedWindow -> X ()) -> X ()
|
||||
withNamedWindow f = do ws <- gets workspace
|
||||
withNamedWindow f = do ws <- gets windowset
|
||||
whenJust (W.peek ws) $ \w -> getName w >>= f
|
||||
|
@@ -18,7 +18,7 @@ import Data.Maybe ( listToMaybe )
|
||||
import qualified StackSet as W ( stacks, current, visibleWorkspaces, index )
|
||||
|
||||
rotView :: Bool -> X ()
|
||||
rotView b = do ws <- gets workspace
|
||||
rotView b = do ws <- gets windowset
|
||||
let m = W.current ws
|
||||
vis = W.visibleWorkspaces ws
|
||||
allws = if b then allWorkspaces ws else reverse $ allWorkspaces ws
|
||||
|
@@ -10,7 +10,7 @@ module XMonadContrib.SwapFocus ( swapFocus ) where
|
||||
import Control.Monad.State
|
||||
|
||||
import Operations ( refresh )
|
||||
import XMonad ( X, WindowSet, workspace )
|
||||
import XMonad ( X, WindowSet, windowset )
|
||||
import StackSet ( StackSet, peekStack, popFocus, pushFocus, current )
|
||||
|
||||
sf :: (Integral i, Integral j, Ord a) => StackSet i j a -> Maybe (StackSet i j a)
|
||||
@@ -24,7 +24,7 @@ swapFocus = smartwindows sf
|
||||
|
||||
-- | smartwindows. Modify the current window list with a pure function, and only refresh if necesary
|
||||
smartwindows :: (WindowSet -> Maybe WindowSet) -> X ()
|
||||
smartwindows f = do w <- gets workspace
|
||||
case (f w) of Just f' -> do modify $ \s -> s { workspace = f' }
|
||||
smartwindows f = do w <- gets windowset
|
||||
case (f w) of Just f' -> do modify $ \s -> s { windowset = f' }
|
||||
refresh
|
||||
Nothing -> return ()
|
||||
|
@@ -16,7 +16,7 @@ twoPane :: Rational -> Rational -> Layout
|
||||
twoPane delta split = Layout { doLayout = arrange, modifyLayout = message }
|
||||
where
|
||||
arrange rect ws@(w:x:_) = do
|
||||
(Just f) <- gets (W.peek . workspace) -- safe because of pattern match above
|
||||
(Just f) <- gets (W.peek . windowset) -- safe because of pattern match above
|
||||
let y = if f == w then x else f
|
||||
(left, right) = splitHorizontallyBy split rect
|
||||
mapM_ hide . filter (\a -> a /= w && a /= y) $ ws
|
||||
|
Reference in New Issue
Block a user