mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-05 22:51:52 -07:00
warnings: rename shadowing variables
This commit is contained in:
@@ -155,12 +155,12 @@ dynamicProjects ps c =
|
||||
dynamicProjectsLogHook :: X ()
|
||||
dynamicProjectsLogHook = do
|
||||
name <- gets (W.tag . W.workspace . W.current . windowset)
|
||||
state <- XS.get
|
||||
xstate <- XS.get
|
||||
|
||||
unless (Just name == previousProject state) $ do
|
||||
XS.put (state {previousProject = Just name})
|
||||
unless (Just name == previousProject xstate) $ do
|
||||
XS.put (xstate {previousProject = Just name})
|
||||
activateProject . fromMaybe (defProject name) $
|
||||
Map.lookup name (projects state)
|
||||
Map.lookup name (projects xstate)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- | Start-up hook for recording configured projects.
|
||||
|
@@ -278,9 +278,9 @@ instance LayoutModifier AvoidStruts a where
|
||||
nsmap <- getRawStruts dockWins
|
||||
if nsmap /= smap
|
||||
then do
|
||||
nr <- fmap ($ r) (calcGap dockWins ss)
|
||||
setWorkarea nr
|
||||
return (nr, nsmap)
|
||||
wnr <- fmap ($ r) (calcGap dockWins ss)
|
||||
setWorkarea wnr
|
||||
return (wnr, nsmap)
|
||||
else do
|
||||
return (nr, smap)
|
||||
_ -> do
|
||||
|
@@ -91,9 +91,9 @@ allWindows = windowMap
|
||||
|
||||
-- | A helper to get the map of windows of the current workspace.
|
||||
wsWindows :: XWindowMap
|
||||
wsWindows = withWindowSet (return . W.index) >>= windowMap
|
||||
wsWindows = withWindowSet (return . W.index) >>= winmap
|
||||
where
|
||||
windowMap = fmap M.fromList . mapM pair
|
||||
winmap = fmap M.fromList . mapM pair
|
||||
pair w = do name <- fmap show $ getName w
|
||||
return (name, w)
|
||||
|
||||
@@ -102,16 +102,16 @@ wsWindows = withWindowSet (return . W.index) >>= windowMap
|
||||
type XWindowMap = X (M.Map String Window)
|
||||
|
||||
-- | Pops open a prompt with window titles belonging to
|
||||
-- windowMap. Choose one, and an action is applied on the
|
||||
-- winmap. Choose one, and an action is applied on the
|
||||
-- selected window, according to WindowPrompt.
|
||||
windowPrompt :: XPConfig -> WindowPrompt -> XWindowMap -> X ()
|
||||
windowPrompt c t windowMap = do
|
||||
windowPrompt c t winmap = do
|
||||
a <- case t of
|
||||
Goto -> fmap gotoAction windowMap
|
||||
Bring -> fmap bringAction windowMap
|
||||
BringCopy -> fmap bringCopyAction windowMap
|
||||
BringToMaster -> fmap bringToMaster windowMap
|
||||
wm <- windowMap
|
||||
Goto -> fmap gotoAction winmap
|
||||
Bring -> fmap bringAction winmap
|
||||
BringCopy -> fmap bringCopyAction winmap
|
||||
BringToMaster -> fmap bringToMaster winmap
|
||||
wm <- winmap
|
||||
mkXPrompt t c (compList wm) a
|
||||
|
||||
where
|
||||
|
Reference in New Issue
Block a user