aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-10-05 16:46:13 +0530
committerAkshay Nair <phenax5@gmail.com>2025-10-05 17:05:22 +0530
commit845b96c9a7f6d80f2042ef5d334fd6842d617f27 (patch)
tree5c5f95acc25adcd400c7f1a658f571d70a6c365b /lib
parent332fed0c0936a48b5cb68ebd7b2dc4d96003008e (diff)
downloaddaffm-845b96c9a7f6d80f2042ef5d334fd6842d617f27.tar.gz
daffm-845b96c9a7f6d80f2042ef5d334fd6842d617f27.zip
Add stripping quotes for toml keys
Diffstat (limited to 'lib')
-rw-r--r--lib/Daffm/Configuration.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Daffm/Configuration.hs b/lib/Daffm/Configuration.hs
index cc4749d..afcca08 100644
--- a/lib/Daffm/Configuration.hs
+++ b/lib/Daffm/Configuration.hs
@@ -37,5 +37,6 @@ keymapCodec = Toml.dimap (const Map.empty) toKeymap . keymapRawCodec
where
keymapRawCodec = Toml.tableMap Toml._KeyText Toml.text
toKeymap = Map.fromList . map (bimap toKeys toCmd) . Map.toList
- toKeys = fromMaybe [] . parseKeySequence
+ toKeys = fromMaybe [] . parseKeySequence . stripQuotes
toCmd = fromMaybe CmdNoop . parseCommand
+ stripQuotes txt = fromMaybe txt (Text.stripPrefix "\"" txt >>= Text.stripSuffix "\"")