summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorKierán Meinhardt <kieran.meinhardt@gmail.com>2020-09-30 10:57:09 +0200
committerKierán Meinhardt <kieran.meinhardt@gmail.com>2020-09-30 10:57:24 +0200
commitf8b93d1f7150f6122ecf145936b9ac1abf413e2b (patch)
tree85befd724919f313418216e9077c9cc16dd061d6 /config
parent15646fa9e492ded6978620e8e17239c636cfbb16 (diff)
kmein config: add reply action
Diffstat (limited to 'config')
-rw-r--r--config/kmein.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/kmein.hs b/config/kmein.hs
index 294bc3b..6377056 100644
--- a/config/kmein.hs
+++ b/config/kmein.hs
@@ -95,6 +95,10 @@ saveAttachment q
)
| otherwise = return (Nothing, q { flashMessage = SGR [38,5,9] $ Plain "Cursor not on attachment." })
+
+reply :: State -> IO State
+reply q = q <$ runCommand "i3-sensible-terminal -e $EDITOR -c 'read !mail-reply'"
+
myKeymap :: String -> State -> IO State
myKeymap "h" = closeFold
myKeymap "l" = openFold
@@ -111,6 +115,7 @@ myKeymap "\ESC[D" = moveTreeRight 10 -- right
myKeymap "r" = notmuchSearch
+myKeymap "R" = reply
myKeymap "S" = fmap snd . saveAttachment
myKeymap "o" = saveAttachment >=> \case
(Nothing, q') -> return q'