Package Details: noice-git 0.8.r3.g16f473f-1

Git Clone URL: https://aur.archlinux.org/noice-git.git (read-only, click to copy)
Package Base: noice-git
Description: Small terminal file browser written in C
Upstream URL: http://git.2f30.org/noice/
Keywords: browser cli file
Licenses: BSD
Submitter: jfrankenau
Maintainer: milkii
Last Packager: milkii
Votes: 8
Popularity: 0.000000
First Submitted: 2015-08-23 10:27 (UTC)
Last Updated: 2019-03-31 15:02 (UTC)

Dependencies (2)

Required by (0)

Sources (2)

Latest Comments

milkii commented on 2019-03-27 07:41 (UTC)

fixed the build

sekret commented on 2019-03-09 10:15 (UTC)

Please add git to makedepends

milkii commented on 2019-02-07 13:23 (UTC)

this config works. note top changed to htop and dirs on top on.

/* See LICENSE file for copyright and license details. */
#define CWD   "cwd: "
#define CURSR " > "
#define EMPTY "   "
int dirorder    = 1; /* Set to 1 to sort by directory first */
int mtimeorder  = 0; /* Set to 1 to sort by time modified */
int icaseorder  = 0; /* Set to 1 to sort by ignoring case */
int idletimeout = 0; /* Screensaver timeout in seconds, 0 to disable */
int showhidden  = 0; /* Set to 1 to show hidden files by default */
int usecolor    = 1; /* Set to 1 to enable color attributes */
char *idlecmd   = "rain"; /* The screensaver program */

/* See curs_attr(3) for valid video attributes */
#define CURSR_ATTR A_NORMAL
#define DIR_ATTR   A_NORMAL | COLOR_PAIR(4)
#define LINK_ATTR  A_NORMAL | COLOR_PAIR(6)
#define SOCK_ATTR  A_NORMAL | COLOR_PAIR(1)
#define FIFO_ATTR  A_NORMAL | COLOR_PAIR(5)
#define EXEC_ATTR  A_NORMAL | COLOR_PAIR(2)

/* Colors to use with COLOR_PAIR(n) as attributes */
struct cpair pairs[] = {
    { .fg = 0, .bg = 0 },
    /* pairs start at 1 */
    { COLOR_RED,     -1 },
    { COLOR_GREEN,   -1 },
    { COLOR_YELLOW,  -1 },
    { COLOR_BLUE,    -1 },
    { COLOR_MAGENTA, -1 },
    { COLOR_CYAN,    -1 },
};

struct assoc assocs[] = {
    { "\\.(avi|mp4|mkv|mp3|ogg|flac|mov)$", "mpv" },
    { "\\.(png|jpg|gif)$", "sxiv" },
    { "\\.(html|svg)$", "firefox" },
    { "\\.pdf$", "mupdf" },
    { "\\.sh$", "sh" },
    { ".", "less" },
};

struct key bindings[] = {
    /* Quit */
    { 'q',            SEL_QUIT },
    /* Back */
    { KEY_BACKSPACE,  SEL_BACK },
    { KEY_LEFT,       SEL_BACK },
    { 'h',            SEL_BACK },
    { CONTROL('H'),   SEL_BACK },
    /* Inside */
    { KEY_ENTER,      SEL_GOIN },
    { '\r',           SEL_GOIN },
    { KEY_RIGHT,      SEL_GOIN },
    { 'l',            SEL_GOIN },
    /* Filter */
    { '/',            SEL_FLTR },
    { '&',            SEL_FLTR },
    /* Next */
    { 'j',            SEL_NEXT },
    { KEY_DOWN,       SEL_NEXT },
    { CONTROL('N'),   SEL_NEXT },
    /* Previous */
    { 'k',            SEL_PREV },
    { KEY_UP,         SEL_PREV },
    { CONTROL('P'),   SEL_PREV },
    /* Page down */
    { KEY_NPAGE,      SEL_PGDN },
    { CONTROL('D'),   SEL_PGDN },
    /* Page up */
    { KEY_PPAGE,      SEL_PGUP },
    { CONTROL('U'),   SEL_PGUP },
    /* Home */
    { KEY_HOME,       SEL_HOME },
  { CONTROL('A'),   SEL_HOME },
    { META('<'),      SEL_HOME },
    { '^',            SEL_HOME },
    /* End */
    { KEY_END,        SEL_END },
    { CONTROL('E'),   SEL_END },
    { META('>'),      SEL_END },
    { '$',            SEL_END },
    /* Change dir */
    { 'c',            SEL_CD },
    { '~',            SEL_CDHOME },
    /* Toggle hide .dot files */
    { '.',            SEL_TOGGLEDOT },
  /* Toggle sort by directory first */
  { 'd',            SEL_DSORT },
    /* Toggle sort by time */
    { 't',            SEL_MTIME },
    { CONTROL('L'),   SEL_REDRAW },
  /* Toggle case sensitivity */
  { 'i',            SEL_ICASE },
    /* Run command */
    { 'z',            SEL_RUN, "htop" },
    { '!',            SEL_RUN, "sh", "SHELL" },
    /* Run command with argument */
    { 'e',            SEL_RUNARG, "vi", "EDITOR" },
    { 'p',            SEL_RUNARG, "less", "PAGER" },
};

milkii commented on 2019-02-05 23:48 (UTC)

actually, upstream compiles

milkii commented on 2019-02-02 00:30 (UTC)

build is currently failing

==> Starting build()...
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2  -c -o noice.o noice.c
noice.c: In function ‘entrycmp’:
noice.c:287:6: error: ‘dirorder’ undeclared (first use in this function); did you mean ‘wborder’?
  if (dirorder) {
      ^~~~~~~~
      wborder
noice.c:287:6: note: each undeclared identifier is reported only once for each function it appears in
noice.c:294:6: error: ‘icaseorder’ undeclared (first use in this function); did you mean ‘mtimeorder’?
  if (icaseorder)
      ^~~~~~~~~~
      mtimeorder
noice.c: In function ‘initcolor’:
noice.c:306:22: error: ‘pairs’ undeclared (first use in this function); did you mean ‘cpair’?
  for (i = 1; i < LEN(pairs); i++)
                      ^~~~~
noice.c:36:24: note: in definition of macro ‘LEN’
 #define LEN(x) (sizeof(x) / sizeof(*(x)))
                        ^
noice.c: In function ‘printent’:
noice.c:476:11: error: ‘DIR_ATTR’ undeclared (first use in this function)
   attr |= DIR_ATTR;
           ^~~~~~~~
noice.c:479:11: error: ‘LINK_ATTR’ undeclared (first use in this function)
   attr |= LINK_ATTR;
           ^~~~~~~~~
noice.c:482:11: error: ‘SOCK_ATTR’ undeclared (first use in this function)
   attr |= SOCK_ATTR;
           ^~~~~~~~~
noice.c:485:11: error: ‘FIFO_ATTR’ undeclared (first use in this function)
   attr |= FIFO_ATTR;
           ^~~~~~~~~
noice.c:488:11: error: ‘EXEC_ATTR’ undeclared (first use in this function)
   attr |= EXEC_ATTR;
           ^~~~~~~~~
noice.c:492:11: error: ‘CURSR_ATTR’ undeclared (first use in this function); did you mean ‘CURSR’?
   attr |= CURSR_ATTR;
           ^~~~~~~~~~
           CURSR
noice.c: In function ‘browse’:
noice.c:824:4: error: ‘dirorder’ undeclared (first use in this function); did you mean ‘wborder’?
    dirorder = !dirorder;
    ^~~~~~~~
    wborder
noice.c:830:4: error: ‘icaseorder’ undeclared (first use in this function); did you mean ‘mtimeorder’?
    icaseorder = !icaseorder;
    ^~~~~~~~~~
    mtimeorder
/usr/include/bits/stdio2.h: In function ‘dprintf’:
noice.c:128:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   write(fd, buf, r);
   ^~~~~~~~~~~~~~~~~
noice.c: In function ‘spawn’:
noice.c:189:4: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
    chdir(dir);
    ^~~~~~~~~~
noice.c: In function ‘redraw’:
noice.c:630:2: warning: ignoring return value of ‘realpath’, declared with attribute warn_unused_result [-Wunused-result]
  realpath(cwd, cwdresolved);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [<builtin>: noice.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
Error making: noice-git

though the PKGBUILD doesn't really do anything so seems like it's upstream?

jfrankenau commented on 2016-09-25 14:44 (UTC)

@vide, thank you. I've updated the configuration file.

vide commented on 2016-09-20 06:45 (UTC) (edited on 2016-09-21 15:45 (UTC) by vide)

I think in the config.h the declaration `int showhidden = 0;...` is missing. Otherwise I get: noice.c:742:4: error: ‘showhidden’ undeclared ...

jfrankenau commented on 2015-11-14 13:47 (UTC)

@niskii, thank you. I've pushed a new version.

<deleted-account> commented on 2015-11-14 10:44 (UTC)

If you want to use separate config.h file please update its contents. There are two additional lines that need to be copied from config.def.h (defining idletimeout and idlecmd).