[ref] clear_pane()
[sfm.git] / config.def.h
blob2a9c41765be38746e89d73c7809bc36ee2521622
1 /* See LICENSE file for copyright and license details.*/
3 #ifndef CONFIG_H
4 #define CONFIG_H
6 #include "termbox.h"
8 /* colors fg, bg */
9 static const Cpair cdir = { 33, TB_DEFAULT };
10 static const Cpair cerr = { 124, TB_DEFAULT };
11 static const Cpair cexec = { 2, TB_DEFAULT };
12 static const Cpair cfile = { TB_DEFAULT, TB_DEFAULT };
13 static const Cpair cframe = { TB_DEFAULT, TB_DEFAULT };
14 static const Cpair cother = { 3, TB_DEFAULT };
15 static const Cpair cpanell = { 166, TB_DEFAULT };
16 static const Cpair cpanelr = { 5, TB_DEFAULT };
17 static const Cpair cprompt = { 33, TB_DEFAULT };
18 static const Cpair csearch = { 255, TB_DEFAULT };
19 static const Cpair cstatus = { TB_DEFAULT, TB_DEFAULT };
21 /* bookmarks */
22 static Bookmark bmarks[] = {
23 {'\\', "/root"},
26 /* software */
27 static const char *mpv[] = { "mpv", "--fullscreen", NULL };
28 static const char *sxiv[] = { "sxiv", NULL };
29 static const char *surf[] = { "surf", NULL };
30 static const char *mupdf[] = { "mupdf", "-I", NULL };
31 static const char *libreoffice[] = { "libreoffice", NULL };
32 static const char *gimp[] = { "gimp", NULL };
33 static const char *r2[] = { "r2", "-c", "vv", NULL };
34 static const char *binary[] = { "r2", "-d", "-c", "vv", NULL };
36 /* extension */
37 static const char *images[] = { "bmp", "jpg", "jpeg", "png", "gif", "xpm" };
38 static const char *web[] = { "htm", "html" };
39 static const char *pdf[] = { "epub", "pdf" };
40 static const char *arts[] = { "xcf" };
41 static const char *obj[] = { "o", "a", "so" };
42 static const char *videos[] = { "avi", "flv", "wav", "webm", "wma", "wmv",
43 "m2v", "m4a", "m4v", "mkv", "mov", "mp3",
44 "mp4", "mpeg", "mpg" };
45 static const char *documents[] = { "odt", "doc", "docx", "xls", "xlsx", "odp",
46 "ods", "pptx", "odg" };
48 static Rule rules[] = {
49 {videos, LEN(videos), mpv},
50 {images, LEN(images), sxiv},
51 {web, LEN(web), surf},
52 {pdf, LEN(pdf), mupdf},
53 {documents, LEN(documents), libreoffice},
54 {arts, LEN(arts), gimp},
55 {obj, LEN(obj), r2},
58 static Key keys[] = {
59 { {.ch = 'j'}, mvdwn },
60 { {.ch = 'k'}, mvup },
61 { {.ch = 'l'}, mvfor },
62 { {.ch = 'h'}, mvbk },
63 { {.ch = 'g'}, mvtop },
64 { {.ch = 'G'}, mvbtm },
65 { {.ch = 'M'}, mvmid },
66 { {.key = TB_KEY_CTRL_U}, scrup },
67 { {.key = TB_KEY_CTRL_D}, scrdwn },
68 { {.ch = 'n'}, crnf },
69 { {.ch = 'N'}, crnd },
70 { {.ch = 'D'}, delfd },
71 { {.ch = 'x'}, calcdir },
72 { {.ch = '/'}, filter },
73 { {.ch = 'q'}, quit },
74 { {.key = TB_KEY_SPACE}, switch_pane },
77 static const mode_t ndir_perm = S_IRWXU | S_IRWXG |S_IROTH | S_IXOTH;
78 static const mode_t nf_perm = S_IRUSR | S_IWUSR;
80 /* scroll */
81 static const int scrmv = 10; /* ctrl+u, ctrl+d movement */
82 static const int scrsp = 3; /* space before scroll */
84 /* statusbar */
85 static const int show_ug = 1;
86 static const int show_perm = 1;
87 static const int show_dt = 1;
88 static const int show_size = 1;
89 static const char dtfmt[] = "%F %R"; /* date time format */
91 /* unicode chars */
92 #define u_hl 0x2500 /* ─ */
93 #define u_vl 0x2502 /* │ */
94 #define u_cnw 0x250C /* ┌ */
95 #define u_cne 0x2510 /* ┐ */
96 #define u_csw 0x2514 /* └ */
97 #define u_cse 0x2518 /* ┘ */
98 #define u_mn 0x252C /* ┬ */
99 #define u_ms 0x2534 /* ┴ */
101 #endif /* CONFIG_H */