sites

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

commit b56acc51c310aec0464ba6e12ce039a4c23ff14c
parent 3cf011e1866d7001dfe1dfdb11ad0cdb59666c01
Author: cedilla <cedilla@dimension.sh>
Date:   Tue,  8 Oct 2024 16:51:15 +0200

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

Diffstat:
Ast.suckless.org/patches/borderpx-option/index.md | 20++++++++++++++++++++
Ast.suckless.org/patches/borderpx-option/st-borderpx-option-20241008-e015463.diff | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/st.suckless.org/patches/borderpx-option/index.md 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 <cedilla@dimension.sh> 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 @@ -0,0 +1,74 @@ +From e01546322047ad4d0c5b613dc83f1425c360839a Mon Sep 17 00:00:00 2001 +From: cedilla <cedilla@dimension.sh> +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]\n" + " [-T title] [-t title] [-w windowid]" + " [[-e] command [args ...]]\n" +- " %s [-aiv] [-c class] [-f font] [-g geometry]" ++ " %s [-aiv] [-b borderpx] [-c class] [-f font] [-g geometry]" + " [-n name] [-o file]\n" + " [-T title] [-t title] [-w windowid] -l line" + " [stty_args ...]\n", 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 +