// // 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 "xsel -ib" // // 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 privilege escalation utiliy. // This is used to become root in dfm (default 'Z'). // Values: "sudo", "doas", "ssu", "su", "run0", etc // #define DFM_SU "sudo" // // Default image viewer. // The command is executed as follows: // 'arg0' 'arg1' '{col}x{row}' 'img' // #define DFM_IMG_MODE "chafa" // "kitty" #define DFM_IMG_KITTY_CMD "kitten", "icat", "--loop", "1", "--align", "left", "--place" #define DFM_IMG_CHAFA_CMD "chafa", "--format=sixel", "--animate=off", "-s" // // 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 'a' // // 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,34) #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. // 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 || :)" #define CC_COMMIT "$(git rev-parse HEAD 2>/dev/null || :)" #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