ckath / fuf Goto Github PK
View Code? Open in Web Editor NEWFairly Usable cli Filebrowser
License: MIT License
Fairly Usable cli Filebrowser
License: MIT License
at the moment its still very much a ripped apart and taped back together scope.sh from ranger, could go with cleaning and simplifying. maybe also list the dependencies it takes to get it fully working.
edit: pretty much implemented
add flags for sorting similar to ls. also include a usage print
while scrolling/loading lockups and segfaults are mostly handled, the resize handling seems to still cause a lot of issues. when loading previews or directories resizes seem to trigger a lot of crashes.
seems on cases like gg
and G
it renders the previous preview again, then the right one.
this means if the top/bottom is a text one an image will be over it.
possible fixes:
partly #1 but I feel like I'll leave this regardless of cleaning the script up. as of now some things are manually configured to finetune the w3m preview:
Lines 11 to 16 in 5cc60b6
currently when pressing k
at the first item or j
at the last item a refresh is still called, this is not needed.
whenever things mess up and the layout gets fuckered a refresh_layout which gets called all the time doesnt fix it, something like redrawing the entire layout forcefully with a keybind might be useful, unless all the corruption issues are fixed.
either going into an empty directory, creating an item, then refreshing or deleting the last item and then refreshing, causes a crash. since going back on directory and then into the current directory doesnt crash I'd imagine its a small thing with the items array
open_file relies on an extremely terrible hack/implementation for getting what program is launched:
steps to fix:
this will be implemented in the same branch as the #2 issue: open_improvement
open_with
seems to work very inconsistently, some directories it doesnt work, others it does. this needs to be fixed to work solid
possibly related to #3, though it also happens when loading is well and done. it seems most reproducible when scrolling over audio files(using mediainfo without exiftool) but can also happen at random. sometimes its fixable with an R
, other times the entire terminal requires a restart. this might be related to the shoddily implemented ext_kill:
Lines 13 to 31 in 2f9e773
there are cases where fullscreening something freezes the ui from updating, seems to differ per system how easy this is to trigger but it isnt great that its possible to begin with
In fuf.c you get the value of environment variables several times by calling getenv. I think it would look more readable if they were defined as constants so you do not have to keep typing the function.
I can send this https://github.com/EastAPOLO/fuf/commit/0090fced59a67e127988d253cc54153739d9ac97 as a pull request if you want.
currently its possible to quickly load a directory while the preview script is still loading, this causes corruption as both threads try to update the screen. there are more unspecified ways to trigger this, the best would be a solution to stop the threads colliding at all.
I think it would be great if fuf had bookmarks so you can go to any directory specified in a bookmarks file assuming it exists. The user should be responsible to create this instead of it being automatically generated, unless you think it should be otherwise? I already have it working but its hardcoded, I think changing it to read a file with absolute paths makes sense. A goto should start with 'g' so you could have "gd" with the absolute path after that as goto documents for instance. I'm not planning on adding any fancy file edit operations as you state in the README, this isn't a goal of fuf, but I'm curious about your opinions on this feature.
currently the binary is just there in the dir you built it and it can be symlinked to the bin dir with strap
, this relates to #5 since scripts are similarly symlinked to the ~/.config/fuf dir from here.
ideally make install
would setup the scripts in a sensible default location (after #5 is realized), and throw the bin in /usr/bin
the open script is currently very, very minimal. could go with some more filetypes to recognize and open in sensible software
currently sizes are displayed as is from stat, because I'm lazy. it'd be nice to have B/KB/GB/TB etc instead
the default open and preview scripts are merely ported and stripped down versions of rangers scripts, as I don't personally use a lot of programs I'm not sure how sensible these defaults are.
the following open/preview improvements are always welcome either as comment, separate issue or pr:
there are cases where after a canceled long loading preview (rendering a huge image, loading a directory that gets stuck) the next file doesn't preview correctly. however the file after that, or a reload (r
) will preview fine. the issue isn't always reproducible.
I suspect this is something to do with the shoddily implemented preview thread, which is a huge pain in the ass to debug
sometimes really large directories hang at "loading: 0", a later attempt always works. cancelation of this hang is also not possible. either would fix this issue:
it might also be this is just file io being file io (I can nearly hang loading when loading with multiple file managers too). in which case I'll just close this later
since fuf doesnt do any file edit operations it would make sense to make a 'open shell in current directory' feature. fuf would wait for the shell to exit to continue. probably bind it to s
or something
currently fuf checks for the open and preview scripts in ~/.config/fuf/{open,preview}. its far more sensable to check for them in a default location and let users overwrite them with custom their own scripts in ~/.config/fuf.
a keybind to open the current file with a program of choice the user is prompted for, bypassing the open script.
atm when you cancel loading (by pressing literally any key) it just stops dead in its tracks and handles the next keypress. while this works for most cases, it doesnt make a lot of sense when you're going back directories (h
), in which case l
will select a random directory from the currently loading directory.
this should be changed to make l
stay in the shown directory, a variable goto_item
is already defined and used to handle selecting this directory, so implementation of this extra functionality should be trivial.
when compiling with any optimization (-Os -O2 -O3 etc) fuf segfaults, I've run it through sanitizers and debuggers with limited success. this should probably be fixed at some point, unless a newer gcc version will suddenly start to like it.
some basic completion for the few command line options would be neat, at least for the zsh and bash shell. info can just be the same as is in usage (-h)
since I'll implement them separately I'll just leave this checklist:
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.