Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TermiFind Interactive #2

Open
JosephTLyons opened this issue Feb 15, 2020 · 2 comments
Open

Make TermiFind Interactive #2

JosephTLyons opened this issue Feb 15, 2020 · 2 comments
Labels

Comments

@JosephTLyons
Copy link
Owner

JosephTLyons commented Feb 15, 2020

TermiFind's ultimate goal is to be interactive, like the macOS Finder. It needs to be fitted with a mechanism to allow for moving through directories and selecting files. This could require some Terminal manipulation libraries, such as:

ncurses-rs
crossterm

These can be used to wipe the screen entirely and reprint the whole structure with any changes based on the interaction or certain parts of the screen can be updated. The second option will probably require a rewrite of the system. I'm more in favor of leaning towards any options that avoid using crates with unsafe Rust code.

Some actions that should be possible are:

  1. Left and right arrow keys to navigate directories, popping off or adding DirectoryContainers on the right side.
  2. Up and down arrow keys to browse files
    • Highlighting a new directory should show a preview of its contents, as either a new DirectoryContainer to the right of the current one.
    • Highlighting a file should show a container with the file's metadata in it.
  3. Pressing enter to open a system application for that file type or to open a terminal editor
  4. Maybe an action to return the currently selected path to the shell and close TermiFind.
@JosephTLyons JosephTLyons changed the title Make TermiFind interactive Make TermiFind Interactive Feb 19, 2020
@ali-wells
Copy link
Contributor

Hi @JosephTLyons did you decide on a library for this in the end?

@JosephTLyons
Copy link
Owner Author

@techno808, sorry for my delayed response, I'm still actually not sure. I've been over almost everything that is out there, but feel unsure of which way to go. I'm open for suggestions.

I've only done just a few trivial things to TermiFind recently, but I have been building a crate that I anticipate TermiFind needing.

https://github.com/JosephTLyons/file_set

This is basically a tool that lets you sift through files, narrow them down through searches, order by size or name, filter out specific types of directory items, such as symlinks or directories, etc. Right now, TermiFind doesn't offer anything in terms of what files to show or not show other than being able to sort by file name or by item type (directory, file, symlink). I would like the user to be able to enter in their settings how they want their files displayed / ordered / filtered and use the FileSet crate under the hood to make it happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants