@@ -153,10 +153,35 @@ impl App {
153153
154154 fn ui < B : Backend > ( & mut self , f : & mut Frame < B > ) {
155155 // Layout
156+
157+ let content_help = Layout :: default ( )
158+ . direction ( Direction :: Vertical )
159+ . constraints ( [ Constraint :: Min ( 0 ) , Constraint :: Length ( 1 ) ] . as_ref ( ) )
160+ . split ( f. size ( ) ) ;
161+
156162 let master_detail = Layout :: default ( )
157163 . direction ( Direction :: Horizontal )
158164 . constraints ( [ Constraint :: Percentage ( 30 ) , Constraint :: Percentage ( 70 ) ] . as_ref ( ) )
159- . split ( f. size ( ) ) ;
165+ . split ( content_help[ 0 ] ) ;
166+
167+ // Help
168+
169+ let help = Spans :: from ( vec ! [
170+ // ⏴⏵⏶⏷
171+ Span :: styled( "⏶/⏷" , Style :: default ( ) . fg( Color :: Blue ) ) ,
172+ Span :: styled( ": navigate" , Style :: default ( ) . fg( Color :: LightBlue ) ) ,
173+ Span :: raw( " | " ) ,
174+ Span :: styled( "pgup/pgdown" , Style :: default ( ) . fg( Color :: Blue ) ) ,
175+ Span :: styled( ": scroll" , Style :: default ( ) . fg( Color :: LightBlue ) ) ,
176+ Span :: raw( " | " ) ,
177+ Span :: styled( "ctrl" , Style :: default ( ) . fg( Color :: Blue ) ) ,
178+ Span :: styled( ": fast scroll" , Style :: default ( ) . fg( Color :: LightBlue ) ) ,
179+ Span :: raw( " | " ) ,
180+ Span :: styled( "q" , Style :: default ( ) . fg( Color :: Blue ) ) ,
181+ Span :: styled( ": quit" , Style :: default ( ) . fg( Color :: LightBlue ) ) ,
182+ ] ) ;
183+ let help = Paragraph :: new ( help) ;
184+ f. render_widget ( help, content_help[ 1 ] ) ;
160185
161186 // Jobs
162187 let max_user_len = self . jobs . iter ( ) . map ( |j| j. user . len ( ) ) . max ( ) . unwrap_or ( 0 ) ;
0 commit comments