diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-12-19 22:50:11 +0100 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-12-19 22:50:11 +0100 |
commit | 69e3875c8bdd0614dfed2c0580f3e1a0f7f31040 (patch) | |
tree | 359c1ba8e0f8dc9aa00150a6bca02fa198c69340 | |
parent | c2d192bb5a18f539d17a0427981c10c253b5374e (diff) | |
download | metatile-69e3875c8bdd0614dfed2c0580f3e1a0f7f31040.tar metatile-69e3875c8bdd0614dfed2c0580f3e1a0f7f31040.zip |
Remove getProgName capability from restart, we don't use it anymore
darcs-hash:20071219215011-a5988-f4c17d2d3f3a7a4ea6c9e5e8fe73b1c800cbb9d5
-rw-r--r-- | XMonad/Config.hs | 2 | ||||
-rw-r--r-- | XMonad/Core.hs | 16 | ||||
-rw-r--r-- | man/xmonad.hs | 2 |
3 files changed, 7 insertions, 13 deletions
diff --git a/XMonad/Config.hs b/XMonad/Config.hs index da00e1d..e0429da 100644 --- a/XMonad/Config.hs +++ b/XMonad/Config.hs @@ -207,7 +207,7 @@ keys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ -- quit, or restart , ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess)) -- %! Quit xmonad - , ((modMask , xK_q ), restart (Just "xmonad") True) -- %! Restart xmonad + , ((modMask , xK_q ), restart "xmonad" True) -- %! Restart xmonad ] ++ -- mod-[1..9] %! Switch to workspace N diff --git a/XMonad/Core.hs b/XMonad/Core.hs index d2195d6..ee16f9c 100644 --- a/XMonad/Core.hs +++ b/XMonad/Core.hs @@ -43,7 +43,6 @@ import System.Posix.Process (executeFile, forkProcess, getProcessStatus, createS import System.Process import System.Directory import System.Exit -import System.Environment import Graphics.X11.Xlib import Graphics.X11.Xlib.Extras (Event) import Data.Typeable @@ -321,19 +320,14 @@ runOnWorkspaces job =do $ current ws : visible ws modify $ \s -> s { windowset = ws { current = c, visible = v, hidden = h } } --- | Restart xmonad via exec(). +-- | @restart name resume@. Attempt to restart xmonad by executing the program +-- @name@. If @resume@ is 'True', restart with the current window state. +-- When executing another window manager, @resume@ should be 'False'. -- --- If the first parameter is 'Just name', restart will attempt to execute the --- program corresponding to 'name'. Otherwise, xmonad will attempt to execute --- the name of the current program. --- --- When the second parameter is 'True', xmonad will attempt to resume with the --- current window state. -restart :: Maybe String -> Bool -> X () -restart mprog resume = do +restart :: String -> Bool -> X () +restart prog resume = do broadcastMessage ReleaseResources io . flush =<< asks display - prog <- maybe (io getProgName) return mprog args <- if resume then gets (("--resume":) . return . showWs . windowset) else return [] catchIO (executeFile prog True args Nothing) where showWs = show . mapLayout show diff --git a/man/xmonad.hs b/man/xmonad.hs index bcfa13c..2cb8443 100644 --- a/man/xmonad.hs +++ b/man/xmonad.hs @@ -145,7 +145,7 @@ myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ , ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess)) -- Restart xmonad - , ((modMask , xK_q ), restart (Just "xmonad") True) + , ((modMask , xK_q ), restart "xmonad" True) ] ++ |