ChrisTitusTech / linutil

Chris Titus Tech's Linux Toolbox - Linutil is a distro-agnostic toolbox designed to simplify everyday Linux tasks.
https://christitus.com
MIT License
2.01k stars 170 forks source link

feat: Added available keybinds display #291

Closed GHaxZ closed 2 days ago

GHaxZ commented 1 week ago

Pull Request

Title

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

Type of Change

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

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

si-lyn commented 1 week ago

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

GHaxZ commented 1 week ago

Accidentally added up twice, should be fixed now

ChrisTitusTech commented 5 days ago

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.

jeevithakannan2 commented 2 days ago

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

jeevithakannan2 commented 2 days ago

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

GHaxZ commented 2 days ago

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