[wiki] [sites] [slstatus][patch][kanji] Minor code changes + Changed attribution || Lukas Lynch
commit e65ae62e0d5242d98e2666ae8d5b58f29e412f68
Author: Lukas Lynch <madi_AT_mxdi.xyz>
Date: Wed Feb 18 16:51:38 2026 -0800
[slstatus][patch][kanji] Minor code changes + Changed attribution
diff --git a/tools.suckless.org/slstatus/patches/kanji/index.md b/tools.suckless.org/slstatus/patches/kanji/index.md
index 951f509b..451d6674 100644
--- a/tools.suckless.org/slstatus/patches/kanji/index.md
+++ b/tools.suckless.org/slstatus/patches/kanji/index.md
_AT_@ -8,8 +8,8 @@ current day of the week.
Download
--------
-* [slstatus-kanji-20240614-f68f492.diff](slstatus-kanji-20240614-f68f492.diff)
+* [slstatus-kanji-20260218-614c275.diff](slstatus-kanji-20260218-614c275.diff)
Author
------
-* Madison Lynch <madi_AT_mxdi.xyz>
\ No newline at end of file
+* Lukas Lynch <madi_AT_mxdi.xyz>
\ No newline at end of file
diff --git a/tools.suckless.org/slstatus/patches/kanji/slstatus-kanji-20240614-f68f492.diff b/tools.suckless.org/slstatus/patches/kanji/slstatus-kanji-20260218-614c275.diff
similarity index 73%
rename from tools.suckless.org/slstatus/patches/kanji/slstatus-kanji-20240614-f68f492.diff
rename to tools.suckless.org/slstatus/patches/kanji/slstatus-kanji-20260218-614c275.diff
index 79eeb5db..cda6d18c 100644
--- a/tools.suckless.org/slstatus/patches/kanji/slstatus-kanji-20240614-f68f492.diff
+++ b/tools.suckless.org/slstatus/patches/kanji/slstatus-kanji-20260218-614c275.diff
_AT_@ -1,7 +1,7 @@
-From 3baa458322f4cf9bd4c7257d1250db490a30e8d8 Mon Sep 17 00:00:00 2001
-From: Madison Lynch <madi_AT_mxdi.xyz>
-Date: Fri, 14 Jun 2024 13:00:02 -0700
-Subject: [PATCH] Overhauled kanji patch: cleaner code, faster execution
+From 2e73de23551224fe114b7e26131d8c620c1270d7 Mon Sep 17 00:00:00 2001
+From: Lukas Lynch <madi_AT_mxdi.xyz>
+Date: Wed, 18 Feb 2026 16:40:30 -0800
+Subject: [PATCH] Displays the Japanese kanji for the current day of the week.
---
Makefile | 1 +
_AT_@ -25,12 +25,13 @@ index 7a18274..305ab91 100644
components/keymap\
diff --git a/components/kanji.c b/components/kanji.c
new file mode 100644
-index 0000000..2dbcd9a
+index 0000000..80228ee
--- /dev/null
+++ b/components/kanji.c
_AT_@ -0,0 +1,30 @@
-+/* Written by Madison Lynch <madi_AT_mxdi.xyz> */
++/* Written by Lukas Lynch <madi_AT_mxdi.xyz> */
+#include <time.h>
++#define LEN(x) sizeof(x) / sizeof(*x)
+
+static const char *symbols[] = {
+ "日", // Sunday
_AT_@ -47,20 +48,20 @@ index 0000000..2dbcd9a
+* day of the week.
+*
+* _AT_param unused (NULL)
-+* _AT_return the appropriate Kanji character (char)
-+* _AT_author Madison Lynch
++* _AT_return the appropriate Kanji character (char *)
+*/
+const char *
-+kanji(const char *unused) {
++kanji(const char *unused) {
+ const time_t current_time = time(NULL);
+ const unsigned int weekday = localtime(
+ ¤t_time
-+ )->tm_wday;
++ )->tm_wday; // We don't need anything else from returned tm structure
+
-+ return (weekday < sizeof(symbols) / sizeof(char *)) ? symbols[weekday] : "?";
++ return (weekday < LEN(symbols)) ? symbols[weekday] : "?";
+}
+\ No newline at end of file
diff --git a/config.def.h b/config.def.h
-index d805331..099ed79 100644
+index 100093e..1187100 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -31,6 +31,7 @@ static const char unknown_str[] = "n/a";
_AT_@ -72,12 +73,12 @@ index d805331..099ed79 100644
* keyboard_indicators caps/num lock indicators format string (c?n?)
* see keyboard_indicators.c
diff --git a/slstatus.h b/slstatus.h
-index 8ef5874..dc927eb 100644
+index 394281c..85c7f98 100644
--- a/slstatus.h
+++ b/slstatus.h
-_AT_@ -31,6 +31,9 @@ const char *hostname(const char *unused);
- const char *ipv4(const char *interface);
+_AT_@ -32,6 +32,9 @@ const char *ipv4(const char *interface);
const char *ipv6(const char *interface);
+ const char *up(const char *interface);
+/* kanji */
+const char *kanji(const char *unused);
_AT_@ -86,5 +87,5 @@ index 8ef5874..dc927eb 100644
const char *kernel_release(const char *unused);
--
-2.45.2
+2.53.0
Received on Thu Feb 19 2026 - 01:53:49 CET
This archive was generated by hypermail 2.3.0
: Thu Feb 19 2026 - 02:00:48 CET