From c3eb868c3873af2fc556525350bde6faebbd7cc8 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 3 Oct 2025 14:32:44 +0530 Subject: Add "press key to continue" with !! prefix --- lib/Daffm/View.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/Daffm/View.hs') diff --git a/lib/Daffm/View.hs b/lib/Daffm/View.hs index 2bfb7dc..3066c93 100644 --- a/lib/Daffm/View.hs +++ b/lib/Daffm/View.hs @@ -11,22 +11,23 @@ import qualified Data.Vector as Vec import Text.Printf (printf) appView :: AppState -> [Widget FocusTarget] -appView appState@(AppState {stateFiles, stateCwd}) = [ui] +appView appState@(AppState {stateFiles}) = [ui] where - ui :: Widget FocusTarget ui = vBox [vLimit 1 header, box, vLimit 1 cmdline] - header = str stateCwd + header = headerView appState cmdline = cmdlineView appState - box :: Widget FocusTarget box = L.renderList fileItemView True stateFiles hFixed :: Int -> Widget n -> Widget n hFixed w = hLimit w . padRight Max +headerView :: AppState -> Widget n +headerView (AppState {stateCwd}) = str stateCwd + fileItemView :: Bool -> FileInfo -> Widget FocusTarget fileItemView sel fileInfo@(FileInfo {fileSize, fileType}) = hBox - [ hFixed 5 (fileTypeView fileType), + [ hFixed 6 (fileTypeView fileType), hFixed 7 (fileSizeView fileSize), fileNameView sel fileInfo ] -- cgit v1.3.1