From 9c2a7d001dc4cf205b79aeb2d1196e26977111fc Mon Sep 17 00:00:00 2001 From: 0scar Date: Mon, 20 Jan 2025 20:39:48 +0100 Subject: tmp --- config.def.h | 26 ++++++++++++++++++++------ dwl.c | 26 +++++++++++++------------- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/config.def.h b/config.def.h index f5b274b..adb2dfe 100644 --- a/config.def.h +++ b/config.def.h @@ -20,11 +20,25 @@ static const float rootcolor[] = COLOR(0x000000ff); /* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You can also use glsl colors */ +static const uint32_t col_primary = 0xae81ffff; /* selection bg */ + +static const uint32_t col_border = 0x444444ff; + +static const uint32_t col_fg = 0xbbbbbbff; +static const uint32_t col_fg_sel = 0xeeeeeeff; + +static const uint32_t col_bg = 0x080808ff; +static const uint32_t col_bg_sel = 0x323437ff; + +static const uint32_t col_sel = 0x323437ff; +static const uint32_t col_red = 0x770000ff; + static uint32_t colors[][3] = { - /* fg bg border */ - [SchemeNorm] = { 0xbbbbbbff, 0x222222ff, 0x444444ff }, - [SchemeSel] = { 0xeeeeeeff, 0x005577ff, 0xae81ffff }, - [SchemeUrg] = { 0, 0, 0x770000ff }, + /* fg bg border */ + [SchemeNorm] = { col_fg, col_bg, col_border }, + [SchemeSel] = { col_fg_sel, col_bg_sel, col_primary }, + [SchemeTagSel] = { col_bg, col_primary, col_border }, + [SchemeUrg] = { 0, 0, col_red }, }; static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; @@ -144,8 +158,8 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ -static const char *browsercmd[] = {"firefox-developer-edition"}; -static const char *browsercmd_p[] = {"firefox-developer-edition", "-P"}; +static const char *browsercmd[] = {"firefox-developer-edition", NULL}; +static const char *browsercmd_p[] = {"firefox-developer-edition", "-P", NULL}; static const char *menucmd[] = { "bemenu_run_history", "-p", "$", NULL }; static const char *termcmd[] = { TERMINAL, "-d", "none", NULL }; diff --git a/dwl.c b/dwl.c index 14d97e6..ca1d1e9 100644 --- a/dwl.c +++ b/dwl.c @@ -89,7 +89,7 @@ #define TEXTW(mon, text) (drwl_font_getwidth(mon->drw, text) + mon->lrpad) /* enums */ -enum { SchemeNorm, SchemeSel, SchemeUrg }; /* color schemes */ +enum { SchemeNorm, SchemeSel, SchemeTagSel, SchemeUrg }; /* color schemes */ enum { CurNormal, CurPressed, CurMove, CurResize }; /* cursor */ enum { XDGShell, LayerShell, X11 }; /* client types */ enum { LyrBg, LyrBottom, LyrTile, LyrFloat, LyrTop, LyrFS, LyrOverlay, LyrBlock, NUM_LAYERS }; /* scene layers */ @@ -1632,7 +1632,7 @@ dwl_ipc_manager_bind(struct wl_client *client, void *data, uint32_t version, uin } wl_resource_set_implementation(manager_resource, &dwl_manager_implementation, NULL, dwl_ipc_manager_destroy); - zdwl_ipc_manager_v2_send_tags(manager_resource, TAGCOUNT); + zdwl_ipc_manager_v2_send_tags(manager_resource, LENGTH(tags)); for (unsigned int i = 0; i < LENGTH(layouts); i++) zdwl_ipc_manager_v2_send_layout(manager_resource, layouts[i].symbol); @@ -1693,7 +1693,7 @@ dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output) focused = focustop(monitor); zdwl_ipc_output_v2_send_active(ipc_output->resource, monitor == selmon); - for (tag = 0 ; tag < TAGCOUNT; tag++) { + for (tag = 0 ; tag < LENGTH(tags); tag++) { numclients = state = focused_client = 0; tagmask = 1 << tag; if ((tagmask & monitor->tagset[monitor->seltags]) != 0) @@ -1754,7 +1754,7 @@ dwl_ipc_output_set_client_tags(struct wl_client *client, struct wl_resource *res if (selmon == monitor) focusclient(focustop(monitor), 1); arrange(selmon); - printstatus(); + //printstatus(); } void @@ -1775,7 +1775,7 @@ dwl_ipc_output_set_layout(struct wl_client *client, struct wl_resource *resource monitor->lt[monitor->sellt] = &layouts[index]; arrange(monitor); - printstatus(); + //printstatus(); } void @@ -1799,7 +1799,7 @@ dwl_ipc_output_set_tags(struct wl_client *client, struct wl_resource *resource, if (selmon == monitor) focusclient(focustop(monitor), 1); arrange(monitor); - printstatus(); + //printstatus(); } void @@ -1841,7 +1841,7 @@ drawbar(Monitor *m) c = focustop(m); for (i = 0; i < LENGTH(tags); i++) { w = TEXTW(m, tags[i]); - drwl_setscheme(m->drw, colors[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); + drwl_setscheme(m->drw, colors[m->tagset[m->seltags] & 1 << i ? SchemeTagSel : SchemeNorm]); drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, tags[i], urg & 1 << i); if (occ & 1 << i) drwl_rect(m->drw, x + boxs, boxs, boxw, boxw, @@ -3492,12 +3492,12 @@ tile(Monitor *m) } } -void -togglebar(const Arg *arg) { - DwlIpcOutput *ipc_output; - wl_list_for_each(ipc_output, &selmon->dwl_ipc_outputs, link) - zdwl_ipc_output_v2_send_toggle_visibility(ipc_output->resource); -} +//void +//togglebar(const Arg *arg) { +// DwlIpcOutput *ipc_output; +// wl_list_for_each(ipc_output, &selmon->dwl_ipc_outputs, link) +// zdwl_ipc_output_v2_send_toggle_visibility(ipc_output->resource); +//} void togglebar(const Arg *arg) -- cgit v1.3