Add defaultTopicConfig, to allow adding more fields to TopicSpace later.

This commit is contained in:
Adam Vogt 2009-11-11 01:29:15 +00:00
parent 3b82b8755e
commit 60ae62e4e3

View File

@ -22,6 +22,7 @@ module XMonad.Actions.TopicSpace
Topic Topic
, Dir , Dir
, TopicConfig(..) , TopicConfig(..)
, defaultTopicConfig
, getLastFocusedTopics , getLastFocusedTopics
, setLastFocusedTopic , setLastFocusedTopic
, pprWindowSet , pprWindowSet
@ -227,6 +228,14 @@ data TopicConfig = TopicConfig { topicDirs :: M.Map Topic Dir
-- numeric keypad. -- numeric keypad.
} }
defaultTopicConfig :: TopicConfig
defaultTopicConfig = TopicConfig { topicDirs = M.empty
, topicActions = M.empty
, defaultTopicAction = const (ask >>= spawn . terminal . config)
, defaultTopic = "1"
, maxTopicHistory = 10
}
newtype PrevTopics = PrevTopics { getPrevTopics :: [String] } deriving (Read,Show,Typeable) newtype PrevTopics = PrevTopics { getPrevTopics :: [String] } deriving (Read,Show,Typeable)
instance ExtensionClass PrevTopics where instance ExtensionClass PrevTopics where
initialValue = PrevTopics [] initialValue = PrevTopics []