diff options
author | James McCoy <vega.james@gmail.com> | 2013-10-29 08:58:42 -0400 |
---|---|---|
committer | James McCoy <vega.james@gmail.com> | 2013-10-29 08:58:42 -0400 |
commit | eaccf70440e24ac90f9d0ad948c262ba084659dc (patch) | |
tree | 85fabd38ccdc28f530df2bfe44d63c301aa12673 | |
parent | 8af7087757e59bd15230af19999c82cb245cb4f8 (diff) | |
download | xmobar-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.
-rw-r--r-- | src/Main.hs | 2 |
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,[]) |