summaryrefslogtreecommitdiffhomepage
path: root/src/Main.hs
diff options
context:
space:
mode:
authorJames McCoy <vega.james@gmail.com>2013-10-29 08:58:42 -0400
committerJames McCoy <vega.james@gmail.com>2013-10-29 08:58:42 -0400
commiteaccf70440e24ac90f9d0ad948c262ba084659dc (patch)
tree85fabd38ccdc28f530df2bfe44d63c301aa12673 /src/Main.hs
parent8af7087757e59bd15230af19999c82cb245cb4f8 (diff)
downloadxmobar-eaccf70440e24ac90f9d0ad948c262ba084659dc.tar.gz
xmobar-eaccf70440e24ac90f9d0ad948c262ba084659dc.tar.bz2
Fix xdgconf logic in readDefaultConfig
readDefaultConfig should prefer $XDG_CONFIG_HOME/xmobarrc if it exists, however the code was always reading path. This fixes the logic to actually use xdgconf if it exists.
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index e90a158..d0fe4fc 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -109,7 +109,7 @@ readDefaultConfig = do
x <- io $ fileExist xdgconf
home <- io $ getEnv "HOME"
let path = home ++ "/.xmobarrc"
- f <- io $ fileExist path
+ f <- io $ fileExist xdgconf
if x then readConfig path
else if f then readConfig path
else return (defaultConfig,[])