From 930685f095a53e9764f453fbd95a27ca77b91daa Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Fri, 11 Dec 2020 17:37:38 -0500 Subject: [PATCH] ENH make getItems not depend on the reader config --- app/rofi-bw.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/rofi-bw.hs b/app/rofi-bw.hs index 1675f11..4345217 100644 --- a/app/rofi-bw.hs +++ b/app/rofi-bw.hs @@ -171,9 +171,10 @@ runClient a = do browseLogins :: RofiConf c => RofiIO c () browseLogins = do session <- io callGetSession - forM_ session $ getItems >=> selectItem + forM_ session $ (io . getItems) >=> selectItem -getItems :: RofiConf c => String -> RofiIO c [Item] +-- TODO use this in rofi-dev to mount thing using BW passwords +getItems :: String -> IO [Item] getItems session = do items <- io $ readProcess "bw" ["list", "items", "--session", session] "" return $ filter notEmpty $ fromMaybe [] $ decode $ fromString items