mirror of
https://github.com/jarun/nnn.git
synced 2024-09-11 04:55:25 +03:00
rm colemak-dh
one colemak patch ought to be enough. Closes: https://github.com/jarun/nnn/issues/1735
This commit is contained in:
parent
9b921761b6
commit
336ec8be5d
8
Makefile
8
Makefile
@ -32,7 +32,6 @@ O_NOSORT := 0 # disable sorting entries on dir load
|
||||
|
||||
# User patches
|
||||
O_COLEMAK := 0 # change key bindings to colemak compatible layout
|
||||
O_COLEMAK-DH := 0 # change key bindings to colemak-dh compatible layout
|
||||
O_GITSTATUS := 0 # add git status to detail view
|
||||
O_NAMEFIRST := 0 # print file name first, add uid and guid to detail view
|
||||
O_RESTOREPREVIEW := 0 # add preview pipe to close and restore preview pane
|
||||
@ -169,7 +168,6 @@ LOGOSVG = misc/logo/logo.svg
|
||||
LOGO64X64 = misc/logo/logo-64x64.png
|
||||
|
||||
COLEMAK = patches/colemak
|
||||
COLEMAK-DH = patches/colemak-dh
|
||||
GITSTATUS = patches/gitstatus
|
||||
NAMEFIRST = patches/namefirst
|
||||
RESTOREPREVIEW = patches/restorepreview
|
||||
@ -342,9 +340,6 @@ endif
|
||||
ifeq ($(strip $(O_COLEMAK)),1)
|
||||
patch --forward $(PATCH_OPTS) --strip=1 --input=$(COLEMAK)/mainline.diff
|
||||
endif
|
||||
ifeq ($(strip $(O_COLEMAK-DH)),1)
|
||||
patch --forward $(PATCH_OPTS) --strip=1 --input=$(COLEMAK-DH)/mainline.diff
|
||||
endif
|
||||
|
||||
postpatch:
|
||||
ifeq ($(strip $(O_NAMEFIRST)),1)
|
||||
@ -361,9 +356,6 @@ endif
|
||||
ifeq ($(strip $(O_COLEMAK)),1)
|
||||
patch --reverse $(PATCH_OPTS) --strip=1 --input=$(COLEMAK)/mainline.diff
|
||||
endif
|
||||
ifeq ($(strip $(O_COLEMAK-DH)),1)
|
||||
patch --reverse $(PATCH_OPTS) --strip=1 --input=$(COLEMAK-DH)/mainline.diff
|
||||
endif
|
||||
|
||||
skip: ;
|
||||
|
||||
|
@ -8,7 +8,7 @@ The patches will be adapted on each release when necessary (v4.1 onwards). Each
|
||||
|
||||
| Patch (a-z) | Description | Make var |
|
||||
| --- | --- | --- |
|
||||
| colemak | Key bindings for Colemak-DH keyboard layout | `O_COLEMAK` |
|
||||
| colemak | Key bindings for Colemak keyboard layout | `O_COLEMAK` |
|
||||
| gitstatus | Add git status column to the detail view. Provides command line flag `-G` to show column in normal mode. | `O_GITSTATUS` |
|
||||
| namefirst | Print filenames first in the detail view. Print user/group columns when a directory contains different users/groups. | `O_NAMEFIRST` |
|
||||
| restorepreview | Add pipe to close and restore [`preview-tui`](https://github.com/jarun/nnn/blob/master/plugins/preview-tui) for internal undetached edits (<kbd>e</kbd> key)| `O_RESTOREPREVIEW` |
|
||||
|
@ -1,173 +0,0 @@
|
||||
# Description: Change key bindings for comfortable use with Colemak-DH keyboard
|
||||
# layout. This diff was made in 4.5 release version of nnn.
|
||||
#
|
||||
# Author: github.com/anjerukare
|
||||
|
||||
diff --git a/src/nnn.c b/src/nnn.c
|
||||
index ecedee43..9d779f90 100644
|
||||
--- a/src/nnn.c
|
||||
+++ b/src/nnn.c
|
||||
@@ -5098,40 +5098,40 @@ static void show_help(const char *path)
|
||||
"2(___n))\n"
|
||||
"0\n"
|
||||
"1NAVIGATION\n"
|
||||
- "9Up k Up%16PgUp ^U Page up\n"
|
||||
- "9Dn j Down%14PgDn ^D Page down\n"
|
||||
- "9Lt h Parent%12~ ` @ - ~, /, start, prev\n"
|
||||
- "5Ret Rt l Open%20' First file/match\n"
|
||||
- "9g ^A Top%21J Jump to entry/offset\n"
|
||||
- "9G ^E End%20^J Toggle auto-advance on open\n"
|
||||
+ "9Up e Up%16PgUp ^U Page up\n"
|
||||
+ "9Dn n Down%14PgDn ^D Page down\n"
|
||||
+ "9Lt m Parent%12~ ` @ - ~, /, start, prev\n"
|
||||
+ "5Ret Rt i Open%20' First file/match\n"
|
||||
+ "9g ^E Top%21J Jump to entry/offset\n"
|
||||
+ "9G ^N End%20^J Toggle auto-advance on open\n"
|
||||
"8B (,) Book(mark)%11b ^/ Select bookmark\n"
|
||||
"a1-4 Context%11(Sh)Tab Cycle/new context\n"
|
||||
"62Esc ^Q Quit%20q Quit context\n"
|
||||
"b^G QuitCD%18Q Pick/err, quit\n"
|
||||
"0\n"
|
||||
"1FILTER & PROMPT\n"
|
||||
- "c/ Filter%17^N Toggle type-to-nav\n"
|
||||
+ "c/ Filter%17^F Toggle type-to-nav\n"
|
||||
"aEsc Exit prompt%12^L Toggle last filter\n"
|
||||
"c. Toggle hidden%05Alt+Esc Unfilter, quit context\n"
|
||||
"0\n"
|
||||
"1FILES\n"
|
||||
- "9o ^O Open with%15n Create new/link\n"
|
||||
- "9f ^F File stats%14d Detail mode toggle\n"
|
||||
+ "9o ^O Open with%15c Create new/link\n"
|
||||
+ "cf File stats%14d Detail mode toggle\n"
|
||||
"b^R Rename/dup%14r Batch rename\n"
|
||||
- "cz Archive%17e Edit file\n"
|
||||
+ "cz Archive%17y Edit file\n"
|
||||
"c* Toggle exe%14> Export list\n"
|
||||
- "6Space + (Un)select%12m-m Select range/clear\n"
|
||||
+ "6Space + (Un)select%12s-s Select range/clear\n"
|
||||
"ca Select all%14A Invert sel\n"
|
||||
"9p ^P Copy here%12w ^W Cp/mv sel as\n"
|
||||
- "9v ^V Move here%15E Edit sel list\n"
|
||||
+ "9v ^V Move here%15l Edit sel list\n"
|
||||
"9x ^X Delete%18S Listed sel size\n"
|
||||
"aEsc Send to FIFO\n"
|
||||
"0\n"
|
||||
"1MISC\n"
|
||||
"8Alt ; Select plugin%11= Launch app\n"
|
||||
"9! ^] Shell%19] Cmd prompt\n"
|
||||
- "cc Connect remote%10u Unmount remote/archive\n"
|
||||
- "9t ^T Sort toggles%12s Manage session\n"
|
||||
+ "ch Connect remote%10u Unmount remote/archive\n"
|
||||
+ "9t ^T Sort toggles%12k Manage session\n"
|
||||
"cT Set time type%110 Lock\n"
|
||||
"b^L Redraw%18? Help, conf\n"
|
||||
};
|
||||
diff --git a/src/nnn.h b/src/nnn.h
|
||||
index 3e4ea19c..c81ef392 100644
|
||||
--- a/src/nnn.h
|
||||
+++ b/src/nnn.h
|
||||
@@ -131,18 +131,18 @@ struct key {
|
||||
static struct key bindings[] = {
|
||||
/* Back */
|
||||
{ KEY_LEFT, SEL_BACK },
|
||||
- { 'h', SEL_BACK },
|
||||
+ { 'm', SEL_BACK },
|
||||
/* Inside or select */
|
||||
{ KEY_ENTER, SEL_OPEN },
|
||||
{ '\r', SEL_OPEN },
|
||||
/* Pure navigate inside */
|
||||
{ KEY_RIGHT, SEL_NAV_IN },
|
||||
- { 'l', SEL_NAV_IN },
|
||||
+ { 'i', SEL_NAV_IN },
|
||||
/* Next */
|
||||
- { 'j', SEL_NEXT },
|
||||
+ { 'n', SEL_NEXT },
|
||||
{ KEY_DOWN, SEL_NEXT },
|
||||
/* Previous */
|
||||
- { 'k', SEL_PREV },
|
||||
+ { 'e', SEL_PREV },
|
||||
{ KEY_UP, SEL_PREV },
|
||||
/* Page down */
|
||||
{ KEY_NPAGE, SEL_PGDN },
|
||||
@@ -155,11 +155,11 @@ static struct key bindings[] = {
|
||||
/* First entry */
|
||||
{ KEY_HOME, SEL_HOME },
|
||||
{ 'g', SEL_HOME },
|
||||
- { CONTROL('A'), SEL_HOME },
|
||||
+ { CONTROL('E'), SEL_HOME },
|
||||
/* Last entry */
|
||||
{ KEY_END, SEL_END },
|
||||
{ 'G', SEL_END },
|
||||
- { CONTROL('E'), SEL_END },
|
||||
+ { CONTROL('N'), SEL_END },
|
||||
/* Go to first file */
|
||||
{ '\'', SEL_FIRST },
|
||||
/* Jump to an entry number/offset */
|
||||
@@ -176,7 +176,7 @@ static struct key bindings[] = {
|
||||
{ 'b', SEL_BMOPEN },
|
||||
{ CONTROL('_'), SEL_BMOPEN },
|
||||
/* Connect to server over SSHFS */
|
||||
- { 'c', SEL_REMOTE },
|
||||
+ { 'h', SEL_REMOTE },
|
||||
/* Cycle contexts in forward direction */
|
||||
{ '\t', SEL_CYCLE },
|
||||
/* Cycle contexts in reverse direction */
|
||||
@@ -199,14 +199,13 @@ static struct key bindings[] = {
|
||||
/* Filter */
|
||||
{ '/', SEL_FLTR },
|
||||
/* Toggle filter mode */
|
||||
- { CONTROL('N'), SEL_MFLTR },
|
||||
+ { CONTROL('F'), SEL_MFLTR },
|
||||
/* Toggle hide .dot files */
|
||||
{ '.', SEL_HIDDEN },
|
||||
/* Detailed listing */
|
||||
{ 'd', SEL_DETAIL },
|
||||
/* File details */
|
||||
{ 'f', SEL_STATS },
|
||||
- { CONTROL('F'), SEL_STATS },
|
||||
/* Toggle executable status */
|
||||
{ '*', SEL_CHMODX },
|
||||
/* Create archive */
|
||||
@@ -220,13 +219,13 @@ static struct key bindings[] = {
|
||||
{ ' ', SEL_SEL },
|
||||
{ '+', SEL_SEL },
|
||||
/* Toggle select multiple files */
|
||||
- { 'm', SEL_SELMUL },
|
||||
+ { 's', SEL_SELMUL },
|
||||
/* Select all files in current dir */
|
||||
{ 'a', SEL_SELALL },
|
||||
/* Invert selection in current dir */
|
||||
{ 'A', SEL_SELINV },
|
||||
/* List, edit selection */
|
||||
- { 'E', SEL_SELEDIT },
|
||||
+ { 'l', SEL_SELEDIT },
|
||||
/* Copy from selection buffer */
|
||||
{ 'p', SEL_CP },
|
||||
{ CONTROL('P'), SEL_CP },
|
||||
@@ -243,7 +242,7 @@ static struct key bindings[] = {
|
||||
{ 'o', SEL_OPENWITH },
|
||||
{ CONTROL('O'), SEL_OPENWITH },
|
||||
/* Create a new file */
|
||||
- { 'n', SEL_NEW },
|
||||
+ { 'c', SEL_NEW },
|
||||
/* Show rename prompt */
|
||||
{ CONTROL('R'), SEL_RENAME },
|
||||
/* Rename contents of current dir */
|
||||
@@ -255,7 +254,7 @@ static struct key bindings[] = {
|
||||
/* Toggle auto-advance on file open */
|
||||
{ CONTROL('J'), SEL_AUTONEXT },
|
||||
/* Edit in EDITOR */
|
||||
- { 'e', SEL_EDIT },
|
||||
+ { 'y', SEL_EDIT },
|
||||
/* Run a plugin */
|
||||
{ ';', SEL_PLUGIN },
|
||||
/* Show total size of listed selection */
|
||||
@@ -270,7 +269,7 @@ static struct key bindings[] = {
|
||||
/* Lock screen */
|
||||
{ '0', SEL_LOCK },
|
||||
/* Manage sessions */
|
||||
- { 's', SEL_SESSIONS },
|
||||
+ { 'k', SEL_SESSIONS },
|
||||
/* Export list */
|
||||
{ '>', SEL_EXPORT },
|
||||
/* Set time type */
|
Loading…
Reference in New Issue
Block a user