0001-support-second-theme-and-runtime-swapping.patch (906B)
1 From 22abac10b05beba3ec8126bc4765f18747cd63c7 Mon Sep 17 00:00:00 2001 2 From: Randy Palamar <palamar@ualberta.ca> 3 Date: Tue, 24 Oct 2023 06:06:03 -0600 4 Subject: [PATCH] support second theme and runtime swapping 5 6 --- 7 x.c | 12 ++++++++++++ 8 1 file changed, 12 insertions(+) 9 10 diff --git a/x.c b/x.c 11 index bd23686..9baca54 100644 12 --- a/x.c 13 +++ b/x.c 14 @@ -59,6 +59,7 @@ static void zoom(const Arg *); 15 static void zoomabs(const Arg *); 16 static void zoomreset(const Arg *); 17 static void ttysend(const Arg *); 18 +static void recolor(const Arg *); 19 20 /* config.h for applying patches and the configuration. */ 21 #include "config.h" 22 @@ -1917,6 +1918,17 @@ resize(XEvent *e) 23 cresize(e->xconfigure.width, e->xconfigure.height); 24 } 25 26 +void 27 +recolor(const Arg *A) 28 +{ 29 + if (colorname == colordark) 30 + colorname = colorlight; 31 + else 32 + colorname = colordark; 33 + xloadcols(); 34 + redraw(); 35 +} 36 + 37 void 38 run(void) 39 { 40 -- 41 2.44.0 42