From 8d1e5f8172b9d2bcbd4ef0c33ea7a9f78cf70e9a Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 10 Apr 2020 00:12:57 -0700 Subject: General code cleanup and removed some unnecessary imports. --- bb.h | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'bb.h') diff --git a/bb.h b/bb.h index 23682b8..946f323 100644 --- a/bb.h +++ b/bb.h @@ -5,7 +5,6 @@ * * This file contains definitions and customization for `bb`. */ -#include #include #include #include @@ -13,14 +12,11 @@ #include #include #include -#include #include #include #include -#include #include #include -#include #include #include "bterm.h" @@ -32,11 +28,29 @@ #define PATH_MAX 4096 #endif -#define BB_TIME_FMT " %T %D " #define MAX_COLS 12 #define MAX_SORT (2*MAX_COLS) #define HASH_SIZE 1024 #define HASH_MASK (HASH_SIZE - 1) +#define MAX_BINDINGS 1024 + +// Configurable options: +#define BB_TIME_FMT " %T %D " +#define SCROLLOFF MIN(5, (winsize.ws_row-4)/2) +#define SORT_INDICATOR "↓" +#define RSORT_INDICATOR "↑" +#define SELECTED_INDICATOR " \033[31;7m \033[0m" +#define NOT_SELECTED_INDICATOR " " +// Colors (using ANSI escape sequences): +#define TITLE_COLOR "\033[37;1m" +#define NORMAL_COLOR "\033[37m" +#define CURSOR_COLOR "\033[43;30;1m" +#define LINK_COLOR "\033[35m" +#define DIR_COLOR "\033[34m" +#define EXECUTABLE_COLOR "\033[31m" +#define SCROLLBAR_FG "\033[48;5;247m " +#define SCROLLBAR_BG "\033[48;5;239m " + #define MAX(a,b) ((a) < (b) ? (b) : (a)) #define MIN(a,b) ((a) > (b) ? (b) : (a)) #define IS_SELECTED(p) (((p)->selected.atme) != NULL) @@ -156,24 +170,6 @@ typedef struct proc_s { } running; } proc_t; -// Configurable options: -#define SCROLLOFF MIN(5, (winsize.ws_row-4)/2) -#define SORT_INDICATOR "↓" -#define RSORT_INDICATOR "↑" -#define SELECTED_INDICATOR " \033[31;7m \033[0m" -#define NOT_SELECTED_INDICATOR " " -// Colors (using ANSI escape sequences): -#define TITLE_COLOR "\033[37;1m" -#define NORMAL_COLOR "\033[37m" -#define CURSOR_COLOR "\033[43;30;1m" -#define LINK_COLOR "\033[35m" -#define DIR_COLOR "\033[34m" -#define EXECUTABLE_COLOR "\033[31m" -#define SCROLLBAR_FG "\033[48;5;247m " -#define SCROLLBAR_BG "\033[48;5;239m " - -#define MAX_BINDINGS 1024 - static binding_t bindings[MAX_BINDINGS]; #include "columns.h" -- cgit v1.2.3