Closed amalgame21 closed 2 years ago
And how can I cancel the "open with" action after I press o
or ^O
?
Esc and ^C
seems not working.
Just find out that I can use the =
key to launch the applications with fzf search.
But it only launch the app, like what dmenu does.
Any way to use this to launch the application and use the highlighted item as argument??
What you're trying to do should be easily achievable via either editing nuke
or by writing a plugin yourself.
Take a look at plugin documentation or take a look at some of the simpler plugins like suedit
to get started.
Plugins can be launched via Alt-<key>
. You could create a script that manages your needs.
If implementing what you need in bash
is too much work, go a head and create a python
-script and maybe utilize sqlite
if you prefer.
Be creative. Has nnn
blinded your intuition in using the shell?
@0xACE insane timing, right when I pressed "comment" as well. Almost thought it was my comment that somehow got distorted..
Also, check out xstarter. Closing the defect as there are alternative ways.
What you're trying to do should be easily achievable via either editing
nuke
or by writing a plugin yourself.Take a look at plugin documentation or take a look at some of the simpler plugins like
suedit
to get started.
Thanks for your advice. I though it is a basic function that a file manager should have. I was expecting that I just missed something on the wiki, didn't expect that this functionality is not yet implemented for such a long time for built-in or plugin.
Not all of the users are programmer, some of them may have zero knowledge of programming. Lack of some key function may scare them away.
After looked into some plugins to learn what is going on with the code as you advised , I finally highly modified the nuke
plugin, so now it can be work as either a "plugin" as what nuke does, or work as "commands as plugin" to add a function to choose applications other then default one to play files by file type or mime. However it is not well tested, some function may be broken.
How can I submit it?
Plugins can be launched via
Alt-<key>
. You could create a script that manages your needs.If implementing what you need in
bash
is too much work, go a head and create apython
-script and maybe utilizesqlite
if you prefer.Be creative. Has
nnn
blinded your intuition in using the shell?
I am just a linux beginner normal user switching from Windows last year, and have no python and sqlite knowledge at all :(.
To me bash
is much easier because I learnt some of it to use the crontab
job.
I heavily modified the nuke
plugin and add the function to it as "command as plugin".
Thanks for your advice!
I though it is a basic function that a file manager should have. I am just a linux beginner normal user switching from Windows last year, and have no python and sqlite knowledge at all
You should really start with a basic file manager, get accustomed to the basics and then try something like nnn
.
nnn
is way too advanced and needs more expertise to use.
I though it is a basic function that a file manager should have. I am just a linux beginner normal user switching from Windows last year, and have no python and sqlite knowledge at all
You should really start with a basic file manager, get accustomed to the basics and then try something like
nnn
.
Ya
When he mentioned sqlite
,I cannot even think of how it can be used together with nnn
...
But now it is fine after modifying nuke
plugin for this job.
Much easier to use other applications to launch some files just like ranger r
key.
nnn
is much better thanranger
to me now.
nnn
is more usable for small monitor like termux.
ranger
is function-rich, but extremely slow in raspberry pi.
Maybe later will give lf
a try if I encounter some technical problem cannot be solved by myself.
But now it is good.
For someone may need this function: https://raw.githubusercontent.com/amalgame21/conifg/main/nuke_select
Just add code on top of nuke
plugin and rename to nuke_select
Use "command as plugin" syntax to use the added feature, as described in the file.
Work with bash, other shell seems not work. May have to change the first line of the plugin to point to bash.
Not well tested, may have bug.
Not good code but should work.
In ranger, there is a
rifle.conf
that list out all the possible application that could be used to open a specific file. The first application on top of the list for that specific file inrifle.conf
was set to default. It also detect which application was installed on the system. When pressenter
orl
, the default application will be launched. When pressr
, there will be a list of application to choose from by typing 1, 2, 3, and so on, or simply type the full name of the application there like "open with" in nnn.I think
nuke
in nnn is somewaht similar torifle.conf
in ranger.nuke
is nice, I love it, which bypass the complicatedxdg-open
. But it seems only define the default application to open, by detecting which application was installed. I cannot choose between applications to open innuke
on the fly.The "open with" function by pressing
o
or^O
seems can be used to overridenuke
default. But it cannot choose which application to open the file. Some applications' name are very hard to remember to me, such asaegisub-3.2
,okular
,zathura
,ristretto
and I have to spell it perfectly right to launch the application. And there is no auto-completion for the application in the "open with" prompt.Maybe I missed something in the Wiki?