commit b56acc51c310aec0464ba6e12ce039a4c23ff14c
Author: cedilla <[email protected]>
Date:   Tue Oct 8 16:51:15 2024 +0200

    Adding the borderpx-option patch, see description and patch messages.

diff --git a/st.suckless.org/patches/borderpx-option/index.md 
b/st.suckless.org/patches/borderpx-option/index.md
new file mode 100644
index 00000000..b02e6ec1
--- /dev/null
+++ b/st.suckless.org/patches/borderpx-option/index.md
@@ -0,0 +1,20 @@
+bold is not bright
+==================
+
+Description
+-----------
+
+This patch allow to set the ``borderpx`` value at runtime. This is useful, for
+example, when using ``ranger`` in conjunction with ``w3mimg`` to correct
+misalignment of images.
+
+Download
+--------
+
+* 
[st-borderpx-option-20241008-e015463.diff](st-borderpx-option-20241008-e015463.diff)
+
+
+Author
+------
+
+* cedilla <[email protected]>
diff --git 
a/st.suckless.org/patches/borderpx-option/st-borderpx-option-20241008-e015463.diff
 
b/st.suckless.org/patches/borderpx-option/st-borderpx-option-20241008-e015463.diff
new file mode 100644
index 00000000..8dce4196
--- /dev/null
+++ 
b/st.suckless.org/patches/borderpx-option/st-borderpx-option-20241008-e015463.diff
@@ -0,0 +1,74 @@
+From e01546322047ad4d0c5b613dc83f1425c360839a Mon Sep 17 00:00:00 2001
+From: cedilla <[email protected]>
+Date: Tue, 8 Oct 2024 16:25:03 +0200
+Subject: [PATCH] Allow to set border value using for example -b 18
+
+---
+ st.1 | 8 ++++++++
+ x.c  | 7 +++++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/st.1 b/st.1
+index 39120b4..9ad3783 100644
+--- a/st.1
++++ b/st.1
+@@ -4,6 +4,8 @@ st \- simple terminal
+ .SH SYNOPSIS
+ .B st
+ .RB [ \-aiv ]
++.RB [ \-b
++.IR borderpx ]
+ .RB [ \-c
+ .IR class ]
+ .RB [ \-f
+@@ -28,6 +30,8 @@ st \- simple terminal
+ .PP
+ .B st
+ .RB [ \-aiv ]
++.RB [ \-b
++.IR borderpx ]
+ .RB [ \-c
+ .IR class ]
+ .RB [ \-f
+@@ -55,6 +59,10 @@ is a simple terminal emulator.
+ .B \-a
+ disable alternate screens in terminal
+ .TP
++.BI \-b " borderpx"
++set border size to
++.I borderpx
++.TP
+ .BI \-c " class"
+ defines the window class (default $TERM).
+ .TP
+diff --git a/x.c b/x.c
+index d73152b..bda127c 100644
+--- a/x.c
++++ b/x.c
+@@ -2026,11 +2026,11 @@ run(void)
+ void
+ usage(void)
+ {
+-      die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]"
++      die("usage: %s [-aiv] [-b borderpx] [-c class] [-f font] [-g geometry]"
+           " [-n name] [-o file]
"
+           "          [-T title] [-t title] [-w windowid]"
+           " [[-e] command [args ...]]
"
+-          "       %s [-aiv] [-c class] [-f font] [-g geometry]"
++          "       %s [-aiv] [-b borderpx] [-c class] [-f font] [-g geometry]"
+           " [-n name] [-o file]
"
+           "          [-T title] [-t title] [-w windowid] -l line"
+           " [stty_args ...]
", argv0, argv0);
+@@ -2047,6 +2047,9 @@ main(int argc, char *argv[])
+       case 'a':
+               allowaltscreen = 0;
+               break;
++      case 'b':
++              borderpx = atoi(EARGF(usage()));
++              break;
+       case 'c':
+               opt_class = EARGF(usage());
+               break;
+-- 
+2.45.2
+


Reply via email to