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