diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-10-05 16:46:13 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-10-05 17:05:22 +0530 |
| commit | 845b96c9a7f6d80f2042ef5d334fd6842d617f27 (patch) | |
| tree | 5c5f95acc25adcd400c7f1a658f571d70a6c365b | |
| parent | 332fed0c0936a48b5cb68ebd7b2dc4d96003008e (diff) | |
| download | daffm-845b96c9a7f6d80f2042ef5d334fd6842d617f27.tar.gz daffm-845b96c9a7f6d80f2042ef5d334fd6842d617f27.zip | |
Add stripping quotes for toml keys
| -rw-r--r-- | config.toml | 2 | ||||
| -rw-r--r-- | lib/Daffm/Configuration.hs | 3 | ||||
| -rw-r--r-- | notes.org | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/config.toml b/config.toml index efeaf3f..2e58799 100644 --- a/config.toml +++ b/config.toml @@ -23,4 +23,4 @@ mf = "cmdline-set !touch " dd = "!rm -rfi %f" sdd = "!sudo rm -rfi %f" -pi = "!!clear; chafa -f kitty %" +"<space>p" = "!!clear; chafa -f kitty %" 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 "\"") @@ -17,7 +17,7 @@ - [X] Error handling - [X] Expand ~ to home in internal commands (cd) - [X] Show current pending keys in statusline -- [ ] Opener configuration +- [X] Opener configuration - [ ] Cmdline history - [ ] Cli arg parsing (dir arg) ** Right after |
