sites

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

commit 04aee4cdae831033db295019ef806f9f008e418a
parent 88341eaadb238ca66f9d9c64326723f2ede0ef71
Author: Matthias Schoth <mschoth@gmail.com>
Date:   Sat, 25 Jul 2020 00:16:17 +0200

[st][patch][visualbell] Update patch to newest st version 0.8.4

Diffstat:
Mst.suckless.org/patches/visualbell/index.md | 6++++--
Ast.suckless.org/patches/visualbell/st-visualbell-0.8.4.diff | 48++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/st.suckless.org/patches/visualbell/index.md b/st.suckless.org/patches/visualbell/index.md @@ -7,8 +7,9 @@ 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. +For versions prior to 0.8.4 you might have to reduce the `xfps` value in +`config.h` to less than equal the refresh rate of your monitor in order to be +noticeable. This is not necessary for version 0.8.4 and later. Download -------- @@ -16,6 +17,7 @@ Download * [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) +* [st-visualbell-0.8.4.diff](st-visualbell-0.8.4.diff) Authors ------- diff --git a/st.suckless.org/patches/visualbell/st-visualbell-0.8.4.diff b/st.suckless.org/patches/visualbell/st-visualbell-0.8.4.diff @@ -0,0 +1,48 @@ +From b7f2e9e933710e3339b710e24e37c6f0b3befa34 Mon Sep 17 00:00:00 2001 +From: Matthias Schoth <mschoth@gmail.com> +Date: Fri, 24 Jul 2020 23:55:31 +0200 +Subject: [PATCH] visualbell + +--- + x.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/x.c b/x.c +index 210f184..bcf61f1 100644 +--- a/x.c ++++ b/x.c +@@ -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) +@@ -1713,6 +1714,8 @@ xbell(void) + xseturgency(1); + if (bellvolume) + XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL); ++ if (!bellon) /* turn visual bell on */ ++ bellon = 1; + } + + void +@@ -1958,7 +1961,13 @@ run(void) + } + } + +- draw(); ++ if (bellon) { ++ bellon++; ++ bellon %= 3; ++ MODBIT(win.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE); ++ redraw(); ++ } ++ else draw(); + XFlush(xw.dpy); + drawing = 0; + } +-- +2.27.0 +