Hacker News new | ask | show | jobs
by alias_neo 41 days ago
I wonder if something like this could work for thumbnails in the terminal; I prefer to browse my filesystem from a terminal rather than the point and click file manager typically, and it would be really useful if I could have a grid-style `ls` with terminal based renders of the 3d models (thinking STL/STEP, 3D printing) in that directory. Bonus points if I could preview/rotate the model to inspect it.
4 comments

You can do this with thumbnails using sixels already
You could probably do something interesting with Tek 4014 emulation, but I think you're right that sixel would be slick.
as a compromise i started using nemo/n̶a̶u̶t̶i̶l̶u̶s̶ with a plugin that puts a terminal at the bottom of each tab. so i have a graphical view of the terminal but a commandline in the same folder right next to it. the two don't interact other than being able drag and drop filenames from the filemanager into the terminal, so it is far from what we really want, but it's a small start.
Do you mind sharing a little more about the plugin you use? A quick online search wasn't very helpful to me but I've also been hoping for something like this.
i am using the nemo filemanager which is a fork of an older version of nautilus. https://github.com/linuxmint/nemo-extensions

fedora has a package for it. just installing it will make the plugin available so it can be activated within nemo preferences.

one problem is that common terminal shortcuts are captured by the filemanager. ctrl-c for example will copy a file from the file manager and not kill a process in the terminal if you have something selected (there is no shortcut to unselect everything (you can do ctrl-a,shift-ctrl-i (select all/invert selection))).

if any shortcuts bother you, these keys can be changed in ~/.gnome2/accels/nemo

i wish the shortcuts would work based on where your focus is.

as for nautilus it appears that it no longer supports the APIs needed for the terminal: https://github.com/flozz/nautilus-terminal

dolphin also supports builtin terminal, but it shares the same terminal between all tabs which is a bit less convenient. it handles control keys a bit better though.

despite its shortcoming this integration has changed the way i work and got me interested in exploring better solutions.

now when i want to run a command i go to the right tab, the visual presentation of the contents tell me that i am in the right directory, and i can run the command in the right context.

i do a lot of stuff in the terminal, but i prefer a visual orientation. i normally use tmux everywhere, and i have a tmux window open for each directory that i operate in. but ls or terminal file managers are not visual/interactive enough. sorting for example depends on the use case. in a file manager i can have different tabs sorted as i like, in tmux i would have to remember the right ls command and then still don't see everything i need, especially selecting multiple files for opening at once in the terminal is a lot of typing, whereas in the file manager it is a few clicks. a separate terminal and file manager window would make it difficult to keep the two connected. (although a window manager feature that allows me to connect windows would be cool)

eza [1] is a step in that direction. It lacks the interactivity, however.

[1]: github.com/eza-community/eza

yazi[0] seems to be able to display images iirc. Does it work for your use-case, hope this helps ya!

[0]: https://github.com/sxyazi/yazi