1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
//
// DFM - Dylan's File Manager - Configuration file.
//
#ifndef DFM_CONFIG_H
#define DFM_CONFIG_H
//
// Name of the program.
//
#define CFG_NAME "$CFG_NAME"
//
// Default DFM_OPENER to use when unset in environment.
//
#define DFM_OPENER "xdg-open"
//
// Default DFM_COPYER to use when unset in environment.
//
#define DFM_COPYER "waycopy"
//
// Default DFM_BOOKMARK_[0-9] values when unset in environment.
//
#define DFM_BOOKMARK_0 ""
#define DFM_BOOKMARK_1 ""
#define DFM_BOOKMARK_2 ""
#define DFM_BOOKMARK_3 ""
#define DFM_BOOKMARK_4 ""
#define DFM_BOOKMARK_5 ""
#define DFM_BOOKMARK_6 ""
#define DFM_BOOKMARK_7 ""
#define DFM_BOOKMARK_8 ""
#define DFM_BOOKMARK_9 ""
//
// Default trash utility.
// Can be set at runtime via environment: \$DFM_TRASH
//
#define DFM_TRASH "\$DFM_TRASH"
//
// Default trash directory.
// Can be set at runtime via environment: \$DFM_TRASH_DIR
//
#define DFM_TRASH_DIR ""
//
// Default sort mode.
// See: fm_sort_fn()
//
#define DFM_DEFAULT_SORT 'n'
//
// Default view mode.
// See: fm_draw_ent()
//
#define DFM_DEFAULT_VIEW 'n'
//
// Show hidden files by default.
//
#define DFM_SHOW_HIDDEN 0
//
// Clear screen on exit.
// Useful when XTerm alt screen is unavailable.
//
// #define DFM_CLEAR_EXIT
//
// Truncation string.
// Shown when names are too long for the window: blablabla...bla.jpg
// NOTE: Width must be set to the display width of the string.
//
#define DFM_TRUNC_STR "..."
#define DFM_TRUNC_WIDTH 3
//
// Truncation length.
// Where to cut the truncated string in two and draw DFM_TRUNC_STR.
//
#define DFM_TRUNC_LEN 7
//
// Disable colors.
// Uncomment to disable all colors.
//
// #define DFM_NO_COLOR
//
// Default colors.
// Value becomes: '\033[A;B;Cm'.
//
#ifndef DFM_NO_COLOR
#define DFM_COL_CURSOR VT_SGR(7,1)
#define DFM_COL_DIR VT_SGR(32,1)
#define DFM_COL_FIFO VT_SGR(33)
#define DFM_COL_LNK VT_SGR(36)
#define DFM_COL_LNK_BRK VT_SGR(31,7)
#define DFM_COL_LNK_DIR VT_SGR(34,1)
#define DFM_COL_MARK VT_SGR(31)
#define DFM_COL_REG VT_SGR(37)
#define DFM_COL_REG_EXEC VT_SGR(36)
#define DFM_COL_SOCK VT_SGR(35)
#define DFM_COL_SPEC VT_SGR(33,1)
#define DFM_COL_UNKNOWN VT_SGR(31,7)
#define DFM_COL_NAV VT_SGR(7)
#define DFM_COL_NAV_ERR VT_SGR(7,31)
#define DFM_COL_NAV_MSG VT_SGR(7,32)
#define DFM_COL_NAV_CMD VT_SGR(7,36)
#define DFM_COL_NAV_ROOT VT_SGR(7,33)
#define DFM_COL_NAV_CURSOR VT_SGR(7,0)
#define DFM_COL_NAV_MARK VT_SGR(7,35,1)
#else
#define DFM_COL_CURSOR VT_SGR(7,1)
#define DFM_COL_DIR ""
#define DFM_COL_FIFO ""
#define DFM_COL_LNK ""
#define DFM_COL_LNK_BRK VT_SGR(7)
#define DFM_COL_LNK_DIR VT_SGR(1)
#define DFM_COL_MARK ""
#define DFM_COL_REG ""
#define DFM_COL_REG_EXEC ""
#define DFM_COL_SOCK ""
#define DFM_COL_SPEC VT_SGR(1)
#define DFM_COL_UNKNOWN ""
#define DFM_COL_NAV VT_SGR(7)
#define DFM_COL_NAV_ERR VT_SGR(7)
#define DFM_COL_NAV_MSG VT_SGR(7)
#define DFM_COL_NAV_CMD VT_SGR(7)
#define DFM_COL_NAV_ROOT VT_SGR(7)
#define DFM_COL_NAV_CURSOR VT_SGR(7)
#define DFM_COL_NAV_MARK VT_SGR(7,1)
#endif
//
// Maximum buffer sizes.
//
#define DFM_IO_MAX (1 << 13)
#define DFM_NAME_MAX (1 << 8)
#define DFM_PATH_MAX (1 << 12)
#define DFM_ENT_MAX (1 << 20)
#define DFM_DIR_MAX (1 << 15)
//
// Size of hash table for directory entries (load factor ~0.66).
// NOTE: Must be a power of 2.
//
#define DFM_DIR_HT_CAP (DFM_DIR_MAX << 1)
//
// Line editing buffer size.
//
#define RL_MAX (1 << 13)
//
// Room to reserve before and after marks for commands.
//
#define DFM_MARK_CMD_PRE 32
#define DFM_MARK_CMD_POST 16
//
// What shell options to enable when spawning a shell via '!' or 'act_cmd_sh'.
//
#define DFM_SHELL_OPTS "-euc"
//
// Make information about the build available.
//
#define CC_DATE "${CFG_DATE:-$(date '+%Y-%m-%d %H:%M')}"
#define CC_BRANCH "$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo n/a)"
#define CC_COMMIT "$(git rev-parse HEAD 2>/dev/null || echo n/a)"
#define CFG_VERSION "$CFG_VERSION"
//
// Space to leave for statusline.
//
#define DFM_MARGIN 3
//
// OS specific flags.
//
#if defined(__linux__)
#define _GNU_SOURCE
#define _BSD_SOURCE
#define _POSIX_C_SOURCE 200809L
#elif defined(__APPLE__)
#define _DARWIN_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#endif
//
// Configuration overrides from ./configure.
//
#include "$CFG_MACRO_GEN"
#endif // DFM_CONFIG_H
|