[wiki] [sites] [st][PATCH] colors at launch [new] || MLquest8

From: <git_AT_suckless.org>
Date: Sun, 12 Jul 2020 10:14:17 +0200

commit 31ef3c67b4395b385a9e320460f85e844e1e1dce
Author: MLquest8 <miskuzius_AT_gmail.com>
Date: Sun Jul 12 12:11:33 2020 +0400

    [st][PATCH] colors at launch [new]

diff --git a/st.suckless.org/patches/colors_at_launch/index.md b/st.suckless.org/patches/colors_at_launch/index.md
new file mode 100644
index 00000000..ac559623
--- /dev/null
+++ b/st.suckless.org/patches/colors_at_launch/index.md
_AT_@ -0,0 +1,20 @@
+Colors at launch
+================
+
+Description
+-----------
+
+This patch allows to change st color values through cmd at launch.
+All colors are changed through "-C" launch option for easier handling.
+Example: -C "#white_AT_0" will set colorname[0] to "#white"
+
+
+Download
+--------
+
+* [st-colors-at-launch-0.8.4.diff](st-colors-at-launch-0.8.4.diff)
+
+Author
+------
+
+* MLquest8 (miskuzius at gmail.com)
diff --git a/st.suckless.org/patches/colors_at_launch/st-colors-at-launch-0.8.4.diff b/st.suckless.org/patches/colors_at_launch/st-colors-at-launch-0.8.4.diff
new file mode 100644
index 00000000..3b643dad
--- /dev/null
+++ b/st.suckless.org/patches/colors_at_launch/st-colors-at-launch-0.8.4.diff
_AT_@ -0,0 +1,38 @@
+From 268d767b16d21f6f936bd5e3dfcd4f0187a8e979 Mon Sep 17 00:00:00 2001
+From: MLquest8 <miskuzius_AT_gmail.com>
+Date: Sun, 12 Jul 2020 09:47:25 +0400
+Subject: [PATCH] allow to alocate colors as launch options. Example: -C
+ "#color_AT_num"
+
+---
+ x.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/x.c b/x.c
+index 210f184..a07e358 100644
+--- a/x.c
++++ b/x.c
+_AT_@ -1980,6 +1980,8 @@ usage(void)
+ int
+ main(int argc, char *argv[])
+ {
++ int i;
++ char *colval;
+ xw.l = xw.t = 0;
+ xw.isfixed = False;
+ xsetcursor(cursorshape);
+_AT_@ -2024,6 +2026,11 @@ main(int argc, char *argv[])
+ case 'v':
+ die("%s " VERSION "
", argv0);
+ break;
++ case 'C':
++ colval = strtok(EARGF(usage()), "_AT_");
++ i = atoi(strtok(NULL, "_AT_"));
++ colorname[i] = colval;
++ break;
+ default:
+ usage();
+ } ARGEND;
+--
+2.26.2
+
Received on Sun Jul 12 2020 - 10:14:17 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 12 2020 - 10:24:44 CEST