$OpenBSD: patch-src_Main_hs,v 1.1 2013/11/25 10:31:04 dcoppa Exp $

commit 1563fa8473d728486b7c86a1a4f818466ab64413
Author: Thiago Negri <evohunz@gmail.com>
Date:   Tue Oct 29 21:40:50 2013 -0200

Fixed #133: xmobar was not reading ~/.xmobarrc

--- src/Main.hs.orig	Sun Oct 27 21:43:04 2013
+++ src/Main.hs	Mon Nov 25 10:52:10 2013
@@ -105,14 +105,16 @@ getXdgConfigFile = xmobarConfigDir >>= return . (</> "
 -- | Read default configuration file or load the default config
 readDefaultConfig :: IO (Config,[String])
 readDefaultConfig = do
-  xdgconf <- getXdgConfigFile
-  x <- io $ fileExist xdgconf
+  xdgConfigFile <- getXdgConfigFile
+  xdgConfigFileExists <- io $ fileExist xdgConfigFile
   home <- io $ getEnv "HOME"
-  let path = home ++ "/.xmobarrc"
-  f <- io $ fileExist path
-  if x then readConfig path
-       else if f then readConfig path
-                 else return (defaultConfig,[])
+  let defaultConfigFile = home ++ "/.xmobarrc"
+  defaultConfigFileExists <- io $ fileExist defaultConfigFile
+  if xdgConfigFileExists
+    then readConfig xdgConfigFile
+    else if defaultConfigFileExists
+         then readConfig defaultConfigFile
+         else return (defaultConfig,[])
 
 data Opts = Help
           | Version
