Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToDo list #337

Closed
3 tasks
jarun opened this issue Oct 6, 2019 · 72 comments
Closed
3 tasks

ToDo list #337

jarun opened this issue Oct 6, 2019 · 72 comments

Comments

@jarun
Copy link
Owner

jarun commented Oct 6, 2019

Rolled from #332.

Ready for next release

  • run custom (non-shell-interpreted) commands like plugins
  • sessions (thanks @annagrram)
  • configure cd-on-quit as the default behaviour
  • copy as and move as workflow
  • edit , flush selection buffer (thanks @KlzXS)
  • changed the key to size sort to z
  • ignore events during selection so the + symbol is not lost
  • mount archives using archivemount
  • smoother double click handling
  • keybind collision checker (for users setting custom keybinds) (thanks @annagrram)
  • show size of file in bytes in status bar in disk usage mode
  • pass unresolved path as second argument ($2) to plugin
  • mechanism for plugins to control active directory
  • plugins
    • getplugs - a lot of intelligence added to the plugin installer (thanks @KlzXS)
    • drag-file & drop-file: drag & drop files using dragon
    • gutenread: browse, download and read from Project Gutenberg
    • suedit - edit file with superuser permissions
    • fzhist - fuzzy select commands from history, edit and run
    • fzcd - change to a fuzzy-searched directory
    • pskill - fuzzy list a process or zombies by name and kill
    • exetoggle - toggle executable status of hovered file
    • treeview - informative tree output with file permissions and size
    • checksum - recursively calculate checksum for files in hovered directory
    • fzy-open renamed to fzopen
  • additional key ; to execute plugin
  • more explicit force removal message
  • export current file as $NNN (instead of $NN)
  • fix opening files from browser

Proposed features and tasks (up for grabs)

  • print disk usage and directory snapshot
  • a video exploring nnn plugins
  • script to duplicate files in selection

Anything else which would add value (please discuss in this thread).

List of completed features and tasks.

@jarun jarun mentioned this issue Oct 6, 2019
5 tasks
@KlzXS
Copy link
Collaborator

KlzXS commented Oct 6, 2019

I've been meaning to ask, what exactly does "script to duplicate selection in respective directories" mean? Does it mean if I selected some entries in dirx that it should select all available entries with the same name in diry? Should this be a plugin?

@jarun
Copy link
Owner Author

jarun commented Oct 6, 2019

@KlzXS the script would ask for a suffix from the user and create duplicates of paths in selection. I don't see a pressing need for it right now.

@KlzXS
Copy link
Collaborator

KlzXS commented Oct 6, 2019

Right. I just wanted to clear up the wording a bit, I found it to be a bit ambiguous.

@0xACE
Copy link
Collaborator

0xACE commented Oct 6, 2019

https://en.wikipedia.org/wiki/Nnn_(file_manager)

@jarun
Copy link
Owner Author

jarun commented Oct 6, 2019

@0xACE wow! I can't appreciate you enough for this!

@jarun
Copy link
Owner Author

jarun commented Oct 6, 2019

@0xACE @KlzXS I am planning to make a release in a few hours. Any last minute additions?

@0xACE
Copy link
Collaborator

0xACE commented Oct 6, 2019

@0xACE wow! I can't appreciate you enough for this!

Anytime bro.

@0xACE @KlzXS I am planning to make a release in a few hours. Any last minute additions?

Nah, go ahead from me. I'm working on a patch for the mouse support but it will not be done in time I'm afraid...

@KlzXS
Copy link
Collaborator

KlzXS commented Oct 6, 2019

Go ahead. There's nothing I have right now.

@jarun
Copy link
Owner Author

jarun commented Oct 6, 2019

@0xACE No problem! This release is a massive one. I don't think we have added so many features in a single release in any of my projects ever! Thank you both for your active contribution.

@jarun
Copy link
Owner Author

jarun commented Oct 6, 2019

@0xACE the first release (v1.0) of nnn was on 13 Apr, 2017. Can you please update?

@jarun
Copy link
Owner Author

jarun commented Oct 6, 2019

I have updated the initial release date on Wiki.

@jarun
Copy link
Owner Author

jarun commented Oct 12, 2019

Hey guys! We have archive mounting in place now. Optional dep but it's quite useful.

I also made some improvements to unmount:

  • the same keybind works with both mounted archives and remotes
  • now you can just highlight the mounted dir and press u to unmount
  • if the highlighted dir is not a mount point it would as for the hostname to unmount

@lawnowner
Copy link
Contributor

Is there a way to get traversed path in a plugin? That is, working directory displayed next to context numbers on top. Both pwd -L and pwd -P give physcial path of working directory avoiding any symlinks, as does $PWD.

@jarun
Copy link
Owner Author

jarun commented Oct 13, 2019

@lawnowner do you mean to say you are only seeing absolute paths? That's the intended behaviour.

@lawnowner
Copy link
Contributor

I mean I'm seeing absolute paths with symlinks resolved in plugins (canonical paths), e.g. when the nnn top bar display working directory as "/home/lo/Pictures/Mechanisms", $PWD or pwd -L command gives "/mnt/data1/Pictures/Mechanisms" in a plugin.

@jarun
Copy link
Owner Author

jarun commented Oct 13, 2019

Hmmm... I'll fix this if you promise to award a star to the project. It's been some time I'm running your errands. ;) 😆

@lawnowner
Copy link
Contributor

lawnowner commented Oct 13, 2019

Will definitely do, as deserved, and much appreciated!

@jarun
Copy link
Owner Author

jarun commented Oct 13, 2019

Test with commit 0873809. Unresolved path will be passed as $2 to the plugin.

@jarun
Copy link
Owner Author

jarun commented Oct 15, 2019

@KlzXS @0xACE @annagrram with the change from @KlzXS yesterday, the binary size of nnn has exceeded 60KB. We may have to find some ways to reduce it again. The const strings add to the size but what we have currently (help, patterns and keybinds help) are inevitable.

@jarun
Copy link
Owner Author

jarun commented Oct 31, 2019

The cumulative size si shown in du or au mode already. In normal mode the size from stat is shown. Can you share a screenshot of what you are seeing?

@aryadovoy
Copy link

I used D-key for checking sizes by bytes, but nothing.
2019-11-01_094015
2019-11-01_094038

@jarun
Copy link
Owner Author

jarun commented Nov 1, 2019

D is for the file details. You can already see the du for the dir in the du screen.

If you are looking just for the byte size, what's the use-case?

@jarun
Copy link
Owner Author

jarun commented Nov 1, 2019

It's not that difficult though... in the du or au mode we can show the byte-size in the status bar anyway.

@aryadovoy
Copy link

If you are looking just for the byte size, what's the use-case?
Exact size of directory for comparing.

@jarun
Copy link
Owner Author

jarun commented Nov 1, 2019

OK, I will add a patch for this, It's a good value addition! 👍

@jarun
Copy link
Owner Author

jarun commented Nov 1, 2019

Patch to show file/dir du size is in at commit ef8db1f.

@aryadovoy
Copy link

Patch to show file/dir du size is in at commit ef8db1f.

Perfect!

@podtor
Copy link

podtor commented Nov 10, 2019

It would be possible to create package of nnn to OpenWRT project https://github.com/openwrt/openwrt/tree/master/package?

@jarun
Copy link
Owner Author

jarun commented Nov 10, 2019

@podtor please feel free to port nnn to OpenWRT. As the deps are less it wouldn't be a monumental task. Please get in touch with the OpenWRT team for porting guideline.

@aryadovoy
Copy link

aryadovoy commented Nov 11, 2019

What about toggle a→z to z→a for name, size and time sorting and changing of sorting from ABac to AaBc?
And I have second layout (not english), so commands don't work on this layout.

@jarun
Copy link
Owner Author

jarun commented Nov 11, 2019

No other order toggles would be added. You can always roll-over at edges and scan in reverse.

And I have second layout (not english), so commands don't work on this layout

Please elaborate this.

@0xACE
Copy link
Collaborator

0xACE commented Nov 11, 2019

Hey, sort of running around atm, but I noticed a segementation fault:

  1. start nnn
  2. create a empty directory: ndempty_dir
  3. go into the empty directory
  4. Run any NNN_PLUG script
  5. segmentation fault

As I'm not on a workstation I can't debug it atm. But it seems like the key is that the directory is empty and you try to trigger a NNN_PLUG script

@KlzXS
Copy link
Collaborator

KlzXS commented Nov 11, 2019

I am able to reproduce this.
Here is the gdb backtrace, if anyone's interested:

#0  run_selected_plugin (lastdir=0x7ffc23170630, lastname=0x7ffc23170638, runfile=0x0, rundir=0x7ffc23172990 "/home/[user]/test/empty_dir", newpath=0x7ffc23170990 "/home/[user]/.config/nnn/plugins/checksum", file=0x560ee1af3572 "checksum", path=0x7ffc23170628)
    at src/nnn.c:3410
#1  run_selected_plugin (path=0x7ffc23170628, file=0x560ee1af3572 "checksum", newpath=0x7ffc23170990 "/home/[user]/.config/nnn/plugins/checksum", rundir=0x7ffc23172990 "/home/[user]/test/empty_dir", runfile=0x0, lastname=0x7ffc23170638, lastdir=0x7ffc23170630)
    at src/nnn.c:3388
#2  0x0000560ee0e1a1cd in browse (ipath=0x560ee1af3590 "/home/[user]/nnn", session=<optimized out>) at src/nnn.c:4975
#3  0x0000560ee0e11433 in main (argc=<optimized out>, argv=0x7ffc23175da8) at src/nnn.c:5633

Edit: this is on the latest commit 6ea6428

@jarun
Copy link
Owner Author

jarun commented Nov 11, 2019

Should be fixed at commit fa4c37f. Please confirm.

@KlzXS
Copy link
Collaborator

KlzXS commented Nov 11, 2019

Yep, after fa4c37f it no longer crashes.

@aryadovoy
Copy link

Please elaborate this.

For example, I press P-key for paste, but it's З-key on russian layout. And I should change layout and try again. It's inconvenient.

No other order toggles would be added.

It's a pity, cause I used to AaBc sorting.

@0xACE
Copy link
Collaborator

0xACE commented Nov 11, 2019

@jarun, thanks. It doesn't crash anymore.

For example, I press P-key for paste, but it's З-key on russian layout. And I should change layout and try again. It's inconvenient.

I see what you mean. Unfortunately, I don't think this will be fixed. However you can change nnn.h to represent your needs better.

I have dealt with this problem before, I have tried having programs automatically toggle between languages and I ultimately succumbed to using a full en_US keyboard and mapping my own language extras as "hidden modifiers".

Though I should mention it's not impossible to get it fixed in nnn but, I don't see this happening in reality...

It's a pity, cause I used to AaBc sorting.

Iirc it's not to complicated to use your own sorting algorithm in nnn.

Btw, @jarun what are your opinions on nnn using threads? No need to go deep into this, I'm just lurking on the idea of checking of the size of all files in a directory not locking the interface...

@aryadovoy
Copy link

Though I should mention it's not impossible to get it fixed…

Ok, I can live with it.

Iirc it's not to complicated to use your own sorting algorithm in nnn.

But it could be option (flag), no?

@jarun
Copy link
Owner Author

jarun commented Nov 11, 2019

I'm just lurking on the idea of checking of the size of all files in a directory not locking the interface...

Are you talking of the du calculation? I am not sure using threads would help a lot.

@0xACE
Copy link
Collaborator

0xACE commented Nov 11, 2019

Ok, I can live with it.

Hehe, bro before you give up try changing/adding bindings in nnn.h :)

But it could be option (flag), no?

Read man 3 qsort you can do it buddy :)

But honestly I think the sorting thing could be reworked slightly, I recall I added my own sorting stuff and it was always troublesome because you have to toggle all the other sorting modifiers. Now as I'm writing this message I'm thinking maybe we could add a function that turns of the other modifiers so you don't have to copy paste that same code each time. (Note i havent looked at that part of the code since I first put in my changes, and it might be different today, and this is just from my memory, i might be thinking of another project)

Are you talking of the du calculation? I am not sure using threads would help a lot.

Yes, the S key, triggering it in a large folder takes a lot of time, and on remote folders it isn't the greatest experience... The idea of a second thread would be that it wouldn't block the interface, and it would update results as it goes... But honestly it's not a big deal. I understand the complexity of implementing a secondary thread. You can disregard I even brought it up :)

@jarun
Copy link
Owner Author

jarun commented Nov 11, 2019

The idea of a second thread would be that it wouldn't block the interface, and it would update results as it goes

I would like to see some benchmarks. Try it with threading when you get the time.

@0xACE
Copy link
Collaborator

0xACE commented Nov 11, 2019

I would like to see some benchmarks. Try it with threading when you get the time.

No need to benchmark. The current implementation is blocking until du finishes. And I really cant bother to implement it.

The reason I thought about it is because I was considering adding another column to my local version of nnn and have external scripts be able to fill that extra column as they see fit via some IPC or FIFO-file or w/e, but really nnn serves its purpose fine if you ask me.

@n-ham
Copy link

n-ham commented Nov 13, 2019

I noticed you don't have a website. I make a cross-platform open source website generator called Nift (https://nift.cc) and would be happy to make a website for your project using Nift if you are interested? It would help me showcase what Nift is capable of. Though I may need some help with the content, but am more than happy to set something up and see what you think (don't have to use it if you don't like of course), it's surely preferable to have a website where you guys/girls can add/modify/remove content yourselves anyway.

Nift is the world's fastest website generator, up to 15 times faster than it's closest rival Hugo and can scale to building websites with millions of pages.

They don't have to be, but typically Nift websites are git repositories (so full revision history) with files to build the website and a built version of the website that can standalone by itself (with no way to tell it was made with Nift either).

The Nift website (https://nift.cc) is made with Nift and the HTML5 UP template escape-velocity. https://tron.ai-bots.net is made with Nift and the HTML5 UP template solid-state. https://lvsportsclinic.com is made with Nift and the HTML5 UP template forty (and parallelism for the blog, which is really nice!).

The templates I would have in mind would be any of the following:
https://html5up-nsm-templates.github.io/alpha/
https://html5up-nsm-templates.github.io/helios/
https://html5up-nsm-templates.github.io/landed/
https://html5up-nsm-templates.github.io/telephasic/
https://html5up-nsm-templates.github.io/twenty/
https://html5up-nsm-templates.github.io/txt/

Though you can pick any template from html5up.net or pixelarity.com.

I also have the person who made the Nift bunny and badger mascots on facebook (check the bottom of the Nift website for the badger) and am happy to get him to do a mascot/logo for nnn if you would like too, though I can't get that for you for free sorry. I paid AUD$260 for the bunny.

Let me know if you are interested and we can start working out what template to use and progress from there.

Edit: https://gitlab.com/nifty-site-manager/nifty-site-manager.gitlab.io that's the source code for the gitlab mirror of the Nift website. The files to generate the website are in the content and template directories and the built site in in the site directory.

@jarun
Copy link
Owner Author

jarun commented Nov 16, 2019

@KlzXS could you work on the retain modified plugins item? It needs improving the current getplugs script to detect if user has modified a plugin and provide an option to retain, merge (in vimdiff) or overwrite. It would make life very easy. You can also make enhancements like don't overwrite if a plugin has not changed.

@KlzXS
Copy link
Collaborator

KlzXS commented Nov 16, 2019

Sure thing.

@jarun jarun mentioned this issue Nov 17, 2019
62 tasks
@jarun
Copy link
Owner Author

jarun commented Nov 17, 2019

Rolled at #386.

@jarun jarun closed this as completed Nov 17, 2019
Repository owner locked as resolved and limited conversation to collaborators Nov 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants