1{-# LANGUAGE FlexibleContexts #-}
3{-# LANGUAGE LambdaCase #-}
4{-# LANGUAGE OverloadedStrings #-}
5{-# LANGUAGE RankNTypes #-}
6{-# LANGUAGE ScopedTypeVariables #-}
7{-# OPTIONS_GHC -threaded #-}
10import Control.Monad.Fix
11import Control.Monad.IO.Class
12import Control.Monad.Trans.Reader
14import qualified Graphics.Vty as V
17import Reflex.Vty.Widget
23 tellShutdown . fforMaybe inp $ \case
24 V.EvKey V.KEsc _ -> Just ()
31testBoxes :: (Reflex t, MonadHold t m, MonadFix m) => VtyWidget t m ()
34 let region1 = fmap (\(w,h) -> Region (w `div` 6) (h `div` 6) (w `div` 2) (h `div` 2)) size
35 region2 = fmap (\(w,h) -> Region (w `div` 4) (h `div` 4) (2 * (w `div` 3)) (2*(h `div` 3))) size
36 pane region1 (constDyn False) . box singleBoxStyle $ debugInput
37 pane region2 (constDyn True) . box singleBoxStyle $
38 splitVDrag (hRule doubleBoxStyle) (box roundedBoxStyle debugInput) (box roundedBoxStyle dragTest)
41debugFocus :: (Reflex t, Monad m) => VtyWidget t m ()
44 string $ show <$> current f
46debugInput :: (Reflex t, MonadHold t m) => VtyWidget t m ()
48 lastEvent <- hold "No event yet" . fmap show =<< input
51dragTest :: (Reflex t, MonadHold t m, MonadFix m) => VtyWidget t m ()
53 lastEvent <- hold "No event yet" . fmap show =<< drag V.BLeft
56testStringBox :: (Reflex t, Monad m) => VtyWidget t m ()
57testStringBox = box singleBoxStyle .
58 string . pure . take 500 $ cycle ('\n' : ['a'..'z'])
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list