Closed RaitaroH closed 5 years ago
Hmm, that's a bit of a tough one.
I don't really like the idea of "allowing multiple directories to be searched" since this is not how file browsers usually work. I'd like to keep a single "current directory" still.
I'm fine with some sort of "one shot" mode that takes paths from stdin, since it makes a lot of sense for scripting. File exclusions also seem like a good idea. I'll see what works best.
For now, you may be able to work around this issue by creating a single directory with symlinks to all the directories you want to list in rofi, and then opening that.
I implemented reading file from stdin with -file-browser-stdin
and filename exclusions with -file-browser-exclude
.
So let me explain.
This rofi extension is quite awesome and I like it for the icons. I am using a script right now that works like so:
As you can see, using fd and excluding stuff like
.cache
,.firefox
,.local
,wine
,tmp
Games
,Github
etc, just makes the search so fast I can start typing the second I run the script. This rofi extension you have is also quite fast but because it has to display everything it just takes a lot longer.My suggestion then would be as such:
Or, even better:
Just so you know I did try to play around with using
file
to get the mime-type of the files, then use sed to replace that with markup for rofi, then add to that the file names themselves, then pipe that into rofi (works great for my music script btw).The problem is that where fd takes less than half a second to actually perform the search.... to get the file types takes minutes.