linutil icon indicating copy to clipboard operation
linutil copied to clipboard

feat: Added available keybinds display

Open GHaxZ opened this issue 1 year ago • 3 comments

Pull Request

Title

Add a bottom bar displaying available key options based on the currently focused area.

Type of Change

  • [x] New feature
  • [ ] Bug fix
  • [ ] Documentation update
  • [ ] Refactoring
  • [ ] Hotfix
  • [ ] Security patch
  • [ ] UI/UX improvement

Description

Since there was no indication of available key bindings, I thought it would be useful to display them. The key options are bound to the currently focused area, so the key bindings update dynamically. The actual key bindings and their descriptions are manually defined in the keys.rs file.

Testing

  • Verified that the key binding hints update based on the focused area.
  • Tested if the added UI components affect any existing ones.

Impact

In my opinion, this feature will greatly improve the user experience by making all available options immediately clear. Currently, users are not aware that features such as theme switching and action previewing are available.

Issue related to PR

I considered the possibility of generating the key binding hints automatically based on the currently available key bindings, so they wouldn’t need to be manually defined. However, since the key bindings are not explicitly defined anywhere, this doesn’t seem feasible, at least to my understanding. Does anyone have suggestions regarding this?

Also, if the bottom bar and its content doesn't look good, I could change stuff to make it look as expected :)

Checklist

  • [x] My code adheres to the project's coding and style guidelines.
  • [x] I have performed a self-review of my code.
  • [x] I have commented my code, especially in hard-to-understand areas.
  • [x] I have made corresponding changes to the documentation.
  • [x] My changes generate no errors, warnings, or merge conflicts.

GHaxZ avatar Sep 06 '24 19:09 GHaxZ

When i run this the up shortcut is shown twice: Enter/right/l Exec down/j Down up/k Up left/h Back up/k Up / Search q Quit t Next theme T Prev theme

si-lyn avatar Sep 06 '24 19:09 si-lyn

Accidentally added up twice, should be fixed now

GHaxZ avatar Sep 06 '24 20:09 GHaxZ

Sorry for the inconvenience. We had a massive restructure of the codebase to improve future development. Because of this can you update your PR to the new structure. Thank you for your assistance and contribution.

ChrisTitusTech avatar Sep 12 '24 18:09 ChrisTitusTech

This PR should be closed as PR https://github.com/ChrisTitusTech/linutil/pull/293 was merged with the same feature

jeevithakannan2 avatar Sep 15 '24 05:09 jeevithakannan2

[!CAUTION] @ChrisTitusTech don't merge this PR it was already implemented in https://github.com/ChrisTitusTech/linutil/pull/293

jeevithakannan2 avatar Sep 15 '24 05:09 jeevithakannan2

As someone mentioned, this feature was added in #293 already

GHaxZ avatar Sep 15 '24 09:09 GHaxZ