kamiyaa / joshuto Goto Github PK
View Code? Open in Web Editor NEWranger-like terminal file manager written in Rust
Home Page: https://crates.io/crates/joshuto
License: GNU Lesser General Public License v3.0
ranger-like terminal file manager written in Rust
Home Page: https://crates.io/crates/joshuto
License: GNU Lesser General Public License v3.0
Hi there, I'd like to propose the feature, which could hide joshuto file manager and display terminal for working using bash|zsh|fish console commands in current directory. The feature has been working in my ranger setup by shift + s keymap.
So there's a cool project called trust that you can setup in your project, so that every time you create a new release/create a new tag, it will automatically build binaries for you using travis ci and publish them to the releases tab. This is really nice for people who want to use rust projects but don't want to have to deal with its compile times :D
edit: Looks like that project might be abandoned, but the idea is still the same. Ripgrep and Alacritty both do some sort of similar thing for their projects, so we could always check those out too.
Preview of folder should be removed from memory after a deletion.
@kamiyaa, this is a really cool project. Amazing work !.
I would like to add module level documentation so that it's easier for new
contributors like me to get a hang of the project structure.
Should I give it a go ?
Is there currently a way to do this? Didn't see any examples of it or anything related to it in the keymap.rs
file.
Hi, thanks for the awesome project.
I notice that joshuto doesn't exit with cd into the current browsed dir. Is it possible to match this behavior?
This is a feature request for functionality similar to pressing alt+c
with jethrokuan/fzf in fish-shell. The intended feature would use skim to jump to a particular subdirectory.
On a side note, it may be worth while to investigate using zoxide as a general replacement for cd functions so we could have history/fuzzy cd.
When I checkout master and run Never mind that, I just had some old checkout lying around with the wrong versions.cargo build
, there are all sorts of build errors to do with the tui
crate.
That said, there is still no Cargo.lock
file, which should generally be committed for binary projects so that the correct dependency versions are always downloaded. See here
I think it could be beneficial to replace cd
functions with an implementation of zoxide
since it is written in rust and works the same as cd
with some really great additional functionality
zoxide
is a blazing fast replacement for yourcd
command, inspired byz
andautojump
. It keeps track of the directories you use most frequently, and uses a ranking algorithm to navigate to the best match.
When deleting a file (dD), joshuto asks:
Delete 1 files? (Y/n)
which indicates that only a capital Y confirms deletion. Instead, a capital Y aborts deletion but instead a lowercase y confirms the deletion.
Is it a spelling mistake in the prompt or is the check implemented wrong? What's the desired behavior?
Ranger has this option where if --choosefiles=/some/file/path
is added to ranger
, the selected file's path will be written to the specified path instead of being opened it. This lets certain programs like vim/neovim to use ranger as a file manager.
Hi there, any possibility to have line numbers, absolute or relative, similar to vim? So that we can do vim movement like <#-j> <#-k> <#-gg> etc.?
Thanks for this program!
I am a long time user of Ranger and I love it but I always have to install devicons to make it more readable, https://github.com/alexanderjeurissen/ranger_devicons, can this be built into joshuto?
Hi,
loving this project, thanks a lot!
Seems that there is an issue with the files copy/paste function. The overwrite option ("po" Keymap line 117) gets ignored and the file/folder renamed (number gets appended). Or did I miss some configuration option?
Plus there is a little mistake in the example keymap.toml:
Must be copy_dirname instead of copy_dir (line 111) if I'm correct.
Hi,
It's just an idea, but now that joshuto supports previews and syntax highlighting, it will be an awesome feature to be able to scroll through the preview with '{' and '}' like '[' ']' is used to change the folder from the first column.
I would like to add a feature request so that pressing a key-binding like <alt> + <return>
will exit and CD to the current directory in Joshuto.
Try to make it faster?
I would appreciate it. Also, may I know why it is lagging?
Lets take for example .html
files. How do I configure mime.toml
so that they get opened like in lf, by the default browser.
Or more general, how do I configure mime.toml
or any other of the configuration files, so that any file get opened by xdg-open
with the command according to the settings in my OS. Setting xdg_open = true
or to xdg_open = false
in joshuto.toml
does not change anything.
Let's say I have a folder structure like this
../test/folder
and I want to copy/overwrite (yy
and po
) another folder named folder
into test
I get File exists (os error 17)
. Is overwriting entire folders just not implemented or am I doing something wrong?
I usually do a manual rsync -a ...
to solve it so it doesn't bother me too much. Just curious.
Most TUI programs have a useful list of categorized keybindings that shows when <?>
or shift
+/
are pressed to quickly check which-key does X, or see what commands are available to the user. I believe this is a low-input/high-return improvement for all new users. This would also make the project feel much more polished.
should behave similar to ranger's cd -
I accidentially put a cat $path
in my preview.sh
for image formats when I wanted to test something, so preview.sh
returned cat's output for a binary file. If that happens, Joshuto just crashes.
Of course, a user should take care that the preview
script returns only sensible text, but Joshuto should handle this more gracefully and maybe give the user a hint about what went wrong.
I recognized that the prompt (aka command line) in joshuto can be opened with a semicolon while I would expect a colon. I first thought that it would be a bug, maybe triggered by my keyboard layout or so. However, when checking the code, I found this:
let cmd = KeyCommand::CommandLine("".to_string(), "".to_string());
let keys = [Event::Key(Key::Char(';'))];
insert_keycommand(&mut m, cmd, &keys)?;
in keymapping.rs
.
So, my question is: Is this by intention? If yes, why? Vim or ranger users would expect a colon to open the prompt, I guess. Since joshuto also shows a colon as a prompt, it confuses even more.
Hi, and thanks for a lovely program!
I noticed one small error in the keymap.toml
file in the example section: open_file
instead of open
on line 79.
Edit: found another one. The command copy_dir
does not exist, line 110-112
Using latest ver. on SailfishOS. Installs from crates.io or from building on-device w/ no problem, but won't open. Gives:
"thread 'main' panicked at 'called Result::unwrap()
on an Err
value
: JoshutoError { _kind: TomlDeError
(Error { inner: ErrorInner { kind:
NewlineInString, line: Some(25), co
l: 13, at: Some(1035), message: "",
key: [] } }), _cause: "Failed to p
arse TOML" }', src/config/keymap/ke
ymapping.rs:100:38"
Line 100 says:
"AppKeyMapping::default_res().expect()"
Context is:
"impl TomlConfigFile for AppKeyMapping {
fn get_config(file_name: &str) -> Self {
parse_to_config_file::<AppKeyMappingCrude, AppKeyMapping>(file_name)
.unwrap_or_else(Self::default)
}
}
impl std::default::Default for AppKeyMapping {
fn default() -> Self {
AppKeyMapping::default_res().expect()
}
}"
I'm not familiar with Rust code, so not sure if the error is there, or if that just indicates an error somewhere else...
Thanks
Unlike ranger, joshuto does not show the size of directories (number of files and dirs inside), and does not show any size information for symlinks. Also, joshuto shows symlinked directories like files and with a wrong devicon.
Two views on the same test directory:
I would propose to rework joshuto's display to match ranger's. It just makes sense and the "size" of directories is quite useful.
Furthermore, ranger supports multiple (and custom) views (called “linemode”), which I use for example to show tmsu tags for each file and dir. But that's likely worth its own issue.
Edit: One more difference where the ranger variant makes more sense: When a symlink is selected, the footer bar shows the permission flags of the linked target rather those of the symlink itself, which is always lrwxrwxrwx
.
I have started an experimental implementation.
Ranger has the ability to change the number of pans, I took a look at the code and it seems that layout is hard coded am relatively new to rust, but I will try to add this in.
This has probably come up before, but just in case I thought I'd share this related project:
https://github.com/rabite0/hunter
It's another rust file manager that seems to have died. Maybe there's some salvageable aspects or it might help out down the line. Really looking forward to this project though, keep up the good work! 🙏🏽
The only time I don't choose Joshuto for file management tasks is when I have to drag and drop some files into a webpage on my browser, and that's the only reason I keep pcmanfm, however it feels wrong to keep an extra program and switch programs just for that one quick step. Would it be possible to implement drag and drop with mwh/dragon, maybe as a plugin? It looks like jarun/nnn has an implementation that may be useful to peek at. Maybe we could make some glyph (or even the entire region) clickable, to drag the currently highlighted files.
If you have several tabs, pressing Tab
at the last tab cycles to the first tab. But then if you want to switch to the previous tab with Shift+Tab
on the first tab, joshuto crashes.
It looks like the application loads files/directories into a hashmap, however this operation should be bound to reduce memory usage when using joshuto
for a long time.
Acceptance tests:
Please enable Github Actions for the CI to take effect.
I'm coming here from lf which I like a lot (because it's ultra fast to start and walk through dirs /even network ones/ and supports easy extensibility with shell scripting).
Though there are some long-standing (multiple years) issues with lf I'd like to have fixed because they're pretty much show stoppers for much of the work I do with file managers. Coincidentally they seem to apply to joshuto as well - and if joshuto fixes them, then you have one more user (and occasional contributor especially of configuration/extension scripts 😉).
Other things which joshuto does differently and I'd like it to be configurable/different:
I'd like to configure a shortcut for :cd ~
to quickly go to my home directory, but the command fails with
No such file or directory (os error 2)
Hey I'm not sure what's happening but when I try to use Joshuto inside an rclone mounted (google drive) directory it becomes extremely slow. If I start Joshuto from another directory and navigate into my mounted directory it gets bogged down as well. This used to work fine before.
I think it may have to do with this commit. Rclone only lists files and directories as needed, and I'm guessing Joshuto is trying to recurse through child directories and figure out the size of each directory which would be extremely slow because it's a large directory tree with tons of files that all need to be accessed through an api. As a control I used pcmanfm which worked fine in the same directories.
I tried version 0.7.1 and upstream git.
Every key I try to use is an "Unknown keycode".
Tried with alacritty, mate-terminal, xterm.
When using a command with :shell, like
[[mapcommand]]
command = "shell sxiv -t %s &>/dev/null &"
keys = [ "i" ]
joshuto waits for the process to terminate at command.status()?;
in shell.rs
.
For many use cases, this is pretty unhandy. Instead of using a blocking sub-process call, joshuto could just spawn the sub-process with command.spawn()?;
instead.
Alternatively, joshuto could use two shell commands, one blocking and one non-blocking. (I could take that.)
Either create them in ~/.config/joshuto
or have them in /etc/default/joshuto
or some other directory.
ranger and some other file managers support ueberzug , ueberzug can be used for viewing images , gif and this will work on any terminal , its not terminal specific like w3m :)
https://github.com/seebye/ueberzug
ranger's image preview :
Whenever you open a file from within the program, it opens the selected file, however, joshuto remains open.
Is there a way to tell joshuto to exit itself after opening a file?
Just some food for thought on how to design this:
When trying to open a file that doesn't have an entry in the mimetype.toml
, joshuto outputs Don't know how to open file :(
, but I think it would be good to instead open the file with xdg-open
on Linux and open
on Mac.
Also, just wanted to say this project looks really exciting and great so far!
Hi, would it be possible to add icons, something like https://github.com/ogham/exa does?
When I press e.g. g
, joshuto prints a "help" output for the available multi-keys, such as:
Char('/') change_directory /
Char('M') change_directory /mnt
Char('d') change_directory /dev
Char('e') change_directory /etc
Char('g') cursor_move_home
Char('h') change_directory ~
Char('m') change_directory /media
Char('n') new_tab
Char('o') change_directory /opt
Char('r') change_directory /
Char('s') change_directory /srv
Char('u') change_directory /usr
Char('v') change_directory /var
Why does it say Char('/')
and not just /
?
Also, the output could be sorted better - notice that "M" and "m" are far from each other.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.