GNU bug report logs - #64695
29.0.92; xwidget webkit dark mode support or set all settings from elisp

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Daniel Nagy <danielnagy@HIDDEN>; dated Tue, 18 Jul 2023 07:20:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Jul 2023 07:19:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 18 03:19:13 2023
Received: from localhost ([127.0.0.1]:51407 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qLezH-0008JS-U1
	for submit <at> debbugs.gnu.org; Tue, 18 Jul 2023 03:19:13 -0400
Received: from lists.gnu.org ([2001:470:142::17]:59018)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <danielnagy@HIDDEN>) id 1qLUvb-0008ES-FW
 for submit <at> debbugs.gnu.org; Mon, 17 Jul 2023 16:34:46 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <danielnagy@HIDDEN>)
 id 1qLUvV-0002NM-RV
 for bug-gnu-emacs@HIDDEN; Mon, 17 Jul 2023 16:34:37 -0400
Received: from mout01.posteo.de ([185.67.36.65])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <danielnagy@HIDDEN>)
 id 1qLUvP-0003Go-IB
 for bug-gnu-emacs@HIDDEN; Mon, 17 Jul 2023 16:34:37 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 4B670240028
 for <bug-gnu-emacs@HIDDEN>; Mon, 17 Jul 2023 22:34:28 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017;
 t=1689626068; bh=4WM4iCSKE8Q7aPgXogl9YX2VU+PR0/Y1c6eIZGo9qOg=;
 h=From:To:Subject:Date:Message-ID:MIME-Version:From;
 b=L3t33N7bkFOLMlLCcm+qCbpKbzlQxRgoI4XPPMyQDW3bfFW8EvtFGvRTYsYKTkFwD
 oEHyWSudKwOtEccMEyZqXNnZXiHpKozWSfwFLhorj3FCw7vwyuOSAyaxnqUtlukfoh
 lgxhK8VxfNhmAbBinrzJTmbeF+OJCLHnrGMDsHlozGGTUvjmYm+DtwDewYyY3ZQgUQ
 qyykSmz5KexYSeuvpb1xF2Hl9gNPHVq8azH6n8nk3bHGEYWp8dTIdlGazLAmA/RUIG
 bOaHgY5h9zYUot5bouxSiLSMl4Cgj20VvIRBNvHdzNPwHq4ItjN1GbYbUt84fI/Mwo
 Zqe/PUBsJfkAg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4R4Yhz6RJwz6tx6
 for <bug-gnu-emacs@HIDDEN>; Mon, 17 Jul 2023 22:34:27 +0200 (CEST)
From: Daniel Nagy <danielnagy@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.92; xwidget webkit dark mode support or set all settings from
 elisp
Date: Mon, 17 Jul 2023 20:33:22 +0000
Message-ID: <87edl6gtv1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=185.67.36.65; envelope-from=danielnagy@HIDDEN;
 helo=mout01.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 18 Jul 2023 03:19:11 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hello,

This is a feature request. Can xwidget webkit support the toggling of
dark mode? This is done by setting the boolean value of the gtk setting
"gtk-application-prefer-dark-theme". Better yet would be to allow to set
all kinds of gtk settings via elisp if this is somehow possible.

A good example of how dark mode can be set, can be seen in the surf
program of the suckless project:

https://git.suckless.org/surf/commit/1f5b8f3bd1f37d4d3dc45d21285f34ef4752dbaa.html

More info on the gtk setting:

https://docs.gtk.org/gtk3/property.Settings.gtk-application-prefer-dark-theme.html

Internally, this enables this css media query, to allow websites to
adapt to this user decision.

https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

Not all websites make use of this media query, but to test it out you
can check this previous link from MDN. It should turn darker if the gtk
setting is enabled correctly. The file, that would most likely to be
changed is `src/xwidget.c`.

Thank you,

In GNU Emacs 29.0.92 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.38, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: NixOS 23.11 (Tapir)

Configured using:
 'configure
 --prefix=/nix/store/m4wxxn3yblqsdlswa7k6rxsimyla4gca-emacs-gtk3-29.0.92
 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
 --with-cairo --with-native-compilation --with-tree-sitter
 --with-xinput2 --with-xwidgets'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM XWIDGETS
GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH:
  value of $EMACSNATIVELOADPATH: /nix/store/ax4hv2192br3c62wqilp71w2q0m5psrm-emacs-packages-deps/share/emacs/native-lisp::
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

--
Daniel Nagy




Acknowledgement sent to Daniel Nagy <danielnagy@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#64695; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 4 Sep 2023 08:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.