[wiki] [sites] [st][patch][anysize] add expected anysize variant || sewn
commit 11c3a6b875804717975be364f00bbab301357ae0
Author: sewn <sewn_AT_disroot.org>
Date: Thu Jun 8 09:59:41 2023 +0300
[st][patch][anysize] add expected anysize variant
diff --git a/st.suckless.org/patches/anysize/index.md b/st.suckless.org/patches/anysize/index.md
index 079c27a3..653a465f 100644
--- a/st.suckless.org/patches/anysize/index.md
+++ b/st.suckless.org/patches/anysize/index.md
_AT_@ -24,3 +24,24 @@ Download
Authors
-------
* Augusto Born de Oliveira - <augustoborn_AT_gmail.com>
+
+Expected anysize
+================
+
+As said above, the anysize patch will automatically balance the left/right and
+top/bottom borders, with the terminals contents centered and the borders dynamic.
+This behavior may be unexpected, such as terminal content placement, and the
+terminal contents 'swimming'; constantly moving/shaking while the terminal is
+being resized, which isn't very good to look at.
+
+This variant will only add the border paddings to the bottom and the right of the
+window, which is usually expected as english is left to right and the terminal
+output comes from the top.
+
+The change is very small, and only requires 2 lines to be changed in `x.c`.
+
+The outcome of this behavior is what should be expected from an 'anysize' patch.
+
+Download
+--------
+* [st-expected-anysize-0.9.diff](st-expected-anysize-0.9.diff)
diff --git a/st.suckless.org/patches/anysize/st-expected-anysize-0.9.diff b/st.suckless.org/patches/anysize/st-expected-anysize-0.9.diff
new file mode 100644
index 00000000..e3479dec
--- /dev/null
+++ b/st.suckless.org/patches/anysize/st-expected-anysize-0.9.diff
_AT_@ -0,0 +1,15 @@
+diff --git a/x.c b/x.c
+index aa09997..ea6e016 100644
+--- a/x.c
++++ b/x.c
+_AT_@ -869,8 +869,8 @@ xhints(void)
+ sizeh->flags = PSize | PResizeInc | PBaseSize | PMinSize;
+ sizeh->height = win.h;
+ sizeh->width = win.w;
+- sizeh->height_inc = win.ch;
+- sizeh->width_inc = win.cw;
++ sizeh->height_inc = 1;
++ sizeh->width_inc = 1;
+ sizeh->base_height = 2 * borderpx;
+ sizeh->base_width = 2 * borderpx;
+ sizeh->min_height = win.ch + 2 * borderpx;
Received on Thu Jun 08 2023 - 16:00:14 CEST
This archive was generated by hypermail 2.3.0
: Thu Jun 08 2023 - 16:00:54 CEST