sites

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

commit e08bfef070448286f5ea42c01fa0ea5daa4e28c0
parent dccbe1cca7227749a33b3b31d2097c4f7943213b
Author: bajok <bajok@kretes.xyz>
Date:   Thu,  7 May 2020 18:04:08 +0200

Add st/selectionbg-alpha patch

Diffstat:
Ast.suckless.org/patches/selectionbg-alpha/index.md | 15+++++++++++++++
Ast.suckless.org/patches/selectionbg-alpha/st-selectionbg-alpha.diff | 20++++++++++++++++++++
2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/st.suckless.org/patches/selectionbg-alpha/index.md b/st.suckless.org/patches/selectionbg-alpha/index.md @@ -0,0 +1,15 @@ +selectionbg-alpha +=============== + +Description +----------- + +This patch works with selectioncolors and alpha patches to make selection background color transparent. + +Download +-------- +* [st-selectionbg-alpha-0.8.2.diff](st-selectionbg-alpha-0.8.2.diff) + +Authors +------- +* Bajok diff --git a/st.suckless.org/patches/selectionbg-alpha/st-selectionbg-alpha.diff b/st.suckless.org/patches/selectionbg-alpha/st-selectionbg-alpha.diff @@ -0,0 +1,20 @@ +--- x.c.bck 2020-05-07 16:51:55.080437829 +0200 ++++ x.c 2020-05-07 16:51:23.850218201 +0200 +@@ -812,6 +812,17 @@ + ((unsigned short)(dc.col[defaultbg].color.blue * alpha)) & 0xff00; + dc.col[defaultbg].pixel &= 0x00FFFFFF; + dc.col[defaultbg].pixel |= (unsigned char)(0xff * alpha) << 24; ++ ++ /* set alpha value of selbg color */ ++ dc.col[selectionbg].color.alpha = (unsigned short)(0xffff * alpha); ++ dc.col[selectionbg].color.red = ++ ((unsigned short)(dc.col[selectionbg].color.red * alpha)) & 0xff00; ++ dc.col[selectionbg].color.green = ++ ((unsigned short)(dc.col[selectionbg].color.green * alpha)) & 0xff00; ++ dc.col[selectionbg].color.blue = ++ ((unsigned short)(dc.col[selectionbg].color.blue * alpha)) & 0xff00; ++ dc.col[selectionbg].pixel &= 0x00FFFFFF; ++ dc.col[selectionbg].pixel |= (unsigned char)(0xff * alpha) << 24; + loaded = 1; + } +