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 #306

Closed
8 of 10 tasks
jarun opened this issue Jul 13, 2019 · 93 comments
Closed
8 of 10 tasks

ToDo list #306

jarun opened this issue Jul 13, 2019 · 93 comments

Comments

@jarun
Copy link
Owner

jarun commented Jul 13, 2019

Rolled from #213.

Ready for next release

  • custom key-plugin keybinds to run plugins directly
  • fix tar/bsdtar always creating tar archives (and not by suffix)
  • make selection based archives lose path prefix for files in current dir
  • fix single mouse click to select file not working
  • key Lead' to jump to first file in current directory
  • auto-proceed to next file on cherry-pick in selection mode
  • fix symlink to dir removed on batch rename
  • config NNN_OPS_PROG renamed to NNN_CP_MV_PROG

Proposed features and tasks (up for grabs)

  • script to duplicate selection in respective directories
  • refactor function browse()

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

List of completed features and tasks.

@jarun
Copy link
Owner Author

jarun commented Jul 13, 2019

@ath3 @0xACE @tanyaionova @maxice8 any of you can help with setting up nnn wikipage on Arch Linux wiki and Wikipedia? We have the content and it would be great if we can have the pages set up for users.

@0xACE
Copy link
Collaborator

0xACE commented Jul 13, 2019

ny of you can help with setting up nnn wikipage on Arch Linux wiki and Wikipedia? We have the content and it would be great if we can have the pages set up for users.

Hey, I'm still away during the weekend but I made a simple stub article

https://wiki.archlinux.org/index.php/Nnn

Feedback would be appreciated as I would argue documentation is important to attract more users. I also added a article link for nnn to list of applications on the archlinux wiki.

@jarun
Copy link
Owner Author

jarun commented Jul 13, 2019

That's real fast and awesome!!!

You'll find more on nnn here: https://github.com/jarun/nnn/wiki/hacking-nnn

I would leave the content up to you as you are already hacking nnn impressively ;). Also, as I have authored the current documentation that would influence as well.

Requesting all collaborators to pitch in with suggestions and contributions to the page.

@jarun
Copy link
Owner Author

jarun commented Jul 13, 2019

@0xACE
Copy link
Collaborator

0xACE commented Jul 13, 2019

@0xACE please link from: https://wiki.archlinux.org/index.php/Category:File_managers

Still not home but managed to add nnn to the list of : File managers and Console applications.

There were other ideas i had during the day but as I didn't write them down I can't recall them atm.

@jarun
Copy link
Owner Author

jarun commented Jul 14, 2019

No problem! Please take your time.

@0xACE
Copy link
Collaborator

0xACE commented Jul 14, 2019

I wrote some changes to the archwiki while bbqing, but the battery died and all progress was lost sigh... From now on I'll write changes locally and then upload them...

Another quirk i noticed and can't seem to figure out is:

  1. ^P and hit ^D to resume back to nnn
  2. resize the terminal and keep an eye out on the status bar (bottom text) of nnn, and notice that it doesn't resize as the terminal resizes. Even hitting SEL_REDRAW will not cause it to redraw the screen.

The same problem appears when you use ^O. Any guesses to what causes this and what to change?

EDIT: This doesn't seem to affect me on termux but it does on my other machines. I use mainly st as my terminal but the problem remains in urxvt and xterm. Also I guess I should create a seperate issue for these sorts of discussions, right?

@jarun
Copy link
Owner Author

jarun commented Jul 14, 2019

We should handle ^D to exit the prompt and that should fix it.

@jarun
Copy link
Owner Author

jarun commented Jul 14, 2019

No, the problem happens even without pressing ^D. That's because the getch() in xreadlien() is blocking and we do not get the resize signal. I think we may have to live with it.

More details: https://stackoverflow.com/questions/26807623/interrupt-ncurses-getch-on-incoming-signal

@jarun
Copy link
Owner Author

jarun commented Jul 14, 2019

Regarding the wiki page: I think the change to category Console applications is also lost: https://wiki.archlinux.org/index.php/Category:Console_applications

@jarun
Copy link
Owner Author

jarun commented Jul 14, 2019

Adding some info on the plugins would help users. In addition to the regular info, a small example to add a custom plugin (doing very basic stuff) would be great. I don't think we have a hands-on example anywhere.

@0xACE
Copy link
Collaborator

0xACE commented Jul 15, 2019

Regarding Category:Console_applications I have no idea where it is suppose to be used. Maybe it previously was listed under list of applications but someone else has removed it. I'm not the right person to determine if it should be on the list, but at least when someone adds it nnn will show up on it too. From what I can tell it's only linked from https://wiki.archlinux.org/index.php/Table_of_contents. And the other Category:Commands page doesn't seem permit me to add nnn into that category (the edit button doesn't show up). I would say it's enough with the list of applications entry as the other categories are not commonly referenced.

The plugins tutorial has been added and some other minor changes to the archwiki and also added info regarding $NNNLVL. I wouldn't mind having that text just copy pasted over to the github wiki if that's fine with you? (at least the baseline scenarios, so new instructions doesn't have to be made up)

I will also be sending you two pull requests for you to review regarding terminal resize handling.

  1. One of them is for when using getreadline() (^P and ^O) which is a very minimal edit to the current code judging by the current testing.
  2. And another more integrated change of code for get_input(), xreadline() and filterentries() (filterentries() isn't finished/implemented yet but the method should be the same as for the other two). (I guess this patch even contains some bug fixes in these functions)

The reason I spent effort on this is because of my tiling window manager setup. Some of my nnn sessions will remain open for many days (or entirety of a project) and windows will frequently resize and I would rather have nnn work throughout my session without having to restart nnn to have it function without difficulties.

It's a bit too early to tell but I have a hunch that printprompt() doesn't serve its purpose well, although i would ask that you leave printprompt() untouched until I have resolved the resizing issues. Or if you also see the problem with printprompt() I would be interested to hear your opinion, though the reasons might become more clear when you see the patches (I avoid printprompt() in most/all places iirc and even replaced it at some points). I've got a busy week coming up therefore in might take some time until I'm publishing the results.

Anyhow I expect patch 1 to be adopted as it's not a huge change, and 2 might be up for discussion, considering it's a very unique edge case scenario that is affected, but it's at least nice to have nnn function like a fully working program.

@jarun
Copy link
Owner Author

jarun commented Jul 15, 2019

I would say it's enough with the list of applications entry as the other categories are not commonly referenced.

👍

I wouldn't mind having that text just copy pasted over to the github wiki if that's fine with you?

Sure thing!

I will also be sending you two pull requests

Please raise and I'll review. Please make sure you are using master to avoid tedious rebase efforts later.

The reason I spent effort on this is because of my tiling window manager setup.

That's true with many users. Than you for enhancing the use-case.

printprompt()

Ideas are welcome!

@jarun
Copy link
Owner Author

jarun commented Jul 15, 2019

In the add your own plugins section, I think the path in 2 places should start with:

${XDG_CONFIG_HOME:-$HOME/...

@jarun
Copy link
Owner Author

jarun commented Jul 15, 2019

I forgot about the F2 key. Added as an undocumented key now.

@0xACE
Copy link
Collaborator

0xACE commented Jul 15, 2019

printprompt()

Ideas are welcome!

I will see if I can make my patch utilize printprompt() better. Still too busy to deal with it atm.

I will also be sending you two pull requests

Please raise and I'll review. Please make sure you are using master to avoid tedious rebase efforts later.

Yeah I always use master, but the past week has been troublesome as some of the changes I have made are now also conflicting with the changes in the current master, this will further delay my progress. But yes, I always send clean up-to-date patches. I wouldn't expect to be able to work on the patches until maybe next week or the week after.

I forgot about the F2 key. Added as an undocumented key now.

I'm actually happy it was re-added :)

@jarun
Copy link
Owner Author

jarun commented Jul 16, 2019

The Arch Wiki page looks cool. Does Wikipedia use the same format too?

@0xACE
Copy link
Collaborator

0xACE commented Jul 16, 2019

I wouldn't be too sure on that considering Arch Wiki has some code blocks related things
e.g:

{{hc|head=~/.bashrc|output
PS1=$NNNLVL $PS1
}}

And iirc wikipedia even has sourcecode highlighting etc, and the current Arch wiki page would likely not be appropriate to copy paste as is to Wikipedia as it probably goes too deep into configurating nnn rather than just being a informative article about the product.

@jarun
Copy link
Owner Author

jarun commented Jul 16, 2019

No, for Wikipedia it should be introductory. Whenever you find the time.

If you are on Arch Linux can you share the output of ...?

@0xACE
Copy link
Collaborator

0xACE commented Jul 16, 2019

No, for Wikipedia it should be introductory. Whenever you find the time.

Yeah, I'll see, I think wikipedia will have more strict rules to adding content, it can't be a "sensationalist" article...

If you are on Arch Linux can you share the output of pacman -V|base32|head -1?

My main arch machine is a bit behind but I've got other arch machines which are up to date:

My main machine yields: Pacman v5.1.1 - libalpm v11.0.1

And one of my server (updated last week I guess): Pacman v5.1.3 - libalpm v11.0.3

My nnn install is overshadowed by a local copy which nnn yields ~/src/nnn/nnn essentially.

@jarun
Copy link
Owner Author

jarun commented Jul 16, 2019

I am trying to create an account on Arch Wiki and the question is from there.

But if I paste "Pacman v5.1.3 - libalpm v11.0.3" it says the answer is wrong!

@0xACE
Copy link
Collaborator

0xACE commented Jul 16, 2019

I am trying to create an account on Arch Wiki and the question (What is the output of "pacman -V|base32|head -1") is from there.

But if I paste "Pacman v5.1.3 - libalpm v11.0.3" it says the answer is wrong!

hahahahahaha That's cute. My bad I was wondering why you requested base32 while being human

...

@jarun
Copy link
Owner Author

jarun commented Jul 16, 2019

Done! Thank you!

@jarun
Copy link
Owner Author

jarun commented Jul 16, 2019

Made a few edits. I am thinking, would it be a good idea to retire the hacking nnn page and move the entire content to Arch Wiki?

@0xACE
Copy link
Collaborator

0xACE commented Jul 16, 2019

Made a few edits.
Yeah, noticed, they were nice ;)

I am thinking, would it be a good idea to retire the hacking nnn page and move the entire content to Arch Wiki?

I would argue against it. I believe the archwiki is useful for acquiring new users but should be treated as a separate venture.

I would suggest our focus should rely on just the git repo for full documentation, meaning a something like a README.md or something similar that lists these configuration guides. This way it is useable by anyone cloning the code.

Or possibly a github.io page could be used as a official landing page for non-technical users.

But other than that you can rely on me trying to keep both sources up to date.

Btw, one of my bigger hacks for nnn was actually related to my pager. I customized lesspipe.sh to some personal preferences and used LESSOPEN to make my pager less use lesspipe.sh determine how files open. So when i push p in nnn: lesspipe.sh will pick a appropriate way to display the content in a CLI. The most satisfying change from lesspipe.sh would be that it redirects via viu so that you can a t least see the image in the terminal. I will eventually add sixel support to my terminal add support it from lesspipe.sh. nnn really becomes a very useful filemanager this way.

Anyhow I spent some time to make my personal nnn patches easier to apply in the future so it's easier for me to keep up with master. I will be busy for some time now but I will keep an eye out here.

@jarun
Copy link
Owner Author

jarun commented Jul 16, 2019

I would suggest our focus should rely on just the git repo for full documentation

It was all on the landing page earlier. I had to move it to hacking nnn because of frequent edits. Reading your comment I think I am back to my senses. ;)

Btw, one of my bigger hacks for nnn was actually related to my pager.

Wow wow wow! I need this. Can you please add this to the hacking nnn page? Maybe a section on pager based file open?

@0xACE
Copy link
Collaborator

0xACE commented Jul 16, 2019

Btw, one of my bigger hacks for nnn was actually related to my pager.

Wow wow wow! I need this. Can you please add this to the hacking nnn page? Maybe a section on pager based file open?

I added instructions for users to abuse their pager for personal benefits in the hacking nnn wiki entry. though the instructions might not work exactly, unless they actually git clone my repo and switch to the personal branch. Again, too busy to verify all this information atm. https://github.com/jarun/nnn/wiki/hacking-nnn#adjust-your-pager-to-view-files-better

@jarun
Copy link
Owner Author

jarun commented Jul 17, 2019

I added instructions for users to abuse their pager

Oh, I'm sure no one would mind a little eccentricity ;)

@0xACE
Copy link
Collaborator

0xACE commented Jul 24, 2019

Seems like my hiatus will be overextending a bit further than anticipated... Anyhow I wanted to check with what you think of my latest hack:

When nnn is running within tmux 3 new keys are introduced: ", % and N. They all offer the same functionality: open a new shell in the CWD that you are browsing, basically another CONTROL('G') but without closing down nnn. The first 2 keys will split the terminal vertical/horizontal (I believe those are tmux default keys for vert/horiz -split ), the third one will spawn a new window and bring focus to it (c would be the default in tmux but c is taken by mounting sshfs so I figured N should suffice).

The reason I don't push this hack any further is because my solution is tmux dependant. and others out there could be using GNU screen, iterm or w/e... each of which would require their own method.

I guess I should be fair and mention tmux will let you spawn a shell with keystrokes. The problem is that but they do not respect the CWD you are browsing... Meaning: unless nnn changes its CWD tmux will spawn the new shell in the origin WD that spawned nnn.

EDIT: regarding the tmux hack above: a simple chdir() may be all that is needed to solve this.

Oh and another thought I had: shouldn't nnn be displaying $NNNLVL if you are nested within another nnn? Since I introduced my tmux splitting I haven't been much bothered by the lack of $NNNLVL indicators, but I remember that it was annoying. The reason I didn't patch it in myself is because I was not sure where to put the depth level indicator... Putting it at the top would mess with mouse clicks and other context related code unless it's put right after the list of contexts...

@jarun
Copy link
Owner Author

jarun commented Aug 5, 2019

For now, I have reverted the commit.

@0xACE
Copy link
Collaborator

0xACE commented Aug 5, 2019

Alright I'll take a look at it when i have time.

Fyi, I have termux misbehaving for me on other programs too, I just never bothered looking deeper into the issue.

@jarun
Copy link
Owner Author

jarun commented Aug 5, 2019

Alright I'll take a look at it when i have time.

No problem.

I have termux misbehaving for me on other programs too

I see. I noticed the problem this morning (after updating nnn on Termux) and it seemed like this was working perfectly before.

@0xACE
Copy link
Collaborator

0xACE commented Aug 6, 2019

ba12fa8#diff-fc9d3b040de26a559b433d730b0c01baR1695

that redraw(path); seems to cause the problem. I can't seem to figure out why redraw(path) behaves this way... We could simply remove redraw(path), but if you have any better ideas, I'd like to hear them. (I tried move_cursor(cur,0) and that didn't help, besides redraw(path) does that too)

@nhasian
Copy link

nhasian commented Aug 6, 2019

Feature Request:
setup Ubuntu PPA so users can have automatic updates

Note: I read about nnn on Reddit's /r/Linux and decided to try it out in Ubuntu by installing it from the repos. I was confused and frustrated because I couldn't select files with spacebar or delete with ^X. I was about to throw in the towel and uninstall nnn until I realized that the version in the repo was Version 1.7. After I grabbed the latest version from Github, everything worked as expected.

@jarun
Copy link
Owner Author

jarun commented Aug 6, 2019

We had one but the maintainer is AWOL: https://launchpad.net/~twodopeshaggy/+archive/ubuntu/jarun

If you are interested, please discuss with the mods and feel free to take over. Otherwise, start a new one.

@szlin can you help out here? I think it's reasonable people are expecting the latest release available.

@nhasian
Copy link

nhasian commented Aug 6, 2019

@szlin @jarun I've been an Ubuntu member for 10 years now I haven't setup a PPA before but I'm happy to give it a try. https://wiki.ubuntu.com/nhasian

@jarun
Copy link
Owner Author

jarun commented Aug 6, 2019

We would really appreciate that!

Earlier @shaggytwodope used to handle this very effectively. But now that he's not available, a PPA would really help to distribute the latest packages.

@nhasian
Copy link

nhasian commented Aug 6, 2019

@jarun I setup https://launchpad.net/~nhasian/+archive/ubuntu/nnn added my ssh and openpgp keys, installed a vanilla Ubuntu18.04 in a VM and have the latest sourcecode for nnn from git. (which compiles and runs successfully). However, I seem to be hung up on actually creating or uploading a package to launchpad. I think I'm stuck on debuild and dput.

I've read up on Uploading a package to a PPA, and Building a source package, but I must be missing something. I have also asked on IRC freenode #ubuntu-motu but haven't received any response yet. Got any idea what I'm missing @shaggytwodope ?

@professorjamesmoriarty
Copy link
Contributor

@nhasian I do not often have much time any longer to reply so sorry for poor response. You can find the steps and source files for my old ppa work here https://github.com/shaggytwodope/jarunppa this may be outdated for any new guidelines or methods used. However there is short mention of steps to upload in a readme. And you will find the source files for the deb build stuff. The big one being the rules file. What launchpad effective does it create a .deb file via the automated packaging system. nnn is really straight forward, the context of the directory is located here https://github.com/shaggytwodope/jarunppa/tree/master/nnn/debian and if you get lost refer to debian packaging on google or even the debian wiki.

So to sum up the steps... you first create the framework for the .deb packaging. You are free to copy my packaging stuff for nnn, be sure to change maintainer name etc for yourself. Once that is done you will use a source tarball for any new version released. The naming scheme is like googler_2.8.orig.tar.gz. Next the debuild command I'm unsure what package it ships with but google would answer that for you. The command mentioned on the readme must be adjusted for your key in order to properly sign the package before uploading to launchpad. This is of course the same ssh key you put onto launchpad. Be sure to back up this in the future as to not make it difficult lol. Next step is uploading with dput, you merely point to the generated .changes file for the package accordingly. At this point you wait for a successful build assuming you read all the other steps on launchpad related to proper configuration.

You should not need to upload any other packages unless there are special circumstances. The platform allows you to cross build by "copying" between the versions of ubuntu. There are of course a few settings to enable 32bit and 64bit builds.

Most of this just takes a bit of time to learn. I'll be glad to help you at any stage, but forgive any delay in response. I no longer have the time to work on these things.

@jarun
Copy link
Owner Author

jarun commented Aug 7, 2019

Thanks for the help @shaggytwodope!

@jarun
Copy link
Owner Author

jarun commented Aug 7, 2019

@shaggytwodope would it be possible to transfer the current PPA?

@professorjamesmoriarty
Copy link
Contributor

@jarun I've created a group project, if you have a launchpad account I can pass you control as well. In the mean time I've added the outdated versions of previous packages I've created. We can remove any you see fit. They should be done building and will show up as soon as I've sent this message. I've added @nhasian to the project.

If there is anything I can do to help anyone package for the ppa, be it adding people to the list of maintainers or any guidance let me know. @nhasian should be able to upload any packages at this point using my previous files provided in the repo I shared earlier. Ideally he just copies said repo and updates the data needed.

https://launchpad.net/~jarunsoftware/+archive/ubuntu/ppa

@jarun
Copy link
Owner Author

jarun commented Aug 7, 2019

My launchpad handle is engineerarun.

@jarun
Copy link
Owner Author

jarun commented Aug 7, 2019

@nhasian are you good to go now?

@professorjamesmoriarty
Copy link
Contributor

@jarun you should be full admin. I'm going out for the evening now. But if you need anything from me just hit me up here or via my email. And excuse any delay.

@jarun
Copy link
Owner Author

jarun commented Aug 7, 2019

Thank you!

@nhasian
Copy link

nhasian commented Aug 7, 2019 via email

@jarun
Copy link
Owner Author

jarun commented Aug 7, 2019

Awesome! I would love to see this PPA back in action. Please let me know once you are done with updating the packages and I would add the PPA back in the known packagers section from each of my utilities.

@nhasian
Copy link

nhasian commented Aug 9, 2019

@jarun I have the PPA for Ubuntu 18.04 setup at https://launchpad.net/~nhasian/+archive/ubuntu/nnn
I am also going to request nnn be backported as well to make it easier for future users.

@jarun
Copy link
Owner Author

jarun commented Aug 10, 2019

@nhasian would it be possible to revive the earlier PPA? It would be great if all users can access all my packages from the same PPA. That's what the earlier PPA was there for. Don't worry about frequent releases as almost all of them are stable.

@rsuhada
Copy link

rsuhada commented Aug 11, 2019

I really like the idea of nnn (far more than ranger), but would it be possible to add customization of keybindings?

For the users of alternative layouts like dvorak/colemak/workamn... the default vim keybinds make nnn unfortunately unusable.

nnn looks very efficient and we care about efficiency! That's why we learned an alternative layout...
Thanks for consideration in any case!

@jarun
Copy link
Owner Author

jarun commented Aug 11, 2019

We had support for custom keybindings at some point. Then we noticed we were spending significant time on custom keybind conflicts and removed that. Please take a look at the in program help and you'll realize the problem.

You can always change keybinds to your choice and compile the program. Also, if it's of any help, my plan is to go for infrequent releases after the next one.

@rsuhada
Copy link

rsuhada commented Aug 12, 2019

Thanks, I see that the binds are nicely kept in the header file so recompilation is a good option for me.

Thanks!

@jarun
Copy link
Owner Author

jarun commented Aug 12, 2019

👍

@jarun jarun mentioned this issue Aug 14, 2019
3 tasks
@jarun
Copy link
Owner Author

jarun commented Aug 14, 2019

Rolled at #324.

@jarun jarun closed this as completed Aug 14, 2019
Repository owner locked as resolved and limited conversation to collaborators Aug 14, 2019
@jarun jarun removed the help wanted label Sep 27, 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

7 participants