Package Details: noice-git 0.6.r2.g2f11fc5-1

Git Clone URL: https://aur.archlinux.org/noice-git.git (read-only)
Package Base: noice-git
Description: Small file browser
Upstream URL: http://git.2f30.org/noice/
Keywords: browser cli file
Licenses: BSD
Submitter: tsuflux
Maintainer: tsuflux
Last Packager: tsuflux
Votes: 8
Popularity: 0.434102
First Submitted: 2015-08-23 10:27
Last Updated: 2017-05-31 22:13

Dependencies (1)

Required by (0)

Sources (2)

Latest Comments

milk commented on 2019-02-07 13:23

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" },
};

milk commented on 2019-02-05 23:48

actually, upstream compiles

milk commented on 2019-02-02 00:30

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?

tsuflux commented on 2016-09-25 14:44

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

vide commented on 2016-09-20 06:45

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

tsuflux commented on 2015-11-14 13:47

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

niskii commented on 2015-11-14 10:44

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).