sites

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

commit d3071838997fdedd88389ce9cb209af411e10d6c
parent 60a671c96c7b55c03913535d62d3656676d5580a
Author: Scarlett McAllister <no+reply@roygbyte.com>
Date:   Fri, 29 Dec 2023 12:54:49 -0400

[surf][patch][gtkblackbg] Add patch

Diffstat:
Asurf.suckless.org/patches/gtkblackbg/index.md | 16++++++++++++++++
Asurf.suckless.org/patches/gtkblackbg/surf-gtkblackbg-20231229-30f5464.diff | 39+++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 0 deletions(-)

diff --git a/surf.suckless.org/patches/gtkblackbg/index.md b/surf.suckless.org/patches/gtkblackbg/index.md @@ -0,0 +1,16 @@ +GTK Black Background +==================== + +Description +----------- +Add a black background to the GTK window and make this visible by hiding the background of the WebKit view. This effectively eliminates the momentary white screen that shows after launching `surf`. + +Combine this patch with darkmode CSS styles and/or an enabled `DarkMode` setting in `config.h` for a completely darkened surfing experience. + +Download +-------- +* [surf-gtkblackbg-20231229-30f5464.diff](surf-gtkblackbg-20231229-30f5464.diff) + +Author +------ +* Scarlett McAllister <no+reply@roygbyte.com> diff --git a/surf.suckless.org/patches/gtkblackbg/surf-gtkblackbg-20231229-30f5464.diff b/surf.suckless.org/patches/gtkblackbg/surf-gtkblackbg-20231229-30f5464.diff @@ -0,0 +1,39 @@ +From 45401ba76aa0157d49cba61dbc42ddc03d675796 Mon Sep 17 00:00:00 2001 +From: Scarlett McAllister <no+reply@roygbyte.com> +Date: Fri, 29 Dec 2023 12:41:32 -0400 +Subject: [PATCH] Add black bg to gtk window and make it visible through webkit + view + +--- + config.def.h | 2 +- + surf.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/config.def.h b/config.def.h +index 93cfeeb..ba68287 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -29,7 +29,7 @@ static Parameter defconfig[ParameterLast] = { + [FontSize] = { { .i = 12 }, }, + [FrameFlattening] = { { .i = 0 }, }, + [Geolocation] = { { .i = 0 }, }, +- [HideBackground] = { { .i = 0 }, }, ++ [HideBackground] = { { .i = 1 }, }, + [Inspector] = { { .i = 0 }, }, + [Java] = { { .i = 1 }, }, + [JavaScript] = { { .i = 1 }, }, +diff --git a/surf.c b/surf.c +index f8c8dec..a6cb224 100644 +--- a/surf.c ++++ b/surf.c +@@ -1461,6 +1461,7 @@ createwindow(Client *c) + g_signal_connect(G_OBJECT(w), "window-state-event", + G_CALLBACK(winevent), c); + ++ gtk_widget_modify_bg(GTK_WINDOW(w), GTK_STATE_NORMAL, &(GdkColor){0}); + return w; + } + +-- +2.42.0 +