st-borderpx-option-20241008-e015463.diff - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       st-borderpx-option-20241008-e015463.diff (1749B)
       ---
            1 From e01546322047ad4d0c5b613dc83f1425c360839a Mon Sep 17 00:00:00 2001
            2 From: cedilla <cedilla@dimension.sh>
            3 Date: Tue, 8 Oct 2024 16:25:03 +0200
            4 Subject: [PATCH] Allow to set border value using for example -b 18
            5 
            6 ---
            7  st.1 | 8 ++++++++
            8  x.c  | 7 +++++--
            9  2 files changed, 13 insertions(+), 2 deletions(-)
           10 
           11 diff --git a/st.1 b/st.1
           12 index 39120b4..9ad3783 100644
           13 --- a/st.1
           14 +++ b/st.1
           15 @@ -4,6 +4,8 @@ st \- simple terminal
           16  .SH SYNOPSIS
           17  .B st
           18  .RB [ \-aiv ]
           19 +.RB [ \-b
           20 +.IR borderpx ]
           21  .RB [ \-c
           22  .IR class ]
           23  .RB [ \-f
           24 @@ -28,6 +30,8 @@ st \- simple terminal
           25  .PP
           26  .B st
           27  .RB [ \-aiv ]
           28 +.RB [ \-b
           29 +.IR borderpx ]
           30  .RB [ \-c
           31  .IR class ]
           32  .RB [ \-f
           33 @@ -55,6 +59,10 @@ is a simple terminal emulator.
           34  .B \-a
           35  disable alternate screens in terminal
           36  .TP
           37 +.BI \-b " borderpx"
           38 +set border size to
           39 +.I borderpx
           40 +.TP
           41  .BI \-c " class"
           42  defines the window class (default $TERM).
           43  .TP
           44 diff --git a/x.c b/x.c
           45 index d73152b..bda127c 100644
           46 --- a/x.c
           47 +++ b/x.c
           48 @@ -2026,11 +2026,11 @@ run(void)
           49  void
           50  usage(void)
           51  {
           52 -        die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]"
           53 +        die("usage: %s [-aiv] [-b borderpx] [-c class] [-f font] [-g geometry]"
           54              " [-n name] [-o file]\n"
           55              "          [-T title] [-t title] [-w windowid]"
           56              " [[-e] command [args ...]]\n"
           57 -            "       %s [-aiv] [-c class] [-f font] [-g geometry]"
           58 +            "       %s [-aiv] [-b borderpx] [-c class] [-f font] [-g geometry]"
           59              " [-n name] [-o file]\n"
           60              "          [-T title] [-t title] [-w windowid] -l line"
           61              " [stty_args ...]\n", argv0, argv0);
           62 @@ -2047,6 +2047,9 @@ main(int argc, char *argv[])
           63          case 'a':
           64                  allowaltscreen = 0;
           65                  break;
           66 +        case 'b':
           67 +                borderpx = atoi(EARGF(usage()));
           68 +                break;
           69          case 'c':
           70                  opt_class = EARGF(usage());
           71                  break;
           72 -- 
           73 2.45.2
           74