Rolled from #213.
tar/bsdtar always creating tar archives (and not by suffix)NNN_OPS_PROG renamed to NNN_CP_MV_PROGbrowse()Anything else which would add value (please discuss in this thread).
List of completed features and tasks.
@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.
ny of you can help with setting up
nnnwikipage 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.
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.
@0xACE please link from: https://wiki.archlinux.org/index.php/Category:File_managers
@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.
No problem! Please take your time.
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:
^P and hit ^D to resume back to nnnnnn, 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?
~We should handle ^D to exit the prompt and that should fix it.~
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
Regarding the wiki page: I think the change to category Console applications is also lost: https://wiki.archlinux.org/index.php/Category:Console_applications
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.
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.
getreadline() (^P and ^O) which is a very minimal edit to the current code judging by the current testing.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.
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!
In the add your own plugins section, I think the path in 2 places should start with:
${XDG_CONFIG_HOME:-$HOME/...
I forgot about the F2 key. Added as an undocumented key now.
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
F2key. Added as an undocumented key now.
I'm actually happy it was re-added :)
The Arch Wiki page looks cool. Does Wikipedia use the same format too?
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.
No, for Wikipedia it should be introductory. Whenever you find the time.
If you are on Arch Linux can you share the output of ...?
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.
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!
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
...
Done! Thank you!
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?
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.
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?
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 nnnpage? Maybe a section onpager 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
I added instructions for users to abuse their pager
Oh, I'm sure no one would mind a little eccentricity ;)
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...
I use dvtm nowadays. tmux appears very slow on wsl.
I think we show nnnlvl in help screen.
@0xACE For the wikipedia page, a dual-pane screenshot with dvtm would be cool. What do you think?
@0xACE For the wikipedia page, a dual-pane screenshot with dvtm would be cool. What do you think?
Heyy, absolutely though dvtm isn't rendering correctly on my machine so I'll figure it out before I post it (I used dvtm in 2012 but it crashed too frequently, has it gotten more stable now?)
Btw I've been busy hence my silence... But another annoyance I have come by is the commit bfc8d0a7d3ea39b19b3367444f98768995eb9e32
On pc if you ever use the mouse to click on the terminal to highlight or activate the window you are likely going to end up in nav-as-you-type-mode. I am 100% not a fan of nav-as-you-type-mode and find it annoying*. Do you have any input on this? In my local copy of nnn I don't mind maintaining and deactivating this feature, but I feel like on pc it's annoying that "every time you click you also have to hit ESC"
You should know that if I were to make walkthrough video of nnn, my workflow with my local branch is wildly different from the upstream (the one you are working on), but most of my changes are very much a personal thing and very difficult to explain to others...
*As mentioned before when I hit / while in filter-mode it will go into the item if it's a directory and give another empty search filter. Like nav-as-you-type but if you use any other key than / it will exit to normal mode. e.g. starting nnn in $HOME: /src/nn/sr<ENTER> would bring me to ~/src/nnn/src but that final <ENTER> key would make nnn resume to normal mode instead of nav-as-you-type
has it gotten more stable now?
looks like that
Do you have any input on this?
This was to make toggling nav-as-you-type easier on handhelds
every time you click you also have to hit ESC
did you try clicking again (without your local changes)? It would toggle nav-as-you-type. And it's really annoying, we should try to make it Termux-only. Perhaps I didn't notice because I use a drop-down terminal.
As mentioned before when I hit /
It appears to me / is not a valid metacharacter. Please confirm. It also can't be a valid file-name character. With this, let's discuss more in a separate thread on how to make / a more powerful key.
You should know that if I were to make walkthrough video of nnn
If you make one, please make it from master, without your local changes
On pc if you ever use the mouse to click on the terminal to highlight or activate the window
In commit 1b340cc5f3c1e3e22e249f70e50bc1de6f17d807 I have limited this to click on last 2 rows.
has it gotten more stable now?
looks like that
Oki, I will give it a try, but I have started to like tmux because a lot of my tools support it well.
every time you click you also have to hit ESC
did you try clicking again (without your local changes)? It would toggle nav-as-you-type. And it's really annoying, we should try to make it Termux-only. Perhaps I didn't notice because I use a drop-down terminal.
Yeah I guess I could click, but my mind as a "user" isn't smart enough to figure that out so my natural instinct is to hit "escape" (I believe I'm suppose to hit "^T" but I'm not smart enough to realise it)
As mentioned before when I hit /
It appears to me
/is not a valid metacharacter. Please confirm. It also can't be a valid file-name character. With this, let's discuss more in a separate thread on how to make/a more powerful key.
Yeah I detect it by ch == '/'. The philosophy of using / is because / as far as I know will never appear in a file/dir name as / is the separator for paths so I figured why not have / as a go into directory. I haven't decided what to do when the highlighted item is not a directory or when the search filter is empty (it could just go in if it's a dir... again this is very much a personal "experimental" hack)
You should know that if I were to make walkthrough video of nnn
If you make one, please make it from master, without your local changes
Yeah I make videos as a hobby. If I ever start publishing my videos I'll definitely make one for the master branch of nnn. The truth would be though that it's not exactly how I use nnn but I get your point.
On pc if you ever use the mouse to click on the terminal to highlight or activate the window
In commit 1b340cc I have limited this to click on last 2 rows.
That's great. I feel bad for pushing this because I believe it could make sense that termux behaves that way. But again, I'm not a nav-as-you-type user... If I ever use the filter_entries() function I rarely have to ESC out of it, as I have added:
E - Open file in editorP - Open file in pagerL - remapped to ENTERq - remapped to escape (escape key is a really far fetched key to reach for me)Q - remapped to regular q so you can actually search for the letter q (only place in my directories where this is a problem is my quotes/ directory.J - go down 1 itemK -go up 1 itemG - go to last item! - open a child terminal in CWDI guess I have a personal grudge against ^T. I guess I'll just remove nav-as-you-type mode in my copy because I never use it and it's annoying when it keeps going back into it.
I had this problem of using ^Y in the beginning too, I'm not sure why ^Y is being required to select multiple items... Today I don't mind ^Y and have sort of grown keen to it. As I now I know I'll only ever select 1 file when I SPACE something and if I were want to do something complicated I can ^Y and even select from multiple directories :D.
Yeah I guess I could click
This is now limited to last 2 lines.
Yeah I detect it by ch == '/'
We'll have an elaborate discussion on a separate thread on this.
I guess I have a personal grudge against ^T
We'll see if we can have something better with /
Today I don't mind
I think it's a matter of habit. In earlier days, I had to switch keybinds often and I was regualrly using nnn too.
@0xACE here's some input for the ArchWiki page:
https://old.reddit.com/r/archlinux/comments/cjcwet/request_for_suggestions_on_nnn_archwiki_page/
The alias in the .bashrc example don't show completely.
I'll see when I can find the time for it. Since you posted it a couple of very insightful comments has appeared. I'll let the thread settle down before I meddle with it.
Regarding CTRL-G Maybe i should first establish in the article that nnn is very minimal and comes with a zeroed setup so, if you want to exit out of nnn into the current working directory you could add that bashrc alias.
In terms of configuration, I'm not exactly sure how to structure it... My personal configuration was more deeply involved in what I'd guess a average user would do... We will see how it evolves...
(I am in a rush hence my message may not make much sense)
Can you please fix the following line in the Wiki?
alias ncp="cat ~/.config/nnn/.selection | tr '\0' '\n'" # access the selected files from your terminal
It doesn't show correctly. Also. it should be:
alias ncp="cat ${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection | tr '\0' '\n'" # access the selected files from your terminal
Hi, what about integrating icons like lsd does? https://github.com/Peltoche/lsd
Hi, what about integrating icons like lsd does? https://github.com/Peltoche/lsd
I guess that could be easy for DIR, LINKS, FIFO FILE, PIPE and a couple of others im forgetting to mention but they are already indicated with / @ | etc... But if you are expecting symbols for specfic file types it's unlikely that will happen...
Im guessing these are the lines you want to target
https://github.com/jarun/nnn/blob/master/src/nnn.c#L2324
though I wouldn't recommend it, because I dunno what the consequences are of using utf8 chars there, but you are welcome to try.
Can you please fix the following line in the Wiki?
alias ncp="cat ~/.config/nnn/.selection | tr '\0' '\n'" # access the selected files from your terminalIt doesn't show correctly. Also. it should be:
alias ncp="cat ${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection | tr '\0' '\n'" # access the selected files from your terminal
I'll get that fixed now since its a smaller issue. I'm sorry im still very busy...
btw some updates im dumping here before I leave:
SEL_DUPE: I find myself frequently wanting to backup/duplicate a file in the same directory, and I cant without going into the terminal and cp oldfile newfile my SEL_DUPE will basically cp oldfile oldfile.1 or cp oldfile oldfile~1. Haven't decided how this will handle selections and what not but I'll start with a highlighted file for now...I think i had some other notes but I can't recall them atm...
I missed this. Thanks for backing up. Yes, we are not going to package and show any icons. In addition to the indicators, I have added a patch in master which would also sort files by type. Also if you are looking for mkv files use the filter .mkv (exact string match) and that should show you the expected results.
I'm sorry im still very busy
No problem! Thanks for fixing it. I removed the entry for a while because it was showing incorrectly and I couldn't figure out how to handle it.
nice to use when you want to upload files via the browser
Cool! We can add it to the wiki _hacking nnn_ page.
reverse order
I use G to jump to the bottom and scroll up for the reverse order. Let's not add a new keybind for this. We also support rolling off top and bottom. So this shouldn't be a problem.
I liked the bold fonts
The problem is it looks awesome with some fonts and the bold rendering of some fonts are pathetic. So I just kept the brightness part of it. But with your input I think I will revert this back. This relieves us of having to detect the number of supported colors too. I think most terminals have way to disable bold fonts if someone doesn't like his/her font in bold. I'll add an wiki entry as well.
SEL_DUPE
I have faced this myself. We can implement this easily with a new keybind I guess.
I missed this. Thanks for backing up. Yes, we are not going to package and show any icons. In addition to the indicators, I have added a patch in master which would also sort files by type. Also if you are looking for mkv files use the filter
.mkv(exact string match) and that should show you the expected results.
And to clarify it for @LoafingBunny implementing it would sort of go against the design philosophy of nnn which sort of entails KISS and there isn't a simple and effective way to make those results accurately represent the data without significantly hogging the program down.
But fret not, eventually™ I will find some middle ground and make sixel show some simple thumbnails for pictures and movies within nnn and somehow not slow down everything too much. But I haven't put much thought into this other than, "oh I wish I had this", but atm I don't even have sixel on my terminals. Also note that this will never reach upstream, again because it is in great conflict of the design philosophy.
I'm sorry im still very busy
No problem! Thanks for fixing it. I removed the entry for a while because it was showing incorrectly and I couldn't figure out how to handle it.
Yeah and also a archwiki admin or something wasn't happy with the article, saying that the article was too "self promoting". I guess we have to dial down our wording on how wonderful our cult is.
nice to use when you want to upload files via the browser
Cool! We can add it to the wiki _hacking nnn_ page.
I have made two very shoddy scripts which we could add to the ./plugins/ instead.
nnn's selection. If the file exists it will simply be added, but if you add a web based file it will be downloaded to CWD and added to the selection, the problem is though that atm it may overwrite files if they have the same name. (Also note that the user have to clear the selection with KK or the selection in nnn will not be updated if it already exists, do you have any ideas on how to streamline this experience? I echo the results to the .selection file)The scripts I made are of very low quality and would be in need of great improvement.
reverse order
I use
Gto jump to the bottom and scroll up for the reverse order. Let's not add a new keybind for this. We also support rolling off top and bottom. So this shouldn't be a problem.
Yeah, that's not the problem. When I sort by time: I find the problem being when there are a bunch of directories and files in one folder: I have to scroll somewhere to the middle of a huge list to find the most recent file...
I guess my workflow is wrong, but if I could reverse the order then the file I would be looking for could be reached with G or gg. More often than not atm the file I'm looking for is a couple of PGDN clicks away (and when I over shoot a couple of PGUP's too)...
I liked the bold fonts
The problem is it looks awesome with some fonts and the bold rendering of some fonts are pathetic. So I just kept the brightness part of it. But with your input I think I will revert this back. This relieves us of having to detect the number of supported colors too. I think most terminals have way to disable bold fonts if someone doesn't like his/her font in bold. I'll add an wiki entry as well.
Yeah I realised it, hence I remained quiet. But seeing as I was dumping my thoughts in here I figured it was worth bringing up. I'm glad its back upstream :D.
SEL_DUPE
I have faced this myself. We can implement this easily with a new keybind I guess.
I used { 'B', 'SEL_DUPE' } thinking of Backup as Duplicate was taken already. But I would need input on how this feature would behave. As I stated my version will only handle 1 highlighted file. But what should happen when you select multiple files?
Here I go again, disappearing for a while poof
Yeah and also a archwiki admin or something wasn't happy with the article
It's their turf so we can't do much. I added two important characteristics now.
The scripts I made are of very low quality and would be in need of great improvement.
We can get help from @ath3 when he is back. He is great with scripts.
I guess my workflow is wrong
You need a keybind to jump to the first file in the directory. That's useful, yes.
SEL_DUPE
I'll think about it
SEL_DUPE
Instead of adding a new keybind, I am thinking of handling it the following way:
SEL_RENAME for a single fileSEL_DUPE
Instead of adding a new keybind, I am thinking of handling it the following way:
* combine the workflow with `SEL_RENAME` for a single file
Do you mean that the user gets prompted for a new file name to copy to? So basically a prompt for cp ? Shouldn't this require a new key? Otherwise we have to prompt the user if they want to rename or copy
* add a plugin for mass duplicate
Yeah, I would put it at a lower priority too...
Anyhow, don't stress too much about it.
Btw, my presence will be unreliable for the next few months. But I will try to keep an eye out here.
Otherwise we have to prompt the user if they want to rename or copy
Yes. That's what I am adding now.
Otherwise we have to prompt the user if they want to rename or copy
Yes. That's what I am adding now.
Alright. Not sure how I feel about it. But I will try your version out and give it an actual "field tested" review :)
I had thought of 2 workflows -
which one do you think is better? the second one keeps current workflow for rename intact but it may not be apparent to user that (s)he needs to keep the filename same to duplicate.
@0xACE
But fret not, eventually™ I will find some middle ground and make
sixelshow some simple thumbnails for pictures and movies withinnnnand somehow not slow down everything too much. But I haven't put much thought into this other than, "oh I wish I had this", but atm I don't even havesixelon my terminals. Also note that this will never reach upstream, again because it is in great conflict of the design philosophy.
Making 'sixel' show thumbnails for videos [and images] is a good idea, but not something I would like to see within nnn: simplicity, usability, and efficiency seem to be what nnn strives for, and a bicolored directory listing with entry names having type indicator suffixes does this well enough in the interface. In fact, Arun may have decided to list directory names in bold in addition to a different color, but it is an unnecessary addition. However, file navigation in thumbnail mode improves usability efficiently for the directories that contain image and video files that are not necessarily distinguished by file names (despite having distinguished file names) and more easily recognized by thumbnails, such as temp files, memes, recreational short videos (not movies), etc. Although I wouldn't argue for distorting nnn's interface with thumbnails, having this as a plugin that uses an external application would be great; something that would simply lay out thumnails, allow for hjkl navigation through them, and xdg-open upon entering. Upgrading sxiv to sxiw by including videos, or even 0xACE's tnav (!)
@jarun I suggest retaining the status bar showing entry count, and reverse video for current entry, in simple view. I think disappearance of all the detail columns make the view simple enough.
Guys,
show thumbnails
There's a plugin thumb to show thumbnails or images and PDFs. Check it out on master. However, it doesn't show thumbnails of videos. Do you know a simple way to do it without generating thumbnail for every frame?
There's another plugin viuimg to show images as well.
directory names in bold... but it is an unnecessary addition
if you think it's unnecessary, you can disable it from your terminal emulator settings
distorting nnn's interface with thumbnails
Both the plugins thumb and viuimg show the thumbnails in the terminal, doesn't interfere with nnn interface
sxiw
What's this? Link?
I suggest retaining the status bar showing entry count, and reverse video for current entry, in simple view.
I agree. I use the simple view all the time.
I had thought of 2 workflows -
* the current one which asks up-front if user wants to duplicate * the other one could be ask to duplicate if the users keeps the filename same, in this case we need to ask for the duplicate filename again OR use a random suffix like (I would prefer asking again)which one do you think is better? the second one keeps current workflow for rename intact but it may not be apparent to user that (s)he needs to keep the filename same to duplicate.
At least I'm glad the current version wasn't a complicated change to the code base.
But it seems like you are very well aware of effects it has on the "natural workflow".
The second one would be difficult for a user to find (they will likely find it by accident).
Also cp -f seems excessive. Maybe cp -i is safer? Also that spawn() doesn't support mvg and cpg.
I will think about it and let you know soon. But right now I have a boat to catch.
Btw do mind if i make a pull request for the drag and drop plugins?
(Saw that new posts appeared as i was writing will read them later0
natural workflow
Help shows rename/duplicate. So users should expect the question.
Also cp -f seems excessive.
We already check for duplicate ourselves, so we can remove this flag
cp -i is safer? Also that spawn() doesn't support mvg and cpg.
No output is shown for this
Btw do mind if i make a pull request for the drag and drop plugins?
Not at all! We'll have those!
Updated at commit 2bfcb281e7570c52e2fdd377772bc9e289f47c2e.
Light mode enhancements at commit cf1b9d34ea1c7b14f5ff1d9585ad57a25b655b2f.
sxiw
What's this?
sxiw and tnav merely referred to proposals for 0xACE's future efforts into finding middle ground and showing image and video thumbnails in nnn :]
a simple way to do it without generating thumbnail for every frame?
Not just display but also allow for navigation and xdg-open in thumbnail mode, just like the sxiv plugin ( sxiv -q * >/dev/null 2>&1 & ), hence the nonexistent application "sxiw".
Thanks for the enhanced light mode!
Should light mode be default now?
Should light mode be default now?
I think so.
@0xACE I have added / as an additional Leader key when filter is on. Makes the life of people (like me) who use nav-as-you-type mode all the time much easier. See commit c87f5fc1118e7d17b5d79e591d7acc46f7d128f6.
@lawnowner Maybe I should have further clarified: That idea I pitched was just a thought. And I agree, it's severe abuse of nnn to implement that function. It will never reach the upstream main branch. Sofar not one single line of code has been written by me to deal with this.
If I ever do it, it will be more of a personal thing... I'm not a fan of the idea of bloating and slowing down nnn btw. But the most realistic implementation of this feature would most likely be some external UI that communicates with nnn with info on current path highlighted item and selection (I got this idea from the work on the drag and drop scripts I'm tinkering with)... (Again this is merely a cloud of thoughts)
I'm aware of the thumb nailing scripts and I have used various other tools, including sxiv... On linux I find that my current workflow suffices: I launch the current directory in thunar and deal with it with a GUI file manager instead. Therefor it's not a big deal/problem for me atm. Besides when working with graphics maybe the CLI isn't the optimal viewing experience :P
natural workflow
Help shows rename/duplicate. So users should expect the question.
Yes, I guess my concern is that rename is a common user action. And now we "clutter" that function with a question of duplicating. It makes sense for us who are discussing it atm, but in the context of a brand new user: when they click rename and are prompted with Press 'd' to duplicate it could raise some eyebrows... Me personally I don't mind... I haven't tested it enough to have any valuable input atm, I'm spending time writing back replies here :(
(Before sending this post I tried it out for the first time, it works for me just fine atm, but this is just a first impression and not something you can rely on)
Also cp -f seems excessive.
We already check for duplicate ourselves, so we can remove this flag
cp -i is safer? Also that spawn() doesn't support mvg and cpg.
No output is shown for this
Fair enough. I also like that rename asks if you want to overwrite, didn't notice it before <3
Btw do mind if i make a pull request for the drag and drop plugins?
Not at all! We'll have those!
They will be pushed the next time I have time to work on nnn
Should light mode be default now?
I'm not a fan of it. But I also do not care.
My defaults are hardcoded into nnn but I guess I'll update my function n() in .bashrc just incase one of my machines isn't using my branch.
With the current master I commonly run with nnn -sdH (my -s has been patched with my own search function)
@0xACE I have added
/as an additional Leader key when filter is on. Makes the life of people (like me) who use nav-as-you-type mode all the time much easier. See commit c87f5fc.
That's sort of like mine but it only lets you access the bookmarks. I can see why you find it useful. Though my own patch supersedes your implementation so I can't try your version without disabling mine, and I strongly prefer mine. So I can't comment on it unfortunately.
Though my own patch supersedes your implementation
Please share what else it does
Though my own patch supersedes your implementation
Please share what else it does
Sorry should have considered my phrasing better. I consider my / patch to be a "package" which entails a few extra function, But in regards to / This is what my version does.
if (len > 1 && (S_ISDIR(dents[cur].mode) || dents[cur].flags & DIR_OR_LINK_TO_DIR)) {
cfg.filtermode = 2;
*ch = '\r';
break;
}
else {
cur = oldcur;
*ch = CONTROL('L');
goto end;
}
Note that I haven't decided what should happen when the prompt is empty or if the highlighted item is not a directory. so I simply clear the filter and end it (it changes from day to day, as I said I haven't decided what to do with it).
But that code will let you browse into a directory and remain in navigate-as-you-type without having to push ^T at all. Note that I changed cfg.filtermode to use 2 bit fields and added other places to handle cfg.filtermode > 1
Basically: when cfg.filtermode > 1 the next time filterentries() is called cfg.filtermode will be set back to 0 so no need to ^T to disable it once you exit from filterentries()
There may be other changes too, but atm all my changes are in a git stash. I have the intention of moving all those changes into my own personal branch so that it's easier to see. Atm that stash is getting a bit unorganized... (The reason I didn't create a branch was because I figured I'll make the branch once I get my own git server fixed again, so I just stashed changes...)
As my search function is case-insensitive: I have bound CAPITALIZED letters to access other functions:
E - Open file in editorP - Open file in pager L - remapped to ENTER q - remapped to escape (escape key is a really far fetched key to reach for me) (This is my favorite change to filterentries() besides the / patch)Q - remapped to regular q so you can actually search for the letter q (only place in my directories where this is a problem is my quotes/ directory. J - go down 1 itemK - go up 1 itemG - go to last item ! - open a child terminal in CWDAs stated before this is very much a personal config and I absolutely have no expectancy of you to adopt them in the master branch...
And after seing your support for / as a leader key maybe I'll implement my own version of leader key that works with my patch...
Btw I mean supersedes as in: my case '/': statement appears before yours, so I'm not affected by your change.
But that code will let you browse into a directory and remain in navigate-as-you-type without having to push ^T at all
I didn't understand. In nav-as-you-type you are always at the filter mode when you enter a directory with right or Enter.
Yes, the problem I have is that nav-as-you-type keeps you imprisoned in that mode until you ^T out of it. My version will only remain in nav-as-you-type only if you used / to go into a directory... Everything else will practicaly reset you back to normal mode
I dont know if github showed you that I commented your commit: https://github.com/jarun/nnn/commit/dec683c39e217f605262e71ecdd08ef0cc3e87e1
I feel like this is now becoming too explicit/verbose. The user clicked
renamebut now the user is asked if it wants to rename or duplicate. I feel like I'm not helping, but I'm just voicing my concerns... And atm I can't think of a very good solution... For now I'm remaining with the version before this commit as it wasn't too much of a deal to hit any other key thand
keeps you imprisoned in that mode until you ^T out of it
OK. Got it.
@0xACE commit ba12fa8b3d215aeb1038cc5d34de2f1b2d9e3e4b breaks selection on Termux (Android).
To reproduce, scroll down 4 or 5 items from top, then send the Termux app to background. Then click on the Termux app icon to bring it to foreground. The first item gets selected in reverse video. However, if you use the down arrow, the selection moves to the 5th or 6th item.
Please fix.
For now, I have reverted the commit.
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.
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.
https://github.com/jarun/nnn/commit/ba12fa8b3d215aeb1038cc5d34de2f1b2d9e3e4b#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)
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.
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.
@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
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.
@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 ?
@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.
Thanks for the help @shaggytwodope!
@shaggytwodope would it be possible to transfer the current PPA?
@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.
My launchpad handle is _engineerarun_.
@nhasian are you good to go now?
@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.
Thank you!
yep I think I have everything I need to get up and running now thanks!
On Tue, Aug 6, 2019 at 10:26 PM Mischievous Meerkat <
[email protected]> wrote:
@nhasian https://github.com/nhasian are you good to go now?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jarun/nnn/issues/306?email_source=notifications&email_token=ABG7U4K52KIXSOQ3GIXUL43QDJMHNA5CNFSM4ICU552KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3XHU2I#issuecomment-518945385,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG7U4JSXHB2YKTLKIZNIELQDJMHNANCNFSM4ICU552A
.
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.
@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.
@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.
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!
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.
Thanks, I see that the binds are nicely kept in the header file so recompilation is a good option for me.
Thanks!
:+1:
Rolled at #324.