diff options
author | jao <jao@gnu.org> | 2017-04-29 02:09:24 +0200 |
---|---|---|
committer | jao <jao@gnu.org> | 2017-04-29 02:09:24 +0200 |
commit | e41fd61bdeac8779fa24050cc0d44714f7c90f1d (patch) | |
tree | f724480c121a1246c942ed913f167fa71a9e2564 /src/Main.hs | |
parent | 938a8d8307c1c4794c5fcf269c587c3c5c5e70df (diff) | |
download | xmobar-e41fd61bdeac8779fa24050cc0d44714f7c90f1d.tar.gz xmobar-e41fd61bdeac8779fa24050cc0d44714f7c90f1d.tar.bz2 |
hlint configuration
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Main.hs b/src/Main.hs index 0596600..288939d 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -37,7 +37,7 @@ import System.Exit import System.Environment import System.FilePath ((</>)) import System.Posix.Files -import Control.Monad (unless, liftM) +import Control.Monad (unless) import Text.Read (readMaybe) import Signal (setupSignalHandler) @@ -96,13 +96,13 @@ xdgConfigDir :: IO String xdgConfigDir = do env <- getEnvironment case lookup "XDG_CONFIG_HOME" env of Just val -> return val - Nothing -> liftM (</> ".config") getHomeDirectory + Nothing -> fmap (</> ".config") getHomeDirectory xmobarConfigDir :: IO FilePath -xmobarConfigDir = liftM (</> "xmobar") xdgConfigDir +xmobarConfigDir = fmap (</> "xmobar") xdgConfigDir getXdgConfigFile :: IO FilePath -getXdgConfigFile = liftM (</> "xmobarrc") xmobarConfigDir +getXdgConfigFile = fmap (</> "xmobarrc") xmobarConfigDir -- | Read default configuration file or load the default config readDefaultConfig :: IO (Config,[String]) @@ -231,7 +231,7 @@ doOpts conf (o:oo) = "specified with the -" ++ c:" option\n") readStr str = [x | (x,t) <- reads str, ("","") <- lex t] doOpts' opts = doOpts opts oo - readPosition string = + readPosition string = case readMaybe string of Just x -> doOpts' (conf { position = x }) Nothing -> do |