mirror of
https://github.com/chshersh/github-tui.git
synced 2024-10-05 14:57:53 +03:00
Decrease FPS
This commit is contained in:
parent
a7ff3e67b7
commit
26dff75139
@ -1,4 +1,4 @@
|
|||||||
version = 0.26.1
|
version = 0.26.2
|
||||||
profile = default
|
profile = default
|
||||||
break-cases = fit-or-vertical
|
break-cases = fit-or-vertical
|
||||||
break-infix = wrap-or-vertical
|
break-infix = wrap-or-vertical
|
||||||
|
@ -16,4 +16,5 @@ let app = Minttea.app ~init:Init.init ~update:Update.update ~view:View.view ()
|
|||||||
let start repo root_dir_path =
|
let start repo root_dir_path =
|
||||||
let initial_data = init ~repo ~root_dir_path in
|
let initial_data = init ~repo ~root_dir_path in
|
||||||
let initial_model = Model.initial_model initial_data in
|
let initial_model = Model.initial_model initial_data in
|
||||||
Minttea.start app ~initial_model
|
let config = Minttea.make_config ~fps:1 () in
|
||||||
|
Minttea.start ~config app ~initial_model
|
||||||
|
@ -27,19 +27,22 @@ let move_next (model : Model.t) =
|
|||||||
let update event (model : Model.t) =
|
let update event (model : Model.t) =
|
||||||
match event with
|
match event with
|
||||||
(* if we press `q` or the escape key, we exit *)
|
(* if we press `q` or the escape key, we exit *)
|
||||||
| Event.KeyDown (Key "q" | Escape) ->
|
| Event.KeyDown ((Key "q" | Escape), _modifier) ->
|
||||||
(model, Command.Seq [ Command.Exit_alt_screen; Command.Quit ])
|
(model, Command.Seq [ Command.Exit_alt_screen; Command.Quit ])
|
||||||
(* if we press a digit, we switch to the corresponding tab *)
|
(* if we press a digit, we switch to the corresponding tab *)
|
||||||
| Event.KeyDown (Key "1") ->
|
| Event.KeyDown (Key "1", _modifier) ->
|
||||||
({ model with current_tab = Model.Code }, Command.Noop)
|
({ model with current_tab = Model.Code }, Command.Noop)
|
||||||
| Event.KeyDown (Key "2") ->
|
| Event.KeyDown (Key "2", _modifier) ->
|
||||||
({ model with current_tab = Model.Issues }, Command.Noop)
|
({ model with current_tab = Model.Issues }, Command.Noop)
|
||||||
| Event.KeyDown (Key "3") ->
|
| Event.KeyDown (Key "3", _modifier) ->
|
||||||
({ model with current_tab = Model.PullRequests }, Command.Noop)
|
({ model with current_tab = Model.PullRequests }, Command.Noop)
|
||||||
(* directions/movements *)
|
(* directions/movements *)
|
||||||
| Event.KeyDown (Up | Key "k") -> (move_up model, Command.Noop)
|
| Event.KeyDown ((Up | Key "k"), _modifier) -> (move_up model, Command.Noop)
|
||||||
| Event.KeyDown (Down | Key "j") -> (move_down model, Command.Noop)
|
| Event.KeyDown ((Down | Key "j"), _modifier) ->
|
||||||
| Event.KeyDown (Left | Key "h") -> (move_back model, Command.Noop)
|
(move_down model, Command.Noop)
|
||||||
| Event.KeyDown (Right | Key "l") -> (move_next model, Command.Noop)
|
| Event.KeyDown ((Left | Key "h"), _modifier) ->
|
||||||
|
(move_back model, Command.Noop)
|
||||||
|
| Event.KeyDown ((Right | Key "l"), _modifier) ->
|
||||||
|
(move_next model, Command.Noop)
|
||||||
(* otherwise, we do nothing *)
|
(* otherwise, we do nothing *)
|
||||||
| _ -> (model, Command.Noop)
|
| _ -> (model, Command.Noop)
|
||||||
|
Loading…
Reference in New Issue
Block a user