sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 31ef3c67b4395b385a9e320460f85e844e1e1dce
parent 263547ee4e7aea71ea21f30888bff08735d1e49c
Author: MLquest8 <miskuzius@gmail.com>
Date:   Sun, 12 Jul 2020 12:11:33 +0400

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

Diffstat:
Ast.suckless.org/patches/colors_at_launch/index.md | 20++++++++++++++++++++
Ast.suckless.org/patches/colors_at_launch/st-colors-at-launch-0.8.4.diff | 38++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/st.suckless.org/patches/colors_at_launch/index.md b/st.suckless.org/patches/colors_at_launch/index.md @@ -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@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 @@ -0,0 +1,38 @@ +From 268d767b16d21f6f936bd5e3dfcd4f0187a8e979 Mon Sep 17 00:00:00 2001 +From: MLquest8 <miskuzius@gmail.com> +Date: Sun, 12 Jul 2020 09:47:25 +0400 +Subject: [PATCH] allow to alocate colors as launch options. Example: -C + "#color@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 +@@ -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); +@@ -2024,6 +2026,11 @@ main(int argc, char *argv[]) + case 'v': + die("%s " VERSION "\n", argv0); + break; ++ case 'C': ++ colval = strtok(EARGF(usage()), "@"); ++ i = atoi(strtok(NULL, "@")); ++ colorname[i] = colval; ++ break; + default: + usage(); + } ARGEND; +-- +2.26.2 +