-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add vim like command mode * Colon now enters command mode * Added a modal approach kept track of in Program struct Current modes: normal, command, exit * Changed previous fn run -> fn run_normal_mode * Add basis for future command mode commands * Add cmd mode for infobar, cmd mode help and quit * Modified infobar so that it takes a &str called msg in the case of command mode displays what the user is currently typing * Add :help to print the help message and return to normal mode * Add :quit to terminate the program from command mode Command mode is any mode that requires user input * Moved command_mode related functions into its own file * Command Mode Features: * newglob (takes only one paramter). Properly handles ~/$HOME when provided by user. When the current path exists in the current vec of images and in the future one, remain at its index * sort (optionally one paramter). if called alone just performs the selected sort on the images, if provided with a second argument (a SortOrder) switch to that then sort. User is moved to new index of current image prior to sort * reverse, reverses the current set of images, keeping the index of the current image * destfolder, sets the destination folder * help, exits command mode and displays help info in normal mode * quit, terminates program Increased performance, inside command_mode function get_command by not rendering user input ever event, but only when it changes * Add dependency shellexpand to properly handle ~/$HOME/env vars * Add Mode, Error, to display error messages * ui.rs Mode variants now take Strings if they need to display on infobar * sdl2 text_input is used to handle keys like 'j','k', 'q', etc * changed help to '?' instead of 'h' * Updated README with Command mode options * Now properly handles env vars and ~ * Entering command mode toggles bar on by default * Paths::current_dir -> base_dir, better track of df * Changes to dest_folder is now kept track for the case of newglob to maintain the invariant that if the user hasn't set dest folder, images should be moved to "./keep" by default unless specified otherwise
- Loading branch information
1 parent
f143ac1
commit f2d49ba
Showing
9 changed files
with
618 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.