aboutsummaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-05-31 17:59:58 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-05-31 17:59:58 -0700
commit0fa6e3a636876c4d016d7eeee5c4d38d6dcf1a67 (patch)
treef74a74e00d1a8643d696b2c6fc28873ece400e43 /config.def.h
parent05601c886baf39740b8a487ac9e78f656f12acd3 (diff)
Compacting the code, putting column names with widths
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/config.def.h b/config.def.h
index 6a26999..8c5fbe0 100644
--- a/config.def.h
+++ b/config.def.h
@@ -89,9 +89,14 @@ typedef struct {
int flags;
} binding_t;
+typedef struct {
+ int width;
+ const char *name;
+} column_t;
+
// These commands will run at startup (before command-line arguments)
extern const char *startupcmds[];
-extern const int colwidths[128];
+extern const column_t columns[128];
const char *startupcmds[] = {
//////////////////////////////////////////////
@@ -106,15 +111,15 @@ const char *startupcmds[] = {
};
// Column widths:
-const int colwidths[128] = {
- ['*'] = 2,
- ['s'] = 9,
- ['m'] = 21,
- ['a'] = 21,
- ['c'] = 21,
- ['p'] = 5,
- ['n'] = 40,
- ['r'] = 2,
+const column_t columns[128] = {
+ ['*'] = {2, "*"},
+ ['a'] = {21, " Accessed"},
+ ['c'] = {21, " Created"},
+ ['m'] = {21, " Modified"},
+ ['n'] = {40, "Name"},
+ ['p'] = {5, "Permissions"},
+ ['r'] = {2, "Random"},
+ ['s'] = {9, "Size"},
};
#ifdef __APPLE__