
Hi, a few comments from my side. Am Samstag, den 17.05.2008, 18:40 -0400 schrieb Braden Shepherdson:
+ +-- | The standard Config.hs 'defaultConfig', with the layout wrapped. +baseConfig :: XConfig Layout +baseConfig = defaultConfig{ layoutHook = Layout (layoutHook defaultConfig) }
Could you make it possible to pass the default configuration to readConfig as an parameter, so that I can change some defaults for the Debian package?
+-- | Core function that attempts to parse @~\/.xmonad\/xmonad.conf@ +readConfig :: IO (Maybe (XConfig Layout)) +readConfig = do + cs <- bracket (openFile "/home/braden/.xmonad/xmonad.conf" ReadMode)
You surely want to make that independent of the users’ login name, do you :-)
+-- | Handles the unwrapping of the Layout. Intended for use as +-- @main = plainConfig@ +plainConfig :: IO () +plainConfig = do + conf <- readConfig + case conf of + (Just xc@XConfig{layoutHook= (Layout l)}) -> + xmonad (xc{ layoutHook = l }) + Nothing -> + spawn $ "xmessage Failed to read xmonad.conf. See xmonad.errors." +
What happens here if there is no xmonad.conf. Does it use the baseConfig, or does it produce an error? Greetings, Joachim -- Joachim Breitner e-Mail: mail@joachim-breitner.de Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: nomeata@joachim-breitner.de