[wiki] [sites] [st][visualbell] Reorganize patches into subfolders. Update patch to newest version. || Matthias Schoth

From: <git_AT_suckless.org>
Date: Tue, 12 May 2020 20:03:12 +0200

commit 9705a67a0dee38f24050f2da06d87fc42f688bd6
Author: Matthias Schoth <mschoth_AT_gmail.com>
Date: Tue May 12 19:55:37 2020 +0200

    [st][visualbell] Reorganize patches into subfolders. Update patch to newest version.

diff --git a/st.suckless.org/patches/visualbell/deluxe_edition/index.md b/st.suckless.org/patches/visualbell/deluxe_edition/index.md
new file mode 100644
index 00000000..f6bcc4b2
--- /dev/null
+++ b/st.suckless.org/patches/visualbell/deluxe_edition/index.md
_AT_@ -0,0 +1,44 @@
+visualbell - Deluxe Edition
+===========================
+
+Description
+-----------
+Briefly renders a configurable visual indication on terminal bell event.
+
+Notes
+-----
+* There are two variants available for download: basic and enhanced.
+* The enhanced version file already includes the basic version in it, and
+ supports the basic options too.
+* Both variants can be applied with either `git am <patch-file>` or ` patch -p1
+ < <patch-file>`.
+* Visual bell is disabled by default, and can be enabled/configured via
+ `config.h`. If you already have this file, you'll need to add the visual-bell
+ values by copying them from `config.def.h` - which also includes their docs.
+
+### The basic variant supports:
+* Invert the whole screen (default).
+* Invert only the outer (border) cells for a less jarring effect.
+* Configuring the flash duration (default: 100ms).
+
+### The enhanced variant:
+This version experiments with a more graphical indication, by adding support
+for rendering a filled circle (needs to be chosen at `config.h`), which can be
+configured for:
+
+* Position: any corner/edge, center of the screen, or anything in between.
+* Size: relative to the window width or to the cell width.
+* Colors: base and outline.
+
+The enhanced variant allows, for instance, to render what looks like a LED
+indicator at a tmux status bar, with correct cell height, and can be positioned
+at the side/middle of a top/bottom bar, etc.
+
+Download
+--------
+* [st-visualbell2-basic-2018-10-16-30ec9a3.diff](st-visualbell2-basic-2018-10-16-30ec9a3.diff)
+* [st-visualbell2-enhanced-2018-10-16-30ec9a3.diff](st-visualbell2-enhanced-2018-10-16-30ec9a3.diff)
+
+Author
+------
+* Avi Halachmi (:avih) - [https://github.com/avih](https://github.com/avih)
diff --git a/st.suckless.org/patches/visualbell/st-visualbell2-basic-2018-10-16-30ec9a3.diff b/st.suckless.org/patches/visualbell/deluxe_edition/st-visualbell2-basic-2018-10-16-30ec9a3.diff
similarity index 100%
rename from st.suckless.org/patches/visualbell/st-visualbell2-basic-2018-10-16-30ec9a3.diff
rename to st.suckless.org/patches/visualbell/deluxe_edition/st-visualbell2-basic-2018-10-16-30ec9a3.diff
diff --git a/st.suckless.org/patches/visualbell/st-visualbell2-enhanced-2018-10-16-30ec9a3.diff b/st.suckless.org/patches/visualbell/deluxe_edition/st-visualbell2-enhanced-2018-10-16-30ec9a3.diff
similarity index 100%
rename from st.suckless.org/patches/visualbell/st-visualbell2-enhanced-2018-10-16-30ec9a3.diff
rename to st.suckless.org/patches/visualbell/deluxe_edition/st-visualbell2-enhanced-2018-10-16-30ec9a3.diff
diff --git a/st.suckless.org/patches/visualbell/index.md b/st.suckless.org/patches/visualbell/index.md
index e6dc43d8..1a58052a 100644
--- a/st.suckless.org/patches/visualbell/index.md
+++ b/st.suckless.org/patches/visualbell/index.md
_AT_@ -1,74 +1,12 @@
 visualbell
 ==========
-This page contains two unrelated implementations of visual bell which are not
+This page contains two unrelated implementations of a visual bell which are not
 compatible with each other. If you have one of them applied, remove it before
 trying the other.
 
 
-# Visual bell 1
-
-Description
------------
+* [Minimal Edition](/patches/visualbell/minimal_edition):
 Briefly inverts window content on terminal bell event.
+* [Deluxe Edition](/patches/visualbell/deluxe_edition):
+Allows configuration of flash duration and implements additional elaborated effects.
 
-Notes
------
-In order to be noticeable you might have to reduce the `xfps` value in
-`config.h` to less than equal the refresh rate of your monitor.
-
-Download
---------
-* [st-visualbell-20160727-308bfbf.diff](st-visualbell-20160727-308bfbf.diff)
-* [st-visualbell-20180101-1f24bde.diff](st-visualbell-20180101-1f24bde.diff)
-* [st-visualbell-0.8.1.diff](st-visualbell-0.8.1.diff)
-
-Authors
--------
-* Matthias Schoth - <mschoth_AT_gmail.com>
-* Laslo Hunhold - <dev_AT_frign.de> (git port)
-* Alexis Ben Miloud--Josselin; panpo; alexisbmj+code at protonmail dot com.
-
-
-# Visual bell 2
-
-Description
------------
-Briefly renders a configurable visual indication on terminal bell event.
-
-Notes
------
-* There are two variants available for download: basic and enhanced.
-* The enhanced version file already includes the basic version in it, and
- supports the basic options too.
-* Both variants can be applied with either `git am <patch-file>` or ` patch -p1
- < <patch-file>`.
-* Visual bell is disabled by default, and can be enabled/configured via
- `config.h`. If you already have this file, you'll need to add the visual-bell
- values by copying them from `config.def.h` - which also includes their docs.
-
-### The basic variant supports:
-* Invert the whole screen (default).
-* Invert only the outer (border) cells for a less jarring effect.
-* Configuring the flash duration (default: 100ms).
-
-### The enhanced variant:
-This version experiments with a more graphical indication, by adding support
-for rendering a filled circle (needs to be chosen at `config.h`), which can be
-configured for:
-
-* Position: any corner/edge, center of the screen, or anything in between.
-* Size: relative to the window width or to the cell width.
-* Colors: base and outline.
-
-The enhanced variant allows, for instance, to render what looks like a LED
-indicator at a tmux status bar, with correct cell height, and can be positioned
-at the side/middle of a top/bottom bar, etc.
-
-Download
---------
-* [st-visualbell2-basic-2018-10-16-30ec9a3.diff](st-visualbell2-basic-2018-10-16-30ec9a3.diff)
-* [st-visualbell2-enhanced-2018-10-16-30ec9a3.diff](st-visualbell2-enhanced-2018-10-16-30ec9a3.diff)
-
-Author
-------
-* Avi Halachmi (:avih) - [https://github.com/avih](https://github.com/avih)
diff --git a/st.suckless.org/patches/visualbell/minimal_edition/index.md b/st.suckless.org/patches/visualbell/minimal_edition/index.md
new file mode 100644
index 00000000..ea72ddba
--- /dev/null
+++ b/st.suckless.org/patches/visualbell/minimal_edition/index.md
_AT_@ -0,0 +1,25 @@
+visualbell - Minimal Edition
+============================
+
+Description
+-----------
+Briefly inverts window content on terminal bell event.
+
+Notes
+-----
+In order to be noticeable you might have to reduce the `xfps` value in
+`config.h` to less than equal the refresh rate of your monitor.
+
+Download
+--------
+* [st-visualbell-20160727-308bfbf.diff](st-visualbell-20160727-308bfbf.diff)
+* [st-visualbell-20180101-1f24bde.diff](st-visualbell-20180101-1f24bde.diff)
+* [st-visualbell-0.8.1.diff](st-visualbell-0.8.1.diff)
+* [st-visualbell-0.8.3.diff](st-visualbell-0.8.3.diff)
+
+Authors
+-------
+* Matthias Schoth - <mschoth_AT_gmail.com>
+* Laslo Hunhold - <dev_AT_frign.de> (git port)
+* Alexis Ben Miloud--Josselin; panpo; alexisbmj+code at protonmail dot com.
+
diff --git a/st.suckless.org/patches/visualbell/st-visualbell-0.8.1.diff b/st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-0.8.1.diff
similarity index 100%
rename from st.suckless.org/patches/visualbell/st-visualbell-0.8.1.diff
rename to st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-0.8.1.diff
diff --git a/st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-0.8.3.diff b/st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-0.8.3.diff
new file mode 100644
index 00000000..bfa1837e
--- /dev/null
+++ b/st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-0.8.3.diff
_AT_@ -0,0 +1,53 @@
+From be009f16642dc460182fce800ba5868e70cc3956 Mon Sep 17 00:00:00 2001
+From: Matthias Schoth <mschoth_AT_gmail.com>
+Date: Tue, 12 May 2020 18:27:29 +0200
+Subject: [PATCH] visualbell
+
+---
+ x.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/x.c b/x.c
+index e5f1737..4986374 100644
+--- a/x.c
++++ b/x.c
+_AT_@ -253,6 +253,7 @@ static char *opt_name = NULL;
+ static char *opt_title = NULL;
+
+ static int oldbutton = 3; /* button event on startup: 3 = release */
++static int bellon = 0; /* visual bell status */
+
+ void
+ clipcopy(const Arg *dummy)
+_AT_@ -1713,6 +1714,15 @@ xbell(void)
+ xseturgency(1);
+ if (bellvolume)
+ XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL);
++
++ /* visual bell*/
++ if (!bellon) {
++ bellon = 1;
++ MODBIT(win.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE);
++ redraw();
++ XFlush(xw.dpy);
++ MODBIT(win.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE);
++ }
+ }
+
+ void
+_AT_@ -1943,7 +1953,11 @@ run(void)
+ (handler[ev.type])(&ev);
+ }
+
+- draw();
++ if (bellon) {
++ bellon = 0;
++ redraw();
++ }
++ else draw();
+ XFlush(xw.dpy);
+
+ if (xev && !FD_ISSET(xfd, &rfd))
+--
+2.26.2
+
diff --git a/st.suckless.org/patches/visualbell/st-visualbell-20160727-308bfbf.diff b/st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-20160727-308bfbf.diff
similarity index 100%
rename from st.suckless.org/patches/visualbell/st-visualbell-20160727-308bfbf.diff
rename to st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-20160727-308bfbf.diff
diff --git a/st.suckless.org/patches/visualbell/st-visualbell-20170924-b1338e9.diff b/st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-20170924-b1338e9.diff
similarity index 100%
rename from st.suckless.org/patches/visualbell/st-visualbell-20170924-b1338e9.diff
rename to st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-20170924-b1338e9.diff
diff --git a/st.suckless.org/patches/visualbell/st-visualbell-20180101-1f24bde.diff b/st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-20180101-1f24bde.diff
similarity index 100%
rename from st.suckless.org/patches/visualbell/st-visualbell-20180101-1f24bde.diff
rename to st.suckless.org/patches/visualbell/minimal_edition/st-visualbell-20180101-1f24bde.diff
Received on Tue May 12 2020 - 20:03:12 CEST

This archive was generated by hypermail 2.3.0 : Tue May 12 2020 - 20:12:52 CEST