aboutsummaryrefslogtreecommitdiff
path: root/lib/Daffm/Action/Core.hs
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-10-04 18:07:30 +0530
committerAkshay Nair <phenax5@gmail.com>2025-10-04 19:10:06 +0530
commita302dfc2aabda53446fb38e035e61ae91b28f84a (patch)
tree67ca03f33ebf31e198ac5a883100b96cc387f264 /lib/Daffm/Action/Core.hs
parentb05be850349dbb813d2af6f3ee7a2fc3bf98b8ef (diff)
downloaddaffm-a302dfc2aabda53446fb38e035e61ae91b28f84a.tar.gz
daffm-a302dfc2aabda53446fb38e035e61ae91b28f84a.zip
Add multi-key handling + command parsing + shell/shell! aliases
Diffstat (limited to 'lib/Daffm/Action/Core.hs')
-rw-r--r--lib/Daffm/Action/Core.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Daffm/Action/Core.hs b/lib/Daffm/Action/Core.hs
index 337801e..ce04073 100644
--- a/lib/Daffm/Action/Core.hs
+++ b/lib/Daffm/Action/Core.hs
@@ -32,10 +32,13 @@ goBackToParentDir = do
dir <- gets stateParentDir
loadDir dir (Text.pack . takeDirectory $ Text.unpack dir)
+changeDir :: FilePathText -> AppEvent ()
+changeDir dir = do
+ loadDir dir (Text.pack $ takeDirectory $ Text.unpack dir)
+
goHome :: AppEvent ()
goHome = do
- dir <- liftIO getHomeDirectory
- loadDir (Text.pack dir) (Text.pack $ takeDirectory dir)
+ liftIO getHomeDirectory >>= changeDir . Text.pack
openSelectedFile :: AppEvent ()
openSelectedFile = do