diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-01-06 19:35:13 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-01-06 19:35:13 +0100 |
commit | 91a1bc6c311cbf1efc48cde59a593ddf65409a5c (patch) | |
tree | e5dfeba36256f9464b1a11bc1d83986d8dc1816c /src/Plugins/Mail.hs | |
parent | ae8a67090f60cc9aeb623bcc79e0df1af0d7f8eb (diff) | |
download | xmobar-91a1bc6c311cbf1efc48cde59a593ddf65409a5c.tar.gz xmobar-91a1bc6c311cbf1efc48cde59a593ddf65409a5c.tar.bz2 |
Mail now takes its alias as a second argument
This way we also avoid issue 30, although we're not solving the real
issue (which is that the commands parser cannot correctly parse
commands with a single argument unless they appear at the end of the
list).
Diffstat (limited to 'src/Plugins/Mail.hs')
-rw-r--r-- | src/Plugins/Mail.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Plugins/Mail.hs b/src/Plugins/Mail.hs index 38cdaae..58431ce 100644 --- a/src/Plugins/Mail.hs +++ b/src/Plugins/Mail.hs @@ -30,11 +30,12 @@ import Data.Set (Set) import qualified Data.Set as S -- | A list of mail box names and paths to maildirs. -data Mail = Mail [(String, FilePath)] +data Mail = Mail [(String, FilePath)] String deriving (Read, Show) instance Exec Mail where - start (Mail ms) cb = do + alias (Mail _ a) = a + start (Mail ms _) cb = do vs <- mapM (const $ newTVarIO S.empty) ms let ts = map fst ms |