From 51e29e21ca118ec690f20eaaf7b2b42c0a90e5e6 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 2 Oct 2025 18:43:24 +0530 Subject: Simple file explorer ui --- lib/Daffm/Types.hs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/Daffm/Types.hs (limited to 'lib/Daffm/Types.hs') diff --git a/lib/Daffm/Types.hs b/lib/Daffm/Types.hs new file mode 100644 index 0000000..2a8e97d --- /dev/null +++ b/lib/Daffm/Types.hs @@ -0,0 +1,29 @@ +module Daffm.Types where + +import qualified Brick.Widgets.List as L +import System.Posix.Types (FileOffset) + +data FileType + = RegularFile + | BlockDevice + | CharacterDevice + | NamedPipe + | Directory + | SymbolicLink + | UnixSocket + deriving (Show) + +data FileInfo = FileInfo + { fileName :: String, + filePath :: FilePath, + fileSize :: FileOffset, + fileType :: FileType + } + deriving (Show) + +data AppState = AppState + { stateFiles :: L.List () FileInfo, + stateCwd :: FilePath, + stateParentDir :: FilePath + } + deriving (Show) -- cgit v1.3.1