Browse Source

Add command to toggle hide .dot files

Patch written by Richard Hyde and taken from
https://github.com/RichardHyde/noice
master
sin 9 years ago
parent
commit
e1c26079b1
3 changed files with 11 additions and 0 deletions
  1. +2
    -0
      config.def.h
  2. +2
    -0
      noice.1
  3. +7
    -0
      noice.c

+ 2
- 0
config.def.h View File

@@ -56,6 +56,8 @@ struct key bindings[] = {
{ '$', SEL_END },
/* Change dir */
{ 'c', SEL_CD },
/* Toggle hide .dot files */
{ '.', SEL_TOGGLEDOT },
/* Toggle sort by time */
{ 't', SEL_MTIME },
{ CONTROL('L'), SEL_REDRAW },


+ 2
- 0
noice.1 View File

@@ -49,6 +49,8 @@ Back up one directory level.
Change filter (see below for more information).
.It Ic c
Change into the given directory.
.It Ic \&.
Toggle hide .dot files.
.It Ic t
Toggle sort by time modified.
.It Ic C-l


+ 7
- 0
noice.c View File

@@ -57,6 +57,7 @@ enum action {
SEL_HOME,
SEL_END,
SEL_CD,
SEL_TOGGLEDOT,
SEL_MTIME,
SEL_REDRAW,
SEL_RUN,
@@ -706,6 +707,12 @@ nochange:
strlcpy(fltr, ifilter, sizeof(fltr))
DPRINTF_S(path);
goto begin;
case SEL_TOGGLEDOT:
if (strcmp(fltr, ifilter) != 0)
strlcpy(fltr, ifilter, sizeof(fltr));
else
strlcpy(fltr, ".", sizeof(fltr));
goto begin;
case SEL_MTIME:
mtimeorder = !mtimeorder;
/* Save current */


Loading…
Cancel
Save