summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alacritty.light.toml31
-rw-r--r--main.c18
2 files changed, 41 insertions, 8 deletions
diff --git a/alacritty.light.toml b/alacritty.light.toml
new file mode 100644
index 0000000..7622d20
--- /dev/null
+++ b/alacritty.light.toml
@@ -0,0 +1,31 @@
+[colors.primary]
+background = "#FFFFFF"
+foreground = "#1A1A1A"
+
+[colors.cursor]
+text = "#FFFFFF"
+cursor = "#1A1A1A"
+
+[colors.selection]
+text = "#1A1A1A"
+background = "#E5E5E5"
+
+[colors.normal]
+black = "#000000"
+red = "#CC0000"
+green = "#008800"
+yellow = "#AA8800"
+blue = "#0033CC"
+magenta = "#880088"
+cyan = "#008888"
+white = "#E6E6E6"
+
+[colors.bright]
+black = "#666666"
+red = "#FF3333"
+green = "#22AA22"
+yellow = "#E6B800"
+blue = "#3366FF"
+magenta = "#CC33CC"
+cyan = "#33CCCC"
+white = "#FFFFFF"
diff --git a/main.c b/main.c
index bc43164..bd1ea53 100644
--- a/main.c
+++ b/main.c
@@ -23,7 +23,8 @@
#define COLOR_TITLE (TB_YELLOW | TB_BOLD)
#define COLOR_SELECTED TB_BLUE
#define COLOR_DEFAULT TB_WHITE
-#define COLOR_DIM TB_DIM
+#define COLOR_BG TB_BLACK
+#define COLOR_DIM TB_WHITE
#define COLOR_SUCCESS TB_GREEN
#define COLOR_ERROR TB_RED
@@ -100,9 +101,9 @@ void update_cached_apps(State *state) {
}
void draw_titles() {
- tb_print(X_OFF_CATEGORIES, Y_OFF_TITLES, COLOR_TITLE, TB_DEFAULT, "CATEGORIES");
- tb_print(X_OFF_APPS, Y_OFF_TITLES, COLOR_TITLE, TB_DEFAULT, "APPLICATIONS");
- tb_print(X_OFF_FILE, Y_OFF_TITLES, COLOR_TITLE, TB_DEFAULT, "FILE");
+ tb_print(X_OFF_CATEGORIES, Y_OFF_TITLES, COLOR_TITLE, COLOR_BG, "CATEGORIES");
+ tb_print(X_OFF_APPS, Y_OFF_TITLES, COLOR_TITLE, COLOR_BG, "APPLICATIONS");
+ tb_print(X_OFF_FILE, Y_OFF_TITLES, COLOR_TITLE, COLOR_BG, "FILE");
}
void draw_categories(State *state) {
@@ -111,7 +112,7 @@ void draw_categories(State *state) {
for (int i = 0; i < height && (i + state->category_offset) < count; ++i) {
int idx = i + state->category_offset;
uint16_t fg = COLOR_DEFAULT;
- uint16_t bg = TB_DEFAULT;
+ uint16_t bg = COLOR_BG;
if (state->col == 0 && state->category_idx == idx) {
bg = COLOR_SELECTED;
} else if (state->category_idx == idx) {
@@ -131,7 +132,7 @@ void draw_apps_list(State *state) {
int idx = i + state->app_offset;
char *app_name = (char *)l->data;
uint16_t fg = COLOR_DEFAULT;
- uint16_t bg = TB_DEFAULT;
+ uint16_t bg = COLOR_BG;
if (state->col == 1 && state->app_idx == idx) {
bg = COLOR_SELECTED;
}
@@ -166,7 +167,7 @@ void draw_apps_list(State *state) {
int idx = i + state->app_offset;
GAppInfo *app = (GAppInfo *)l->data;
uint16_t fg = COLOR_DEFAULT;
- uint16_t bg = TB_DEFAULT;
+ uint16_t bg = COLOR_BG;
if (state->col == 1 && state->app_idx == idx) {
bg = COLOR_SELECTED;
}
@@ -204,7 +205,7 @@ void draw(State *state) {
if (strncmp(state->message, "Failed", 6) == 0) {
msg_col = COLOR_ERROR;
}
- tb_print(X_OFF_CATEGORIES, tb_height() - 1, msg_col, TB_DEFAULT, state->message);
+ tb_print(X_OFF_CATEGORIES, tb_height() - 1, msg_col, COLOR_BG, state->message);
}
tb_present();
@@ -214,6 +215,7 @@ int main() {
if (tb_init() != 0) {
return 1;
}
+ tb_set_clear_attrs(COLOR_DEFAULT, COLOR_BG);
State state = {0, 0, 0, 0, 0, {0}, NULL, 0, 0};
char *dev_env = getenv("XDGCTL_DEV");