commit d85ba1891ed49d8f0f90527eb8f7cef16dce64a0
Author: endiexz <[email protected]>
Date:   Wed Aug 28 13:39:57 2024 +0800

    This patch removes the outlined rectangle when a st window is unfocused

diff --git a/st.suckless.org/patches/unfocused_cursor/index.md 
b/st.suckless.org/patches/unfocused_cursor/index.md
new file mode 100644
index 00000000..1175403b
--- /dev/null
+++ b/st.suckless.org/patches/unfocused_cursor/index.md
@@ -0,0 +1,13 @@
+## unfocused-cursor
+
+## Description
+
+By default, when an st window is unfocused, the cursor appears as an outlined 
rectangle. If you prefer a cleaner look, this patch removes the outlined 
rectangle, making the cursor invisible when the window is unfocused.
+
+## Download
+
+* [st-unfocused-cursor-0.1.diff](st-unfocused-cursor-0.1.diff)
+
+## Author
+
+* Endiexz [endiexz.top](endiexz.top)
\ No newline at end of file
diff --git 
a/st.suckless.org/patches/unfocused_cursor/st-unfocused-cursor-0.1.diff 
b/st.suckless.org/patches/unfocused_cursor/st-unfocused-cursor-0.1.diff
new file mode 100644
index 00000000..233914a5
--- /dev/null
+++ b/st.suckless.org/patches/unfocused_cursor/st-unfocused-cursor-0.1.diff
@@ -0,0 +1,21 @@
+diff --git a/x.c b/x.c
+index d19bb3f..c9f2057 100644
+--- a/x.c
++++ b/x.c
+@@ -1618,7 +1618,7 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, 
Glyph og)
+                       break;
+               }
+       } else {
+-              XftDrawRect(xw.draw, &drawcol,
++/*            XftDrawRect(xw.draw, &drawcol,
+                               win.hborderpx + cx * win.cw,
+                               win.vborderpx + cy * win.ch,
+                               win.cw - 1, 1);
+@@ -1634,6 +1634,7 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, 
Glyph og)
+                               win.hborderpx + cx * win.cw,
+                               win.vborderpx + (cy + 1) * win.ch - 1,
+                               win.cw, 1);
++*/
+       }
+ }
+ 


Reply via email to