Commit Graph

20 Commits (053615b0415caae1159297718223f2a3b46a3827)

Author SHA1 Message Date
Arijit Basu 053615b041 Fix linting errors 2 years ago
Arijit Basu f2713d9549
Fix support for readline keys 2 years ago
Arijit Basu f10fad958d Upgrade deps 2 years ago
Arijit Basu 48ab6eac21 Add on_function key handler
This adds `on_function` handler to handle F1-F12 keys.

This also fixes issues with previously added handlers and adds a
checklist for future additions.
3 years ago
Arijit Basu 05c2f7aa68 Support more control over input buffer
This PR adds a new message: `UpdateInputBuffer: InputOperation`

This makes it possible to perform cursor based input operations without
needing input from the keyboard.
3 years ago
Arijit Basu b45a553a0c Add more keyboard input handlers
This PR adds 3 more keyboard input handlers:

- on_alphanumeric
- on_character
- on_navigation

Also updates documentation.
3 years ago
Arijit Basu ca6cefb1c1 Use tui-input to handle input buffer
New message: `UpdateInputBufferFromKey` to replace most
`BufferInputFromKey` usage.

This adds more functionalities to the input buffer and reduces
boilerplate code.

This commit also deprecates `config.general.cursor` as the cursor will
be set by the terminal from now.

Repo: https://github.com/sayanarijit/tui-input
3 years ago
Arijit Basu 5723acc21b Fix input conversion logic 3 years ago
Arijit Basu b3e6679b50 Add feature dynamic UI
Now, users can change the UI layout via the `SwitchLayout{Builtin|Custom}`
message, or by using key `ctrl-w`.

There are 3 default layout options -

- default
- no_help
- no_selection
- no_help_no_selection

Also, the initial mode and the initial layout can be specified in the
config.

Closes: https://github.com/sayanarijit/xplr/issues/107
3 years ago
Arijit Basu 9fce3b1d14 Fix space input 3 years ago
Arijit Basu 1bb2622f24 Improve key inputs
Add support proper implementations of -

- backspace
- ctrl-w
- ctrl-u

Also, improved sort and filter behavior.

Fixes: https://github.com/sayanarijit/xplr/issues/77
3 years ago
deadjakk be2911e073 Fixed error preventing compilation
Removed comma.

Error was as follows:
error: no rules expected the token `,`
   --> src/input.rs:373:29
    |
373 |                 | Self::Num9,
    |                             ^ no rules expected this token in macro call

error: aborting due to previous error
3 years ago
Arijit Basu dba8631911 Add CI/CD gh actions
Mostly stolen from https://github.com/Rigellute/spotify-tui.
3 years ago
Arijit Basu 3572d26b95
Too big of a rewrite 3 years ago
Arijit Basu 98920637f9
Number input 3 years ago
Arijit Basu 53b18ae8f4
Use # instead of ? to debug app 3 years ago
Arijit Basu 096489dee4
Use "esc" instead of "escape" 3 years ago
Arijit Basu 669151c70e
Show help menu 3 years ago
Arijit Basu 720ba38b4d
Some important fix (don't look) 3 years ago
Arijit Basu f9c3edee06
Not yet doing what it's supposed to 3 years ago