[wiki] [sites] tools/sent/patches: add a new patch for sent || Sunur Efe Vural

From: <git_AT_suckless.org>
Date: Wed, 13 Feb 2019 21:08:03 +0100

commit 4a3229d05e6c0d82e2a408d2a43ed9d3c0243b24
Author: Sunur Efe Vural <efe_AT_efe.kim>
Date: Wed Feb 13 15:02:26 2019 -0500

    tools/sent/patches: add a new patch for sent
    
    A simple patch that adds extra commandline options to sent.

diff --git a/tools.suckless.org/sent/patches/cmdline_options/index.md b/tools.suckless.org/sent/patches/cmdline_options/index.md
new file mode 100644
index 00000000..49bf6a0b
--- /dev/null
+++ b/tools.suckless.org/sent/patches/cmdline_options/index.md
_AT_@ -0,0 +1,20 @@
+Commandline Options
+===================
+
+Description
+-----------
+This patch adds extra command line options to sent for setting the font
+and the background and foreground colors.
+
+Example
+-------
+ sent -f serif -c \#cc88cc -b gray90 ./example
+
+Download
+--------
+* [sent-options-20190213-72d33d4.diff](sent-options-20190213-72d33d4.diff)
+(also works with sent-1 release)
+
+Author
+------
+* Sunur Efe Vural <efe_AT_efe.kim>
diff --git a/tools.suckless.org/sent/patches/cmdline_options/sent-options-20190213-72d33d4.diff b/tools.suckless.org/sent/patches/cmdline_options/sent-options-20190213-72d33d4.diff
new file mode 100644
index 00000000..d13df48e
--- /dev/null
+++ b/tools.suckless.org/sent/patches/cmdline_options/sent-options-20190213-72d33d4.diff
_AT_@ -0,0 +1,72 @@
+From 3a348cc15a97df8e8784b129800293dcfba28f3f Mon Sep 17 00:00:00 2001
+From: Sunur Efe Vural <efe_AT_efe.kim>
+Date: Wed, 13 Feb 2019 14:28:17 -0500
+Subject: [PATCH] Commandline Options
+
+A simple patch that adds extra commandline options to sent.
+---
+ sent.1 | 11 +++++++++++
+ sent.c | 11 ++++++++++-
+ 2 files changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/sent.1 b/sent.1
+index fabc614..5d55bf4 100644
+--- a/sent.1
++++ b/sent.1
+_AT_@ -5,6 +5,9 @@
+ .Nd simple plaintext presentation tool
+ .Sh SYNOPSIS
+ .Nm
++.Op Fl f Ar font
++.Op Fl c Ar fgcolor
++.Op Fl b Ar bgcolor
+ .Op Fl v
+ .Op Ar file
+ .Sh DESCRIPTION
+_AT_@ -21,6 +24,14 @@ few minutes.
+ .Bl -tag -width Ds
+ .It Fl v
+ Print version information to stdout and exit.
++.It Fl f Ar font
++Defines the
++.Ar font
++when sent is run.
++.It Fl c Ar fgcolor
++Defines the foreground color when sent is run.
++.It Fl b Ar bgcolor
++Defines the background color when sent is run.
+ .El
+ .Sh USAGE
+ .Bl -tag -width Ds
+diff --git a/sent.c b/sent.c
+index c50a572..0b36e32 100644
+--- a/sent.c
++++ b/sent.c
+_AT_@ -675,7 +675,7 @@ configure(XEvent *e)
+ void
+ usage()
+ {
+- die("usage: %s [file]", argv0);
++ die("usage: %s [-c fgcolor] [-b bgcolor] [-f font] [file]", argv0);
+ }
+
+ int
+_AT_@ -687,6 +687,15 @@ main(int argc, char *argv[])
+ case 'v':
+ fprintf(stderr, "sent-"VERSION"
");
+ return 0;
++ case 'f':
++ fontfallbacks[0] = EARGF(usage());
++ break;
++ case 'c':
++ colors[0] = EARGF(usage());
++ break;
++ case 'b':
++ colors[1] = EARGF(usage());
++ break;
+ default:
+ usage();
+ } ARGEND
+--
+2.20.1
+
Received on Wed Feb 13 2019 - 21:08:03 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 13 2019 - 21:12:27 CET