sites

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

commit 9ce17771605d16c3d542a63f5e3ad1282f96b91f
parent 997320981d13d7879a60242e7913e0920a3c1e8c
Author: GasparVardanyan <gaspar.vardanyan.mailbox@gmail.com>
Date:   Fri, 28 Jan 2022 06:57:54 +0400

[st][patch][xtheme] fix the patch, update index.md

Diffstat:
Mst.suckless.org/patches/xtheme/index.md | 4++++
Mst.suckless.org/patches/xtheme/st-xtheme-20220128-063347-st-0.8.5.diff | 34+++++++++++++++++-----------------
2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/st.suckless.org/patches/xtheme/index.md b/st.suckless.org/patches/xtheme/index.md @@ -2,6 +2,10 @@ xtheme ====== Simple xresources theme management system for st +Usage +----- +Simply *xrdb -merge* new theme and run *./xtheme; make install* to apply a new theme. + GitLab ------ [https://gitlab.com/-/snippets/2243455](https://gitlab.com/-/snippets/2243455) diff --git a/st.suckless.org/patches/xtheme/st-xtheme-20220128-063347-st-0.8.5.diff b/st.suckless.org/patches/xtheme/st-xtheme-20220128-063347-st-0.8.5.diff @@ -3,7 +3,7 @@ diff '--color=auto' -uraN st-0.8.5/config.def.h st-xtheme/config.def.h +++ st-xtheme/config.def.h 2022-01-28 06:13:11.486859924 +0400 @@ -1,5 +1,9 @@ /* See LICENSE file for copyright and license details. */ - + +/* theme management */ +# include "theme_beg.h" /* this is a compile-time generated header file */ +# include "theme.h" @@ -31,7 +31,7 @@ diff '--color=auto' -uraN st-0.8.5/config.def.h st-xtheme/config.def.h + ST_COLOR5, + ST_COLOR6, + ST_COLOR7, - + /* 8 bright colors */ - "gray50", - "red", @@ -49,9 +49,9 @@ diff '--color=auto' -uraN st-0.8.5/config.def.h st-xtheme/config.def.h + ST_COLOR13, + ST_COLOR14, + ST_COLOR15, - + [255] = 0, - + /* more colors can be added after 255 to use with DefaultXX */ - "#cccccc", - "#555555", @@ -62,10 +62,10 @@ diff '--color=auto' -uraN st-0.8.5/config.def.h st-xtheme/config.def.h + ST_FOREGROUND, /* default foreground colour */ + ST_BACKGROUND, /* default background colour */ }; - + +/* theme management */ +# include "theme_end.h" /* this is a compile-time generated header file */ - + /* * Default colors (colorname index) diff '--color=auto' -uraN st-0.8.5/Makefile st-xtheme/Makefile @@ -74,7 +74,7 @@ diff '--color=auto' -uraN st-0.8.5/Makefile st-xtheme/Makefile @@ -18,19 +18,27 @@ config.h: cp config.def.h config.h - + +theme.h: + chmod +x ./xtheme ./themesetup + ./xtheme @@ -84,29 +84,29 @@ diff '--color=auto' -uraN st-0.8.5/Makefile st-xtheme/Makefile + .c.o: $(CC) $(STCFLAGS) -c $< - + -st.o: config.h st.h win.h -x.o: arg.h config.h st.h win.h +st.o: config.h st.h theme win.h +x.o: arg.h config.h st.h theme win.h - + -$(OBJ): config.h config.mk +$(OBJ): config.h theme config.mk - + st: $(OBJ) $(CC) -o $@ $(OBJ) $(STLDFLAGS) + rm theme_{beg,end}.h - + clean: - rm -f st $(OBJ) st-$(VERSION).tar.gz + rm -f st $(OBJ) theme_{beg,end}.h st-$(VERSION).tar.gz - + dist: clean mkdir -p st-$(VERSION) @@ -54,4 +62,4 @@ rm -f $(DESTDIR)$(PREFIX)/bin/st rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 - + -.PHONY: all options clean dist install uninstall +.PHONY: all options clean dist install uninstall theme diff '--color=auto' -uraN st-0.8.5/themes/leet.h st-xtheme/themes/leet.h @@ -216,10 +216,10 @@ diff '--color=auto' -uraN st-0.8.5/xtheme st-xtheme/xtheme + + while read p + do -+ l="$( \ -+ xrdb -query \ -+ | grep -P "^$p(\*|\.)?$r:\s*\S*$" -m 1 \ -+ | sed "s/^$p\(\*\|\.\)\?$r:\s*\(\S*\)$/# define $m $s\2$s/" \ ++ l="$( \ ++ xrdb -query \ ++ | grep -P "^$p\*?\.?$r:\s*\S*$" -m 1 \ ++ | sed "s/^$p\*\?\.\?$r:\s*\(\S*\)$/# define $m $s\1$s/" \ + )" + + if [[ "$l" != '' ]]