dylanaraps / fff Goto Github PK
View Code? Open in Web Editor NEW๐ A simple file manager written in bash.
License: MIT License
๐ A simple file manager written in bash.
License: MIT License
It would make sense to honor this since fff
uses xdg-utils
by default. This would also make it more portable, eliminating the need to add a special fallback for directories on operating systems like Haiku.
The variables could either be swapped out for it (e.g. $FFF_TRASH
could be replaced with $XDG_CACHE_HOME/fff/trash
), or it could be used as a fallback if it exists instead of a hardcoded path (e.g. the line : "${FFF_TRASH:=$XDG_CACHE_HOME/fff/trash}"
could be added).
Would be a useful addition.
If I have to search for a specific folder, I start to type the name of it.
When it is the only one in the list, I have to press enter two times: one to exit from the search mode, another one to enter into the folder. It would be nice to press it once.
Since "changed_files" array stores file names without path, this check does not work:
[[ ${marked_files[i]} != "${changed_files[i]}" ]]
The goal of this issue is to discuss the current file marking behavior and possibly update it to match the wanted and or expected behavior. I want to know what you like and don't like about this feature in other file managers and in fff
.
In fff
you mark files with an operation at the same time. This does save a key-press but it also means committing to an operation while marking. In ranger
you mark files first and then pick an operation to use on said files.
What's the best way of implementing this behavior? What do you like best? And is there a third or fourth option which works better?
I've gotten ranger-like behavior working in #80 but I'd like to see if we can make it even better. I'd love to hear your thoughts. ๐
Like if the user's cursor is on a file, then he/she can press key 'x' to see basic attributes of that file.
make sense?
After selecting files with d
and pressing p
to move them to the trash folder the question dialog appears. After confirming it with y
nothing happens - the files are still there. What could be the problem?
to be able to move/copy multiple files instead of just one, between folders
Just a feature request:
fff path/to/folder # should open the folder
vim
/nvim
plugin.w3m-img
support.chafa
support.Hi, first of all thanks :) that's a nice and funny soft here.
Right now, the search is only applied when we press enter after /toto[ENTER].
What would be great is to be able to search "in real time", that is, only the files/folders compatible with ongoing search would be shown. For instance, If i'm willing to search for /toto, then when typing the first /tot, I would have only folders toti and toto shown.
Anyway thanks, :) and have fun
Maybe it's a good addition if, for example, I wanted to mark file A and then mark file H, then files B to G are also marked. Or maybe it's already existing and I missed it? Thanks!
With ranger
, I tend to use the s
key to drop into a the default login shell in the current directory often. This might be related to generally adding keybindings or shortcuts, but I think it would be useful.
In the Usage section is mentioned that
s: open shell in current dir
which isn't the case anymore.
Could you update this to:
!: open shell in current dir
?
Thanks
When I search for a file, I'd like fff to find results that are more than 1 level deep. Or maybe this currently works as designed? If so, a quick mention of this behavior in the Readme would be good.
#!/usr/bin/env bash
#
# opener
[[ -z $1 || ! -e $1 ]] &&
exit 1
mime_type="$(file -biL "$1")"
case "$mime_type" in
text/*|*/xml)
"${VISUAL:-${EDITOR:-vi}}" "$1"
;;
image/*)
qiv -tBl "$1"
;;
video/*)
mpv "$1"
;;
audio/*)
mpv "$1"
;;
application/pdf*)
"${BROWSER:-firefox}" "$1"
;;
*opendocument*|*openxmlformats*)
libreoffice "$1"
;;
*)
printf '%s\n' "warn: No program defined for $mime_type"
;;
esac
There seems to be no way to cancel text input or search filters right now. As a workaround, I press .
twice, toggling hidden files and then untoggling, therefore reloading the directory listing.
I'd love to use this to navigate quickly to other directories and have my terminal actually end up in those directories after exiting via q
. Does this functionality exist currently and I just missed it?
The escape sequence for cursor position fails when the keyboard repeat rate is too high.
I would like to package fff for voidlinux but was asked to get an tagged rupstream release. (void-linux/void-packages#4174). Would this be possible?
So far you always move the trash to the $FFF_TRASH
directory:
https://github.com/dylanaraps/fff/blob/master/fff#L337-L348
But some people (like me) wrote their own trash command (which actually prevents some files to be trashed and stores meta-information like modification time, owner, original path etc along with a meta-file).
I would love to have a $FFF_TRASH_CMD
that gets checked and run and only if not set, fff
should execute an mv
command.
Window resize now doesn't interrupt read
and execute. It waits for read.
Not sure if anyone can reproduce.
Possibly related:
dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will
not interrupt open/read/write system calls.
i. The shell no longer runs traps if a signal arrives while reading command
substitution output.
nnn. The `read' builtin now does a better job of acting on signals that don't
interrupt read(2).
https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00060.html
Let me go through how signal handling works. Maybe that will make the
current question clearer.
- SIGWINCH arrives during a read(2)
- The readline signal handler is executed and sets a flag noting that
it received SIGWINCH. It also calls the application's SIGWINCH handler,
if one is installed, to allow it to do the same.
- Since SIGWINCH is not one of those signals that interrupts system calls,
the read(2) is restarted. When it completes -- that is, when a key is
pressed and read returns data -- readline handles the SIGWINCH. Handling
the signal includes updating the internal state about the screen size,
performing any needed redisplay, and calling an application-specified
signal hook. In bash, that hook is what runs the traps.
https://lists.gnu.org/archive/html/bug-bash/2014-05/msg00070.html
Right now using archlinux so it installs in /usr/bin/fff
If its possible to edit configurations from $HOME/.config/fff/fff.conf it gives easier way to handle dotfiles.
Tho not sure if its the philosophy of this program. But it would make it more fun to customize it.
Sample root directory:
/bin
/etc
. . .
/sys
Problem: If I go to /etc and go back, /bin gets selected. And the weird thing is, it only happens in the root. Works fine in deeper directories.
Can we make (for example) the trash operation customizable?
I use a custom written trash command.
For now it is hardcoded:
https://github.com/dylanaraps/fff/blob/master/fff#L71
Also wondered if I could easy add my own actions? I would love to add "send-by-mail" and alike without modifying this source too much.
If you say this is going to kill the purpose of fff
I am fine with that as well.
Thanks and have a nice day!
Easier to install and mantain under macos
thanks
First folder/file indicates (0/nth) in the status instead of (1/nth).
typing :~/src
does not find /home/reavessm/src
but typing the full name does. Also, it would be nice to have tab complete on names.
It would be cool if a "duplicate" command could be added..
Edit: Copy/Paste seem to work only across folders, not within the same folder.
Perhaps something like (note: I am not a bash god)
cp "${f[l]}" "copy_${f[l]}" ;;
It makes it easier to package https://www.archlinux.org/packages/community/any/fff/
These lines
https://github.com/dylanaraps/fff/blob/master/fff#L38-L55
should probably be replaced by a simple grep and extracted into their own file with all supported exts
.
I have no idea why but in voidlinux if you use fff from the repo or even here (github), randomly the process just open using 100% of my cpu, I have no idea how to reproduce this, I just installed it and happens whenever I use it or not.
Im using VoidLinux, kernel linux 4.19.19_1, bspwm, xst.
Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz.
HP family graphic cards 3000.
ยฏ\_(ใ)_/ยฏ not ยฏ(ใ)/ยฏ
Three backslashes
ยฏ\\\_(ใ)_/ยฏ
working on this.
I added the following code at the starting of open() function
echo $1 >> out
here is the 'out' file while using the fff
/home/nikunj
/home
//media
//media/nikunj
//media/nikunj/MJRO1714
//media/nikunj/MJRO1714/abc.avi
an extra '/' at the starting of the file path will prevent xdg-open to work correctly
the following command did not work
xdg-open '//media/nikunj/MJRO1714/abc.avi'
the result to the above command was
main.go:63: openFile: "/nikunj/MJRO1714/abc.avi"
main.go:70: stat /nikunj/MJRO1714/abc.avi: no such file or directory
Reproduce: open fff, navigate to directory, navigate back --> infinite loop, 100% CPU.
macOS, iterm2
fff version of a few minutes ago
fff is working perfectly but it wont let me change colors. i have installed from git and from the release source code. also i noticed the favorites (bookmarks) doesnt work for me. the keybind is the just the numbers right? (ex: 1-key or 3-key)
i have added these lines in my bash.rc
alias ls='ls --color'
LS_COLORS='di=94:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rpm=90'
export LS_COLORS
changing colors in FFF_COL1,2,3,4 in fff.1 doesnt change anything either. also is there anyway to switch the default image opener? w3m in fff works great but i would like opening a picture to use sxiv
https://imgur.com/a/qlsKlNf
I've tried changed every variable I can think of (EDITOR
,VISUAL
,FFF_OPENER
) to multiple different editors, but no matter what fff refuses to open files, it just blinks for a second and then goes back to normal.
So, I don't like having the folders/files so close to the limit. I suggest adding a tab to each entry and a ">" to the selected entry. If you don't know what I mean, check out how "nnn" does it.
What do you think?
by default without pane is good and fast but if there is some sidepanes it will be great to see what files or folders are available under selected folder.
Pressing the arrow keys (scrolling up or down/going back and forth directories) for long periods make fff behave weird (hanging of some sort and weird characters flashing around the terminal). Like its queuing all the long key presses until it stops. And I can't do anything unless the 'key-press queuing' ends. And after it, fff behaves fine again.
This is related to using cursor_down (\e[B)
as an alternative to \n
when printing the initial directory.
It would be cool if fff can support customized colors for different file types, or apply dir_colors color configuration.
Right now its only one click away (x) but I am wondering if in the default view we can customize fff to show more info.. like an auto-updating info about file size like in nnn? Or seeing the rights of the file.
./fff: line 84: l2: bad array subscript
System:MacOs 10.13.6
Any chance keybindings might be made customizable?
Or at least I'd love a Emacs-inspired alternative mode instead of the VIM-inspired defaults.
When I open a text file using fff
in Vim, the display is often jumbled. This does not happen if I open the same file in Vim through another command line program.
The files usually have long lines and are tab delimited. This also happened when opening an HTML file.
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.