Browse Source

First custom package definition for nnn with O_CTX8=1 and no-easy-delete.patch

master
K 11 months ago
commit
e81b29b23a
  1. 50
      nnn.scm
  2. 31
      no-easy-delete.patch

50
nnn.scm

@ -0,0 +1,50 @@ @@ -0,0 +1,50 @@
(use-modules (guix packages)
(guix download)
(guix build-system gnu)
(guix utils)
(gnu packages)
(gnu packages ncurses)
(gnu packages readline)
(gnu packages pkg-config)
((guix licenses) #:prefix license:))
(define-public nnn-ctx8
(package
(name "nnn")
(version "4.4")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/jarun/nnn/releases/download/v"
version "/nnn-v" version ".tar.gz"))
(sha256
(base32 "0lqn7pyy8c1vy29vn8ad4x23cw67cy1d21ghns6f3w9a1h7kyjp0"))
(patches
(search-patches "no-easy-delete.patch"))))
(build-system gnu-build-system)
(inputs
(list ncurses readline))
(native-inputs
(list pkg-config))
(arguments
`(#:tests? #f ; no tests
#:phases
(modify-phases %standard-phases
(delete 'configure)) ; no configure script
#:make-flags
(list
(string-append "PREFIX="
(assoc-ref %outputs "out"))
(string-append "CC=" ,(cc-for-target))
(string-append "O_CTX8=1")
(string-append "PKG_CONFIG=" ,(pkg-config-for-target)))))
(home-page "https://github.com/jarun/nnn")
(synopsis "Terminal file browser")
(description
"@command{nnn} is a fork of @command{noice}, a fast and minimal text
terminal file browser with keyboard shortcuts for navigation, opening files and
running tasks. There is no configuration file and MIME associations are
hard-coded.")
(license license:bsd-2)))
nnn-ctx8

31
no-easy-delete.patch

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
commit e091d1a436d1af057b4d551901dcfed6f2c77b64
Author: K <matf@disr.it>
Date: Wed Dec 29 01:45:45 2021 +0100
Remove easy-delete on X
diff --git a/src/nnn.c b/src/nnn.c
index a0fafe9..5585683 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5034,7 +5034,7 @@ static void show_help(const char *path)
"ca Select all%-14cA Invert sel\n"
"9p ^P Copy here%-12cw ^W Cp/mv sel as\n"
"9v ^V Move here%-15cE Edit sel list\n"
- "9x ^X Delete%-16cEsc Send to FIFO\n"
+ "^X Delete%-16cEsc Send to FIFO\n"
"0\n"
"1MISC\n"
"8Alt ; Select plugin%-11c= Launch app\n"
diff --git a/src/nnn.h b/src/nnn.h
index 969419b..1e490b2 100644
--- a/src/nnn.h
+++ b/src/nnn.h
@@ -232,7 +232,6 @@ static struct key bindings[] = {
{ 'w', SEL_CPMVAS },
{ CONTROL('W'), SEL_CPMVAS },
/* Delete from selection buffer */
- { 'x', SEL_RM },
{ CONTROL('X'), SEL_RM },
/* Open in a custom application */
{ 'o', SEL_OPENWITH },
Loading…
Cancel
Save