update dimkr patches

This commit is contained in:
Dima Krasner
2024-02-11 09:10:28 +02:00
parent 20374e1f94
commit b1b8409147
4 changed files with 56 additions and 42 deletions
+20 -16
View File
@@ -1,18 +1,18 @@
From f51bfab9b90536518a8f2eb9ac9ecb082bcf270d Mon Sep 17 00:00:00 2001
From a822ac65306ca331b95b17ffe08147110c03c60d Mon Sep 17 00:00:00 2001
From: Dima Krasner <dima@dimakrasner.com>
Date: Sat, 25 Nov 2023 11:55:58 +0200
Date: Sat, 30 Dec 2023 10:49:48 +0200
Subject: [PATCH] allow environment variables to override config.h
---
Makefile | 1 +
config.def.h | 9 ++-
config.def.h | 10 +--
dwl.c | 5 ++
env.c | 217 +++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 228 insertions(+), 4 deletions(-)
4 files changed, 228 insertions(+), 5 deletions(-)
create mode 100644 env.c
diff --git a/Makefile b/Makefile
index f0ff805..506ed09 100644
index 0822ddc..fbdfdca 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@ all: dwl
@@ -24,30 +24,31 @@ index f0ff805..506ed09 100644
# wayland-scanner is a tool which generates C headers and rigging for Wayland
diff --git a/config.def.h b/config.def.h
index db0babc..c201b84 100644
index 9009517..c6b9ae0 100644
--- a/config.def.h
+++ b/config.def.h
@@ -6,10 +6,11 @@
@@ -6,11 +6,11 @@
/* appearance */
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(0x222222ff);
-static const float bordercolor[] = COLOR(0x444444ff);
-static const float focuscolor[] = COLOR(0x005577ff);
-static const float urgentcolor[] = COLOR(0xff0000ff);
+static unsigned int borderpx = 1; /* border pixel of windows */
+static float rootcolor[] = COLOR(0x222222ff);
+static float bordercolor[] = COLOR(0x444444ff);
+static float focuscolor[] = COLOR(0x005577ff);
+static float urgentcolor[] = COLOR(0xff0000ff);
+static float rootcolor[] = COLOR(0x111122ff);
/* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */
static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can also use glsl colors */
static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You can also use glsl colors */
diff --git a/dwl.c b/dwl.c
index bbb27e4..1f8d5fb 100644
index fa76db2..6dd4524 100644
--- a/dwl.c
+++ b/dwl.c
@@ -396,6 +396,8 @@ static xcb_atom_t netatom[NetLast];
@@ -407,6 +407,8 @@ static xcb_atom_t netatom[NetLast];
/* attempt to encapsulate suck into one file */
#include "client.h"
@@ -56,16 +57,16 @@ index bbb27e4..1f8d5fb 100644
/* function implementations */
void
applybounds(Client *c, struct wlr_box *bbox)
@@ -1017,6 +1019,8 @@ createpointer(struct wlr_pointer *pointer)
libinput_device_config_accel_set_profile(libinput_device, accel_profile);
libinput_device_config_accel_set_speed(libinput_device, accel_speed);
@@ -1010,6 +1012,8 @@ createpointer(struct wlr_pointer *pointer)
libinput_device_config_accel_set_profile(device, accel_profile);
libinput_device_config_accel_set_speed(device, accel_speed);
}
+
+ inputconfig(libinput_device);
+ inputconfig(device);
}
wlr_cursor_attach_input_device(cursor, &pointer->base);
@@ -2886,6 +2890,7 @@ main(int argc, char *argv[])
@@ -2974,6 +2978,7 @@ main(int argc, char *argv[])
/* Wayland requires XDG_RUNTIME_DIR for creating its communications socket */
if (!getenv("XDG_RUNTIME_DIR"))
die("XDG_RUNTIME_DIR must be set");
@@ -296,3 +297,6 @@ index 0000000..618f81e
+ if (val && sscanf(val, "%u", &tmp) == 1)
+ borderpx = tmp;
+}
--
2.43.0