patch-config.h - pkgsrc-localpatches - leot's pkgsrc LOCALPATCHES
(HTM) hg clone https://bitbucket.org/iamleot/pkgsrc-localpatches
(DIR) Log
(DIR) Files
(DIR) Refs
---
patch-config.h
---
1 --- /dev/null 2019-01-30 12:37:45.330275625 +0100
2 +++ config.h 2019-01-30 12:37:25.854965000 +0100
3 @@ -0,0 +1,106 @@
4 +/* See LICENSE file for copyright and license details. */
5 +#define CWD "cwd: "
6 +#define CURSR " > "
7 +#define EMPTY " "
8 +
9 +int dirorder = 0; /* Set to 1 to sort by directory first */
10 +int mtimeorder = 0; /* Set to 1 to sort by time modified */
11 +int icaseorder = 0; /* Set to 1 to sort by ignoring case */
12 +int idletimeout = 0; /* Screensaver timeout in seconds, 0 to disable */
13 +int showhidden = 0; /* Set to 1 to show hidden files by default */
14 +int usecolor = 0; /* Set to 1 to enable color attributes */
15 +char *idlecmd = "rain"; /* The screensaver program */
16 +/* See curs_attr(3) for valid video attributes */
17 +
18 +#define CURSR_ATTR A_NORMAL
19 +#define DIR_ATTR A_BOLD
20 +#define LINK_ATTR A_BOLD
21 +#define SOCK_ATTR A_BOLD
22 +#define FIFO_ATTR A_BOLD
23 +/* Colors to use with COLOR_PAIR(n) as attributes */
24 +#define EXEC_ATTR A_BOLD
25 +
26 +struct cpair pairs[] = {
27 + { .fg = 0, .bg = 0 },
28 + /* pairs start at 1 */
29 + { COLOR_RED, -1 },
30 + { COLOR_GREEN, -1 },
31 + { COLOR_YELLOW, -1 },
32 + { COLOR_BLUE, -1 },
33 + { COLOR_MAGENTA, -1 },
34 + { COLOR_CYAN, -1 },
35 +};
36 +
37 +struct assoc assocs[] = {
38 + { "\\.(avi|mp4|mkv|mp3|ogg|flac|mov|m4a)$", "mpv" },
39 + { "\\.(bmp|gif|jpg|jpeg|png|pnm|tiff)$", "sxiv" },
40 + { "\\.(htm|html)$", "w3m" },
41 + { "\\.(svg)$", "open" },
42 + { "\\.pdf$", "mupdf" },
43 + { "\\.epub$", "mupdf" },
44 + { "\\.sh$", "less" },
45 + { ".", "less" },
46 +};
47 +
48 +struct key bindings[] = {
49 + /* Quit */
50 + { 'q', SEL_QUIT },
51 + { CONTROL('D'), SEL_QUIT },
52 + /* Back */
53 + { KEY_BACKSPACE, SEL_BACK },
54 + { KEY_LEFT, SEL_BACK },
55 + { 'h', SEL_BACK },
56 + { CONTROL('H'), SEL_BACK },
57 + /* Inside */
58 + { KEY_ENTER, SEL_GOIN },
59 + { '\r', SEL_GOIN },
60 + { KEY_RIGHT, SEL_GOIN },
61 + { 'l', SEL_GOIN },
62 + /* Filter */
63 + { '/', SEL_FLTR },
64 + { '&', SEL_FLTR },
65 + { '?', SEL_FLTR },
66 + /* Next */
67 + { 'j', SEL_NEXT },
68 + { KEY_DOWN, SEL_NEXT },
69 + { CONTROL('N'), SEL_NEXT },
70 + /* Previous */
71 + { 'k', SEL_PREV },
72 + { KEY_UP, SEL_PREV },
73 + { CONTROL('P'), SEL_PREV },
74 + /* Page down */
75 + { KEY_NPAGE, SEL_PGDN },
76 + { ' ', SEL_PGDN },
77 + /* Page up */
78 + { KEY_PPAGE, SEL_PGUP },
79 + { CONTROL('U'), SEL_PGUP },
80 + /* Home */
81 + { KEY_HOME, SEL_HOME },
82 + { CONTROL('A'), SEL_HOME },
83 + { '^', SEL_HOME },
84 + { 'g', SEL_HOME },
85 + /* End */
86 + { KEY_END, SEL_END },
87 + { CONTROL('E'), SEL_END },
88 + { '$', SEL_END },
89 + { 'G', SEL_END },
90 + /* Change dir */
91 + { 'c', SEL_CD },
92 + { '~', SEL_CDHOME },
93 + /* Toggle hide .dot files */
94 + { '.', SEL_TOGGLEDOT },
95 + /* Toggle sort by directory first */
96 + { 'd', SEL_DSORT },
97 + /* Toggle sort by time */
98 + { 't', SEL_MTIME },
99 + /* Toggle case sensitivity */
100 + { 'i', SEL_ICASE },
101 + { CONTROL('L'), SEL_REDRAW },
102 + /* Run command */
103 + { 'z', SEL_RUN, "top" },
104 + { '!', SEL_RUN, "sh", "SHELL" },
105 + /* Run command with argument */
106 + { 'e', SEL_RUNARG, "vi", "EDITOR" },
107 + { 'o', SEL_RUNARG, "plumb" },
108 + { 'p', SEL_RUNARG, "less", "PAGER" },
109 +};