diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-01 08:35:06 +0100 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-01 08:35:06 +0100 |
commit | fa35f65a14a1a57bf93520ef8bcbfa8fd75c33fe (patch) | |
tree | 58ebd9dcfee15d9d300b3ff5c38fcaf43c4b33ba | |
parent | 7e79037c11ffee4ab68dc3ae3d63c5f103abad59 (diff) | |
download | XMonadContrib-fa35f65a14a1a57bf93520ef8bcbfa8fd75c33fe.tar.gz XMonadContrib-fa35f65a14a1a57bf93520ef8bcbfa8fd75c33fe.tar.xz XMonadContrib-fa35f65a14a1a57bf93520ef8bcbfa8fd75c33fe.zip |
More porting
darcs-hash:20071101073506-a5988-b8ee3ece4361dfc533589f5d4ca8c289c3dc77e7.gz
-rw-r--r-- | NoBorders.hs | 10 | ||||
-rw-r--r-- | Run.hs | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/NoBorders.hs b/NoBorders.hs index 5c54814..ef07336 100644 --- a/NoBorders.hs +++ b/NoBorders.hs @@ -56,10 +56,10 @@ instance LayoutModifier WithBorder Window where modifierDescription (WithBorder 0 _) = "NoBorders" modifierDescription (WithBorder n _) = "Borders " ++ show n - unhook (WithBorder _ s) = asks borderWidth >>= setBorders s + unhook (WithBorder _ s) = asks (borderWidth . config) >>= setBorders s redoLayout (WithBorder n s) _ _ wrs = do - asks borderWidth >>= setBorders (s \\ ws) + asks (borderWidth . config) >>= setBorders (s \\ ws) setBorders ws n return (wrs, Just $ WithBorder n ws) where @@ -79,18 +79,18 @@ data SmartBorder a = SmartBorder [a] deriving (Read, Show) instance LayoutModifier SmartBorder Window where modifierDescription _ = "SmartBorder" - unhook (SmartBorder s) = asks borderWidth >>= setBorders s + unhook (SmartBorder s) = asks (borderWidth . config) >>= setBorders s redoLayout (SmartBorder s) _ _ wrs = do ss <- gets (W.screens . windowset) if singleton ws && singleton ss then do - asks borderWidth >>= setBorders (s \\ ws) + asks (borderWidth . config) >>= setBorders (s \\ ws) setBorders ws 0 return (wrs, Just $ SmartBorder ws) else do - asks borderWidth >>= setBorders s + asks (borderWidth . config) >>= setBorders s return (wrs, Just $ SmartBorder []) where ws = map fst wrs @@ -108,8 +108,8 @@ unsafeSpawn = spawn -- | Run a given program in the preferred terminal emulator. This uses safeSpawn. safeRunInTerm :: String -> X () -safeRunInTerm command = asks terminal >>= \t -> safeSpawn t ("-e " ++ command) +safeRunInTerm command = asks (terminal . config) >>= \t -> safeSpawn t ("-e " ++ command) unsafeRunInTerm, runInTerm :: String -> X () -unsafeRunInTerm command = asks terminal >>= \t -> unsafeSpawn $ t ++ " -e " ++ command +unsafeRunInTerm command = asks (terminal . config) >>= \t -> unsafeSpawn $ t ++ " -e " ++ command runInTerm = unsafeRunInTerm |