mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-10-27 02:04:16 +00:00
barpadding: bar 2024-04-14
This commit is contained in:
parent
a20b75a9fd
commit
54edef5264
@ -1,26 +1,18 @@
|
|||||||
From 537bd7c485c1fb370d7a73f979ee140dab9c078e Mon Sep 17 00:00:00 2001
|
From 7fe1a19287e1f40d90efd0c3b314c178cb27a571 Mon Sep 17 00:00:00 2001
|
||||||
From: sewn <sewn@disroot.org>
|
From: sewn <sewn@disroot.org>
|
||||||
Date: Mon, 25 Mar 2024 00:15:01 +0300
|
Date: Sun, 14 Apr 2024 08:02:56 +0300
|
||||||
Subject: [PATCH] port barpadding patch to bar for dwl
|
Subject: [PATCH] port barpadding patch to bar for dwl
|
||||||
|
|
||||||
---
|
---
|
||||||
config.def.h | 3 +++
|
config.def.h | 2 ++
|
||||||
dwl.c | 14 +++++++++-----
|
dwl.c | 13 ++++++++-----
|
||||||
2 files changed, 12 insertions(+), 5 deletions(-)
|
2 files changed, 10 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/config.def.h b/config.def.h
|
diff --git a/config.def.h b/config.def.h
|
||||||
index bd008c9..a2cf167 100644
|
index 0be3ad0..423330b 100644
|
||||||
--- a/config.def.h
|
--- a/config.def.h
|
||||||
+++ b/config.def.h
|
+++ b/config.def.h
|
||||||
@@ -7,6 +7,7 @@
|
@@ -17,6 +17,8 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
|
||||||
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 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 */
|
/* bar */
|
||||||
static const int showbar = 1; /* 0 means no bar */
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
@ -30,19 +22,18 @@ index bd008c9..a2cf167 100644
|
|||||||
static const char *fontattrs = "dpi=96";
|
static const char *fontattrs = "dpi=96";
|
||||||
static pixman_color_t normbarfg = { 0xbbbb, 0xbbbb, 0xbbbb, 0xffff };
|
static pixman_color_t normbarfg = { 0xbbbb, 0xbbbb, 0xbbbb, 0xffff };
|
||||||
diff --git a/dwl.c b/dwl.c
|
diff --git a/dwl.c b/dwl.c
|
||||||
index 976fefb..6650fdc 100644
|
index 54273ae..b19d1a3 100644
|
||||||
--- a/dwl.c
|
--- a/dwl.c
|
||||||
+++ b/dwl.c
|
+++ b/dwl.c
|
||||||
@@ -434,6 +434,8 @@ static Monitor *selmon;
|
@@ -431,6 +431,7 @@ static struct wl_list mons;
|
||||||
|
static Monitor *selmon;
|
||||||
|
|
||||||
static struct fcft_font *font;
|
static struct fcft_font *font;
|
||||||
|
+static int vp, sp;
|
||||||
static int bh;
|
static int bh;
|
||||||
+static int vp;
|
|
||||||
+static int sp;
|
|
||||||
static int lrpad;
|
static int lrpad;
|
||||||
static char stext[256];
|
static char stext[256];
|
||||||
static struct wl_event_source *status_event_source;
|
@@ -569,8 +570,8 @@ arrangelayers(Monitor *m)
|
||||||
@@ -571,8 +573,8 @@ arrangelayers(Monitor *m)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (m->showbar) {
|
if (m->showbar) {
|
||||||
@ -53,7 +44,7 @@ index 976fefb..6650fdc 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Arrange exclusive surfaces from top->bottom */
|
/* Arrange exclusive surfaces from top->bottom */
|
||||||
@@ -1501,8 +1503,8 @@ drawbar(Monitor *mon)
|
@@ -1419,8 +1420,8 @@ drawbar(Monitor *mon)
|
||||||
}
|
}
|
||||||
|
|
||||||
pixman_image_unref(pix);
|
pixman_image_unref(pix);
|
||||||
@ -64,7 +55,7 @@ index 976fefb..6650fdc 100644
|
|||||||
wlr_scene_buffer_set_buffer(mon->scene_buffer, &buf->base);
|
wlr_scene_buffer_set_buffer(mon->scene_buffer, &buf->base);
|
||||||
wlr_buffer_drop(&buf->base);
|
wlr_buffer_drop(&buf->base);
|
||||||
}
|
}
|
||||||
@@ -2747,6 +2749,8 @@ setup(void)
|
@@ -2665,6 +2666,8 @@ setup(void)
|
||||||
|
|
||||||
lrpad = font->height;
|
lrpad = font->height;
|
||||||
bh = font->height + 2;
|
bh = font->height + 2;
|
||||||
@ -73,10 +64,10 @@ index 976fefb..6650fdc 100644
|
|||||||
|
|
||||||
status_event_source = wl_event_loop_add_fd(wl_display_get_event_loop(dpy),
|
status_event_source = wl_event_loop_add_fd(wl_display_get_event_loop(dpy),
|
||||||
STDIN_FILENO, WL_EVENT_READABLE, status_in, NULL);
|
STDIN_FILENO, WL_EVENT_READABLE, status_in, NULL);
|
||||||
@@ -3087,7 +3091,7 @@ updatebardims(Monitor *m)
|
@@ -3004,7 +3007,7 @@ updatebardims(Monitor *m)
|
||||||
{
|
{
|
||||||
int rw, rh;
|
int rw, rh;
|
||||||
wlr_output_transformed_resolution(m->wlr_output, &rw, &rh);
|
wlr_output_effective_resolution(m->wlr_output, &rw, &rh);
|
||||||
- m->b.width = rw;
|
- m->b.width = rw;
|
||||||
+ m->b.width = rw - 2 * sp;
|
+ m->b.width = rw - 2 * sp;
|
||||||
m->b.height = bh;
|
m->b.height = bh;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user