aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Rahm/Desktop/Desktop.hs (renamed from src/Rahm/Desktop/Theater.hs)34
-rw-r--r--src/Rahm/Desktop/Keys.hs6
2 files changed, 20 insertions, 20 deletions
diff --git a/src/Rahm/Desktop/Theater.hs b/src/Rahm/Desktop/Desktop.hs
index b0404b7..053b330 100644
--- a/src/Rahm/Desktop/Theater.hs
+++ b/src/Rahm/Desktop/Desktop.hs
@@ -1,6 +1,6 @@
-module Rahm.Desktop.Theater where
+module Rahm.Desktop.Desktop where
--- A "Theater" is a mapping from screen -> workspace. This is used to save the
+-- A "Desktop" is a mapping from screen -> workspace. This is used to save the
-- state of the current screen -> workspace and thus restore it.
-- import XMonad.Operations
@@ -14,32 +14,32 @@ import qualified Data.Map as Map
import Data.Default
import qualified XMonad.Util.ExtensibleState as XS
-newtype Theater si wi = Theater (Map si wi)
+newtype Desktop si wi = Desktop (Map si wi)
deriving (Read, Show)
-newtype Theaters = Theaters {
- theaters :: Map String (Theater X.ScreenId X.WorkspaceId)
+newtype Desktops = Desktops {
+ theaters :: Map String (Desktop X.ScreenId X.WorkspaceId)
} deriving (Read, Show)
-instance Default Theaters where
- def = Theaters mempty
+instance Default Desktops where
+ def = Desktops mempty
-instance X.ExtensionClass Theaters where
+instance X.ExtensionClass Desktops where
initialValue = def
extensionType = X.PersistentExtension
-saveCurrentTheater :: String -> X ()
-saveCurrentTheater name =
+saveCurrentDesktop :: String -> X ()
+saveCurrentDesktop name =
X.withWindowSet $ \windowSet ->
- XS.modify $ \(Theaters m) ->
- Theaters $ flip (Map.insert name) m $
- Theater $ Map.fromList $
+ XS.modify $ \(Desktops m) ->
+ Desktops $ flip (Map.insert name) m $
+ Desktop $ Map.fromList $
map (\(W.Screen ws sid _) -> (sid, W.tag ws)) $ W.screens windowSet
-restoreTheater :: String -> X ()
-restoreTheater name = do
- (Theaters theaters) <- XS.get
- forM_ (Map.lookup name theaters) $ \(Theater screenToWorkspace) ->
+restoreDesktop :: String -> X ()
+restoreDesktop name = do
+ (Desktops theaters) <- XS.get
+ forM_ (Map.lookup name theaters) $ \(Desktop screenToWorkspace) ->
X.windows $ \ws@(W.StackSet cur vis hidden float) ->
let workspacesById = Map.fromList $ map (\ws -> (W.tag ws, ws)) (W.workspaces ws)
diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs
index ac80561..edeb77e 100644
--- a/src/Rahm/Desktop/Keys.hs
+++ b/src/Rahm/Desktop/Keys.hs
@@ -64,7 +64,7 @@ import Rahm.Desktop.Submap
import Rahm.Desktop.Swallow
import Rahm.Desktop.SwapMaster (swapMaster)
import Rahm.Desktop.Workspaces
-import Rahm.Desktop.Theater
+import Rahm.Desktop.Desktop
import qualified Rahm.Desktop.StackSet as W
import Rahm.Desktop.History
@@ -287,7 +287,7 @@ keymap = runKeys $ do
runMaybeT_ $ do
mapNextString $ \_ str -> lift $
case str of
- [ch] | isAlpha ch -> restoreTheater [ch]
+ [ch] | isAlpha ch -> restoreDesktop [ch]
_ -> return ()
-- shiftMod $
@@ -427,7 +427,7 @@ keymap = runKeys $ do
runMaybeT_ $ do
mapNextString $ \_ str -> lift $
case str of
- [ch] | isAlpha ch -> saveCurrentTheater str
+ [ch] | isAlpha ch -> saveCurrentDesktop str
_ -> return ()
bind xK_plus $ do