]> Sergey Matveev's repositories - nnn.git/log
nnn.git
2 years agoicons-hash: misc improvements (#1553)
N-R-K [Mon, 2 Jan 2023 16:53:18 +0000 (16:53 +0000)]
icons-hash: misc improvements (#1553)

* icons-hash: take total probe count into account as well

* icons-hash: use a better PRNG

the older method was using a multiplicative congruential generator (MCG)
which doesn't work too well especially with just 32 bits of state.

change it to a PCG instead with 64 bits of state (and 32 bits of output)
which should give better results.

and since we should get better rng - the search iteration has been
halved as well to save some build time.

* icons-hash: use an xor-rotate hash function

* icons-hash: fix some compiler warnings

2 years agoMiscellaneous improvements to nmount plugin (#1547)
8B411 [Wed, 21 Dec 2022 17:44:28 +0000 (19:44 +0200)]
Miscellaneous improvements to nmount plugin (#1547)

* plugins/nmount: keep `while` & `do` on one line for consistency

* plugins/nmount: sync only that device, which user wants to unmount

* plugins/nmount: replace all instances of `$dev` with `/dev/$dev`

* plugins/nmount: add `--no-user-interaction` option to `udisksctl`

Otherwise the user will be asked for authentication each time he wants
to unmount, say, HDD, since `udisksctl` will try to power it off.

* plugins/nmount: try to mount only existing block devices

* plugins/nmount: do not invoke `lsblk` immediately after mounting

Sometimes `lsblk` fails to provide mountpoint in such a short time frame.

* plugins/nmount: simplify pipe

* plugins/nmount: keep `echo` arguments in a single pair of quotes

* plugins/nmount: report mountpoint only if mounting was successful

2 years agoAdd Discussions link to README.
Arun Prakash Jana [Sun, 18 Dec 2022 15:04:44 +0000 (20:34 +0530)]
Add Discussions link to README.

2 years agokdeconnect: misc improvements (#1543)
Raffaele Mancuso [Sun, 18 Dec 2022 10:39:11 +0000 (11:39 +0100)]
kdeconnect: misc improvements (#1543)

- Work with multiple connected devices by sending files to the first
  device
- Support multi-files selection
- Support sending hovered file in case no file is selected

Co-authored-by: NRK <nrk@disroot.org>
Co-authored-by: Arun Prakash Jana <engineerarun@gmail.com>
2 years agoUpdate readme
Arun Prakash Jana [Fri, 16 Dec 2022 14:24:53 +0000 (19:54 +0530)]
Update readme

2 years agoMerge pull request #1542 from KlzXS/archive_script
Arun [Tue, 13 Dec 2022 13:10:42 +0000 (18:40 +0530)]
Merge pull request #1542 from KlzXS/archive_script

Remove unnecessary parameter from `archive_selection()`

2 years agoRemove unnecessary parameter from `archive_selection()`
KlzXS [Mon, 12 Dec 2022 15:11:55 +0000 (16:11 +0100)]
Remove unnecessary parameter from `archive_selection()`

2 years agoOptimize link creation
Arun Prakash Jana [Mon, 12 Dec 2022 12:33:11 +0000 (18:03 +0530)]
Optimize link creation

2 years agoClear selection if all links are generated
Arun Prakash Jana [Mon, 12 Dec 2022 10:45:06 +0000 (16:15 +0530)]
Clear selection if all links are generated

2 years agoShow errno on link creation failure
Arun Prakash Jana [Mon, 12 Dec 2022 10:27:20 +0000 (15:57 +0530)]
Show errno on link creation failure

2 years agoRestore check to prevent overwriting hovered file when archiving
Arun Prakash Jana [Mon, 12 Dec 2022 09:12:03 +0000 (14:42 +0530)]
Restore check to prevent overwriting hovered file when archiving

2 years agoImprove archive, rename, new workflows
Arun Prakash Jana [Mon, 12 Dec 2022 04:22:16 +0000 (09:52 +0530)]
Improve archive, rename, new workflows

1. hover on entry created in cwd
2. check user input doesn't end with /
3. check user input len < PATH_MAX
4. support creation in ~ directory
5. handle filter mode after creation
6. ensure absolute path len < PATH_MAX

2 years agoImprove archive creation handling
Arun Prakash Jana [Sun, 11 Dec 2022 20:50:28 +0000 (02:20 +0530)]
Improve archive creation handling

2 years agoFix memory leak
Arun Prakash Jana [Sun, 11 Dec 2022 18:37:14 +0000 (00:07 +0530)]
Fix memory leak

2 years agoUpdate docs
Arun Prakash Jana [Sun, 11 Dec 2022 05:23:16 +0000 (10:53 +0530)]
Update docs

2 years agoUse built-in
Arun Prakash Jana [Sat, 10 Dec 2022 22:12:34 +0000 (03:42 +0530)]
Use built-in

2 years agoFix length calculation
Arun Prakash Jana [Sat, 10 Dec 2022 21:23:34 +0000 (02:53 +0530)]
Fix length calculation

2 years agoAttmept to create PATH if PATH is non-existent
Arun Prakash Jana [Sat, 10 Dec 2022 18:33:24 +0000 (00:03 +0530)]
Attmept to create PATH if PATH is non-existent

2 years agoCreate files in less permissive mode
Arun Prakash Jana [Sat, 10 Dec 2022 16:32:22 +0000 (22:02 +0530)]
Create files in less permissive mode

2 years agoFix build break
Arun Prakash Jana [Sat, 10 Dec 2022 16:13:42 +0000 (21:43 +0530)]
Fix build break

2 years agoFix signed and unsigned comparison
Arun Prakash Jana [Sat, 10 Dec 2022 16:05:56 +0000 (21:35 +0530)]
Fix signed and unsigned comparison

2 years agoAllow creating a new file on startup
Arun Prakash Jana [Sat, 10 Dec 2022 14:54:49 +0000 (20:24 +0530)]
Allow creating a new file on startup

An accessibe parent directory must exist to allow creation

2 years agoAllow overwriting regular files on new empty file creation
Arun Prakash Jana [Sat, 10 Dec 2022 13:51:56 +0000 (19:21 +0530)]
Allow overwriting regular files on new empty file creation

2 years agoUpdate ToDo link
Arun Prakash Jana [Sat, 3 Dec 2022 01:56:26 +0000 (07:26 +0530)]
Update ToDo link

2 years agoUpdate README
Arun Prakash Jana [Sat, 26 Nov 2022 04:06:07 +0000 (09:36 +0530)]
Update README

2 years agoAdd correct check for Wayland in clipboard plugins
Arun Prakash Jana [Sat, 26 Nov 2022 03:40:59 +0000 (09:10 +0530)]
Add correct check for Wayland in clipboard plugins

2 years agoMerge pull request #1531 from sjmulder/pr/cflags
Arun [Fri, 25 Nov 2022 16:54:31 +0000 (22:24 +0530)]
Merge pull request #1531 from sjmulder/pr/cflags

Respect CFLAGS and LDFLAGS when building generator

2 years agoRespect CFLAGS and LDFLAGS when building generator
Sijmen J. Mulder [Fri, 25 Nov 2022 15:38:37 +0000 (16:38 +0100)]
Respect CFLAGS and LDFLAGS when building generator

2 years agoFix #1529: fix improper piping
Arun Prakash Jana [Fri, 25 Nov 2022 14:18:45 +0000 (19:48 +0530)]
Fix #1529: fix improper piping

2 years agoSet rdef to development
Arun Prakash Jana [Thu, 24 Nov 2022 05:54:10 +0000 (11:24 +0530)]
Set rdef to development

2 years agoPrepare for release v4.7 Cuba libre v4.7
Arun Prakash Jana [Thu, 24 Nov 2022 05:28:21 +0000 (10:58 +0530)]
Prepare for release v4.7 Cuba libre

2 years agoplugins/upload: handle selection using ffsend
Darukutsu [Fri, 18 Nov 2022 12:44:16 +0000 (13:44 +0100)]
plugins/upload: handle selection using ffsend

2 years agoMerge pull request #1516 from lgtm-migrator/codeql
Arun [Wed, 9 Nov 2022 17:40:30 +0000 (23:10 +0530)]
Merge pull request #1516 from lgtm-migrator/codeql

Add CodeQL workflow for GitHub code scanning

2 years agoAdd CodeQL workflow for GitHub code scanning
LGTM Migrator [Wed, 9 Nov 2022 15:46:24 +0000 (15:46 +0000)]
Add CodeQL workflow for GitHub code scanning

2 years agoMerge pull request #1512 from Darukutsu/pull-requests
Arun [Wed, 2 Nov 2022 13:04:44 +0000 (18:34 +0530)]
Merge pull request #1512 from Darukutsu/pull-requests

plugins/wallpaper: support wayland and fix indentation

2 years agoplugins/wallpaper: update description
NRK [Tue, 1 Nov 2022 23:27:57 +0000 (05:27 +0600)]
plugins/wallpaper: update description

2 years agoplugins/wallpaper: fix indentation
NRK [Tue, 1 Nov 2022 17:03:14 +0000 (23:03 +0600)]
plugins/wallpaper: fix indentation

2 years agoUpdate wallpaper
daru [Tue, 1 Nov 2022 16:05:57 +0000 (17:05 +0100)]
Update wallpaper

2 years agofix plugins/wallpaper support for wayland
Darukutsu [Tue, 1 Nov 2022 15:40:25 +0000 (16:40 +0100)]
fix plugins/wallpaper support for wayland

2 years agoMerge pull request #1511 from N-R-K/icons_clarify
Arun [Wed, 26 Oct 2022 11:56:32 +0000 (17:26 +0530)]
Merge pull request #1511 from N-R-K/icons_clarify

Misc icon changes

2 years agoadd ksh, ttf and otf icons
NRK [Wed, 26 Oct 2022 09:08:27 +0000 (15:08 +0600)]
add ksh, ttf and otf icons

Co-authored-by: Tanner Babcock <babkock@protonmail.com>
2 years agoicons.h: fix alignment
NRK [Wed, 26 Oct 2022 08:55:20 +0000 (14:55 +0600)]
icons.h: fix alignment

2 years agoclarify the goal of the default icon set
NRK [Wed, 26 Oct 2022 08:54:07 +0000 (14:54 +0600)]
clarify the goal of the default icon set

2 years agoimgview: handle arguments as strings (#1509)
nblock [Fri, 21 Oct 2022 12:16:06 +0000 (14:16 +0200)]
imgview: handle arguments as strings (#1509)

* imgview: handle arguments as strings

Avoids the following synax errors:
line 34: [: : integer expression expected
line 49: [: : integer expression expected

* imgview: use meaningful strings as arguments

Co-authored-by: Florian Preinstorfer <florian@nblock.org>
Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2 years agoMerge pull request #1506 from N-R-K/nsxiv_link
Arun [Wed, 12 Oct 2022 14:53:21 +0000 (20:23 +0530)]
Merge pull request #1506 from N-R-K/nsxiv_link

update nsxiv upstream link

2 years agoMerge pull request #1507 from N-R-K/prompt_prefill
Arun [Wed, 12 Oct 2022 00:34:20 +0000 (06:04 +0530)]
Merge pull request #1507 from N-R-K/prompt_prefill

prefill the prompt when there's a single target

2 years agoprefill the prompt when there's a single target
NRK [Tue, 11 Oct 2022 18:46:17 +0000 (00:46 +0600)]
prefill the prompt when there's a single target

Fixes: #1505 #1282 #1345
2 years agofix nsxiv upstream link
NRK [Tue, 11 Oct 2022 16:00:42 +0000 (22:00 +0600)]
fix nsxiv upstream link

main repo is hosted on codeberg, github is only a mirror.

2 years agoAdd Rust icons (#1502)
Dean G [Wed, 5 Oct 2022 11:38:48 +0000 (22:38 +1100)]
Add Rust icons (#1502)

2 years agoMerge pull request #1501 from luukvbaal/patches
Arun [Sat, 1 Oct 2022 15:45:48 +0000 (21:15 +0530)]
Merge pull request #1501 from luukvbaal/patches

Fix gitstatus patch git command

2 years agoFix git pathspec for gitstatus patch
Luuk van Baal [Sat, 1 Oct 2022 15:06:30 +0000 (17:06 +0200)]
Fix git pathspec for gitstatus patch

2 years agoFix #1498: count broken when selection is updated outside nnn
Arun Prakash Jana [Tue, 27 Sep 2022 19:00:26 +0000 (00:30 +0530)]
Fix #1498: count broken when selection is updated outside nnn

2 years agoFix build break
Arun Prakash Jana [Mon, 19 Sep 2022 16:06:04 +0000 (21:36 +0530)]
Fix build break

2 years agoFix #1486: update macOS instructions for chksum plugin
Christian Rackerseder [Mon, 19 Sep 2022 06:52:32 +0000 (08:52 +0200)]
Fix #1486: update macOS instructions for chksum plugin

2 years agoAdd macOS instruction
Arun Prakash Jana [Sat, 17 Sep 2022 16:09:52 +0000 (21:39 +0530)]
Add macOS instruction

2 years agoMerge pull request #1491 from PatrickF1/patch-1
Arun [Fri, 16 Sep 2022 17:58:59 +0000 (23:28 +0530)]
Merge pull request #1491 from PatrickF1/patch-1

slightly improve n.fish

2 years agowrap in quotes just in case
Patrick [Fri, 16 Sep 2022 02:57:25 +0000 (19:57 -0700)]
wrap in quotes just in case

2 years agomake one single invocation to test
Patrick [Fri, 16 Sep 2022 01:24:04 +0000 (18:24 -0700)]
make one single invocation to test

2 years agoslightly improve and optimize n.fish
Patrick [Fri, 16 Sep 2022 00:11:34 +0000 (17:11 -0700)]
slightly improve and optimize n.fish

The expr is redundant because `test -ge` treats strings as numbers already.

2 years agoMerge pull request #1485 from pataquets/detect-key-collision-text
Arun [Tue, 13 Sep 2022 01:02:39 +0000 (06:32 +0530)]
Merge pull request #1485 from pataquets/detect-key-collision-text

Detect key collisions: make clear everywhere that it exits afterwards.

2 years agoDetect key collisions: make clear everywhere that it exits afterwards.
pataquets [Mon, 12 Sep 2022 21:04:54 +0000 (23:04 +0200)]
Detect key collisions: make clear everywhere that it exits afterwards.

2 years agoMerge pull request #1480 from luukvbaal/master
Arun [Thu, 8 Sep 2022 19:10:35 +0000 (00:40 +0530)]
Merge pull request #1480 from luukvbaal/master

Show selected items in rm msg

2 years agoShow selected items in rm msg
Luuk van Baal [Thu, 8 Sep 2022 18:07:34 +0000 (20:07 +0200)]
Show selected items in rm msg
Close https://github.com/jarun/nnn/issues/1479

2 years agoUse correct data type for key collision detection
Arun Prakash Jana [Tue, 23 Aug 2022 13:30:45 +0000 (19:00 +0530)]
Use correct data type for key collision detection

2 years agoMerge pull request #1461 from N-R-K/xstrdup_memcpy
Arun [Tue, 16 Aug 2022 13:37:21 +0000 (19:07 +0530)]
Merge pull request #1461 from N-R-K/xstrdup_memcpy

xstrdup: use memcpy

2 years agoxstrdup: use memcpy
NRK [Mon, 8 Aug 2022 21:01:30 +0000 (03:01 +0600)]
xstrdup: use memcpy

the length is already known, so memcpy should be faster than xstrsncpy.

2 years agoMerge pull request #1457 from N-R-K/alignas
Arun [Thu, 11 Aug 2022 10:46:31 +0000 (16:16 +0530)]
Merge pull request #1457 from N-R-K/alignas

use standard C11 alignas

2 years agouse standard C11 alignas
NRK [Tue, 9 Aug 2022 19:50:41 +0000 (01:50 +0600)]
use standard C11 alignas

nnn source code already uses C11, which introduced `_Alignas` [^0] as a
standardized alternative to __attribute__((aligned)).

there are no other usage of `__attribute__` in the nnn source code, so
in theory this should make things more portable across compilers.

also removes an unnecessary usage of `alloca()` with an aligned constant
sized buffer instead.

[^0]: https://en.cppreference.com/w/c/language/_Alignas

2 years agoMerge pull request #1456 from luukvbaal/preview-tui
Arun [Sun, 7 Aug 2022 16:00:23 +0000 (21:30 +0530)]
Merge pull request #1456 from luukvbaal/preview-tui

Preview-tui fix image_preview stdout

2 years agoPreview-tui fix image_preview stdout
Luuk van Baal [Sun, 7 Aug 2022 14:40:12 +0000 (16:40 +0200)]
Preview-tui fix image_preview stdout

2 years agoUpdate docs
Arun Prakash Jana [Sat, 6 Aug 2022 05:53:10 +0000 (11:23 +0530)]
Update docs

2 years agoUpdate ToDo list link
Arun Prakash Jana [Fri, 5 Aug 2022 00:16:25 +0000 (05:46 +0530)]
Update ToDo list link

2 years agoMerge pull request #1453 from N-R-K/fix_manpage
Arun [Thu, 4 Aug 2022 16:15:20 +0000 (21:45 +0530)]
Merge pull request #1453 from N-R-K/fix_manpage

fix outdated manpage

2 years agofix outdated manpage
NRK [Thu, 4 Aug 2022 15:38:38 +0000 (21:38 +0600)]
fix outdated manpage

Closes: https://github.com/jarun/nnn/issues/1452
2 years agoMerge pull request #1451 from KlzXS/list_mode_read
Arun [Wed, 3 Aug 2022 15:57:47 +0000 (21:27 +0530)]
Merge pull request #1451 from KlzXS/list_mode_read

Improved chunk allocation logic

2 years agoImproved chunk allocation logic
KlzXS [Tue, 2 Aug 2022 19:22:42 +0000 (21:22 +0200)]
Improved chunk allocation logic

Found memory deallocation edge case

Update and move chunk limit check

Generalize maximum size of input

Remove hard-coded values

Remove superfluous check before free

Let the kernel deal with extra data

Handle signals while reading

Conform to the manpage

Make CI happy

use `size_t` instead of `ssize_t`

`ssize_t` was used just so `--i` when `i` was zero would become -1
instead of SIZE_MAX. for looping through something in reverse order, the
"goes-to" operator (`-->`) can be used instead which doesn't require `i`
to be signed anymore.

remove useless blank line

use a normal loop

don't see any reason why freeing in reverse order would've been needed.

Co-authored-by: N-R-K <nrk@disroot.org>
2 years agoFix #1449: ^N not working
Arun Prakash Jana [Mon, 1 Aug 2022 18:11:04 +0000 (23:41 +0530)]
Fix #1449: ^N not working

2 years agoUpdate colemak patch
Arun Prakash Jana [Sun, 31 Jul 2022 14:10:50 +0000 (19:40 +0530)]
Update colemak patch

2 years agoKey 'J' to jump to entry number or relative offset
Arun Prakash Jana [Sun, 31 Jul 2022 13:24:47 +0000 (18:54 +0530)]
Key 'J' to jump to entry number or relative offset

2 years agoContinue listing when max files/size is exceeded
Arun Prakash Jana [Sun, 31 Jul 2022 07:19:42 +0000 (12:49 +0530)]
Continue listing when max files/size is exceeded

2 years agoFile list mode changes
Arun Prakash Jana [Sun, 31 Jul 2022 05:33:25 +0000 (11:03 +0530)]
File list mode changes

- support listing maximum 16K files
- check if target directory exists before directory tree creation
  in most of the cases many files will be under the same directory
- make frequently used function 'inline'

2 years agoLet ffmpegthumbnailer use embedded image metadata
Arun Prakash Jana [Sat, 30 Jul 2022 16:14:00 +0000 (21:44 +0530)]
Let ffmpegthumbnailer use embedded image metadata

2 years agoUpdate patches
Arun Prakash Jana [Fri, 29 Jul 2022 17:11:17 +0000 (22:41 +0530)]
Update patches

2 years agoOption -B to use bsdtar as archive tool
Arun Prakash Jana [Fri, 29 Jul 2022 17:05:43 +0000 (22:35 +0530)]
Option -B to use bsdtar as archive tool

2 years agoFix typo
Arun Prakash Jana [Fri, 29 Jul 2022 16:48:34 +0000 (22:18 +0530)]
Fix typo

2 years agoRevert "Patch #1386: make bsdtar the default archive handler"
Arun Prakash Jana [Fri, 29 Jul 2022 16:44:00 +0000 (22:14 +0530)]
Revert "Patch #1386: make bsdtar the default archive handler"

This reverts commit e104b749be2fd6dc22a89404ffb9e5bd155cbab1.

2 years agoFix rm prompt
Arun Prakash Jana [Thu, 28 Jul 2022 14:08:55 +0000 (19:38 +0530)]
Fix rm prompt

Esc - cancels the search
y/Y - adds the force option
n/N/any other key - prompts for every file

2 years agoUpdate gitignore file
Arun Prakash Jana [Thu, 28 Jul 2022 13:08:22 +0000 (18:38 +0530)]
Update gitignore file

2 years agoMerge pull request #1440 from N-R-K/fix_emoji_tar
Arun [Tue, 26 Jul 2022 15:39:59 +0000 (21:09 +0530)]
Merge pull request #1440 from N-R-K/fix_emoji_tar

fix emoji tar command

2 years agofix emoji tar command
NRK [Tue, 26 Jul 2022 15:37:38 +0000 (21:37 +0600)]
fix emoji tar command

Fixes: https://github.com/jarun/nnn/pull/1356#discussion_r930094949
2 years agoMakefile: more robust generated header tracking (#1439)
N-R-K [Tue, 26 Jul 2022 14:56:49 +0000 (14:56 +0000)]
Makefile: more robust generated header tracking (#1439)

give each generated header it's own unique file so that it's not
possible to try and build `O_EMOJI=1` with the generated header for
`O_NERD=1`.

2 years agoUpdate Haiku file
Arun Prakash Jana [Tue, 26 Jul 2022 14:50:04 +0000 (20:20 +0530)]
Update Haiku file

2 years agoPrepare for release v4.6 Absinthe v4.6
Arun Prakash Jana [Tue, 26 Jul 2022 13:47:58 +0000 (19:17 +0530)]
Prepare for release v4.6 Absinthe

2 years agoAdd Elixir icon (#1437)
Tharindu Abeydeera [Mon, 25 Jul 2022 14:10:00 +0000 (19:40 +0530)]
Add Elixir icon (#1437)

* Added icons for erlang, elixir and lockfile

* Lockfile icon updated

* Added colors for Erlang and elixir

* Added few more color variations and configured colors and file
extensions

* remove erlang and lock, use 1 color for elixir

Co-authored-by: Tharindu Abeydeera <tharindu.a@vizuamatix.com>
Co-authored-by: NRK <nrk@disroot.org>
2 years agoMerge pull request #1438 from N-R-K/icons_cleanup
Arun [Mon, 25 Jul 2022 13:49:25 +0000 (19:19 +0530)]
Merge pull request #1438 from N-R-K/icons_cleanup

icons-hash: comments and cleanups

2 years agoicons-hash: comments and cleanups
NRK [Mon, 25 Jul 2022 11:52:44 +0000 (17:52 +0600)]
icons-hash: comments and cleanups

adds some comments, references and cleanups. no change in functionality.

2 years agoRemove redundant spaces
Arun Prakash Jana [Sun, 24 Jul 2022 14:37:27 +0000 (20:07 +0530)]
Remove redundant spaces

2 years agoAdd example to quick find in subtree and nuke
Arun Prakash Jana [Sun, 24 Jul 2022 10:50:54 +0000 (16:20 +0530)]
Add example to quick find in subtree and nuke

2 years agoMerge pull request #1436 from N-R-K/icon_compaction
Arun [Sun, 24 Jul 2022 10:44:52 +0000 (16:14 +0530)]
Merge pull request #1436 from N-R-K/icon_compaction

icons: use a compact array

2 years agoicons: use a compact array
NRK [Sun, 24 Jul 2022 10:10:28 +0000 (16:10 +0600)]
icons: use a compact array

a lot of the extension use the same icon. this can be exploited via
having an array with all the unique icons and then storing a single byte
index into the unique array.

when using `O_EMOJI` this results in around ~1.7KiB drop in the total
table size. `O_NERD` and `O_ICONS` get roughly ~0.5KiB savings.