diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-10-02 18:43:24 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-10-02 18:43:24 +0530 |
| commit | 51e29e21ca118ec690f20eaaf7b2b42c0a90e5e6 (patch) | |
| tree | 455b215c64d493bda6a8d6bb689a02c58b15567f /lib/Daffm/Types.hs | |
| parent | 5364332c05749268000c2ac3f0e6880f965e5fdc (diff) | |
| download | daffm-51e29e21ca118ec690f20eaaf7b2b42c0a90e5e6.tar.gz daffm-51e29e21ca118ec690f20eaaf7b2b42c0a90e5e6.zip | |
Simple file explorer ui
Diffstat (limited to 'lib/Daffm/Types.hs')
| -rw-r--r-- | lib/Daffm/Types.hs | 29 |
1 files changed, 29 insertions, 0 deletions
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) |
