From 060751cf0d5f5730e53f30758eeb67672aee7604 Mon Sep 17 00:00:00 2001 From: sewn Date: Sat, 23 Mar 2024 19:21:10 +0300 Subject: [PATCH] bar: update patches --- bar/barpadding.patch | 22 +++++++++++++++------- bar/border.patch | 6 +++--- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/bar/barpadding.patch b/bar/barpadding.patch index 578dc65..8467add 100644 --- a/bar/barpadding.patch +++ b/bar/barpadding.patch @@ -1,26 +1,34 @@ -From b99ce4f7cb99729a9739af642a0e0fe00ea7ccf0 Mon Sep 17 00:00:00 2001 +From 213d041523e36b7e4f8f2f527eb044bc2d3e9d3d Mon Sep 17 00:00:00 2001 From: sewn Date: Tue, 19 Mar 2024 00:19:39 +0300 Subject: [PATCH] port barpadding patch to bar for dwl --- - config.def.h | 2 ++ + config.def.h | 3 +++ dwl.c | 16 ++++++++++------ - 2 files changed, 12 insertions(+), 6 deletions(-) + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/config.def.h b/config.def.h -index bd008c9..62c95de 100644 +index bd008c9..a2cf167 100644 --- a/config.def.h +++ b/config.def.h -@@ -7,6 +7,8 @@ +@@ -7,6 +7,7 @@ static const int sloppyfocus = 1; /* focus follows mouse */ static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */ static const unsigned int borderpx = 1; /* border pixel of windows */ -+static const int vertpad = 10; /* vertical padding of bar */ -+static const int sidepad = 10; /* horizontal padding of bar */ ++ static const float rootcolor[] = COLOR(0x000000ff); static const float bordercolor[] = COLOR(0x444444ff); static const float focuscolor[] = COLOR(0x005577ff); +@@ -17,6 +18,8 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca + /* bar */ + static const int showbar = 1; /* 0 means no bar */ + static const int topbar = 1; /* 0 means bottom bar */ ++static const int vertpad = 10; /* vertical padding of bar */ ++static const int sidepad = 10; /* horizontal padding of bar */ + static const char *fonts[] = {"monospace:size=10"}; + static const char *fontattrs = "dpi=96"; + static pixman_color_t normbarfg = { 0xbbbb, 0xbbbb, 0xbbbb, 0xffff }; diff --git a/dwl.c b/dwl.c index 8341134..51ce9f0 100644 --- a/dwl.c diff --git a/bar/border.patch b/bar/border.patch index a4c7d3a..600583c 100644 --- a/bar/border.patch +++ b/bar/border.patch @@ -1,4 +1,4 @@ -From 315474624a29f668088405a5bfec7d48e97a4c31 Mon Sep 17 00:00:00 2001 +From a6c7531d67e7cfd82c519f5b1eb1eb0659bbb2d4 Mon Sep 17 00:00:00 2001 From: sewn Date: Sat, 23 Mar 2024 14:09:57 +0300 Subject: [PATCH] add border to bar @@ -21,7 +21,7 @@ index bd008c9..a51ebe7 100644 static pixman_color_t normbarbg = { 0x2222, 0x2222, 0x2222, 0xffff }; static pixman_color_t selbarfg = { 0xeeee, 0xeeee, 0xeeee, 0xffff }; diff --git a/dwl.c b/dwl.c -index 8341134..8870ce0 100644 +index 8341134..9f0b9d2 100644 --- a/dwl.c +++ b/dwl.c @@ -1428,7 +1428,8 @@ draw_rect(pixman_image_t *pix, @@ -111,7 +111,7 @@ index 8341134..8870ce0 100644 lrpad = font->height; - bh = font->height + 2; -+ bh = font->height + 2 + borderpx; ++ bh = font->height + 2 + borderpx * 2; status_event_source = wl_event_loop_add_fd(wl_display_get_event_loop(dpy), STDIN_FILENO, WL_EVENT_READABLE, status_in, NULL);