aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-05-28 21:46:16 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-05-28 21:46:16 -0700
commit0a1258a747ca44ed5a4489385a0e9aee7de94504 (patch)
treedee95c6d604daa6c7a26260a60d9bc74a140f46e
parent8d4e4aeba4c297cc93b0500c3a84a25d2bb85ddd (diff)
Tweaked some defaults and allowed cursor color to be combined with
existing color.
-rw-r--r--bb.c7
-rw-r--r--config.def.h6
2 files changed, 8 insertions, 5 deletions
diff --git a/bb.c b/bb.c
index bd61491..76b7a3b 100644
--- a/bb.c
+++ b/bb.c
@@ -399,7 +399,9 @@ void render(bb_t *bb, int lazy)
fputs(IS_SELECTED(entry) ? SELECTED_INDICATOR : NOT_SELECTED_INDICATOR, tty_out);
- const char *color = (i == bb->cursor) ? CURSOR_COLOR : color_of(entry->info.st_mode);
+ char color[128];
+ strcpy(color, color_of(entry->info.st_mode));
+ if (i == bb->cursor) strcat(color, CURSOR_COLOR);
fputs(color, tty_out);
int x = 1;
@@ -464,7 +466,8 @@ void render(bb_t *bb, int lazy)
if (i != bb->cursor)
fputs("\033[37m", tty_out);
fputs("\033[2m -> \033[22;3m", tty_out);
- color = i == bb->cursor ? CURSOR_COLOR : color_of(entry->linkedmode);
+ strcpy(color, color_of(entry->linkedmode));
+ if (i == bb->cursor) strcat(color, CURSOR_COLOR);
fputs(color, tty_out);
if (entry->link_no_esc) fputs(entry->linkname, tty_out);
else entry->link_no_esc |= !fputs_escaped(tty_out, entry->linkname, color);
diff --git a/config.def.h b/config.def.h
index c9e7647..60b445e 100644
--- a/config.def.h
+++ b/config.def.h
@@ -73,12 +73,12 @@
#define SORT_INDICATOR "↓"
#define RSORT_INDICATOR "↑"
-#define SELECTED_INDICATOR "\033[33;1m★\033[0m"
-#define NOT_SELECTED_INDICATOR "\033[1m \033[0m"
+#define SELECTED_INDICATOR "\033[33;7m \033[0m"
+#define NOT_SELECTED_INDICATOR " "
#define TITLE_COLOR "\033[32;1m"
#define NORMAL_COLOR "\033[37m"
-#define CURSOR_COLOR "\033[1;30;43m"
+#define CURSOR_COLOR "\033[43;30;1m"
#define LINK_COLOR "\033[35m"
#define DIR_COLOR "\033[34m"
#define EXECUTABLE_COLOR "\033[31m"