commit e08bfef070448286f5ea42c01fa0ea5daa4e28c0
Author: bajok <[email protected]>
Date:   Thu May 7 18:04:08 2020 +0200

    Add st/selectionbg-alpha patch

diff --git a/st.suckless.org/patches/selectionbg-alpha/index.md 
b/st.suckless.org/patches/selectionbg-alpha/index.md
new file mode 100644
index 00000000..54c9b275
--- /dev/null
+++ 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
new file mode 100644
index 00000000..5df8932f
--- /dev/null
+++ 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;
+ }
+ 


Reply via email to