From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vince Salvino Newsgroups: gmane.emacs.devel Subject: RE: Dark mode on Windows Date: Tue, 26 Oct 2021 04:29:29 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29053"; mail-complaints-to="usenet@ciao.gmane.io" To: "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 26 06:36:09 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfEC1-0007Lm-HO for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Oct 2021 06:36:09 +0200 Original-Received: from localhost ([::1]:45994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfEBz-0006Qk-B7 for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Oct 2021 00:36:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfEAZ-0005K3-MM for emacs-devel@gnu.org; Tue, 26 Oct 2021 00:34:39 -0400 Original-Received: from mail-dm6nam10on2060c.outbound.protection.outlook.com ([2a01:111:f400:7e88::60c]:9889 helo=NAM10-DM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfEAW-0007OR-U7 for emacs-devel@gnu.org; Tue, 26 Oct 2021 00:34:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OvJtp9yvKL2cZ8sr8y/x7lMqHbJ+a28/NCCrhGe1p/I5XuDkmDmRHy6/avvHxn2siRp4SEUZ/8HZ6kR+gUE5PBNHPNQH5xJ/RbL8Oe6TE5zOasRjbIu7Bj0PkqgGQgsXySF+/+sPPxe4HZ98RQN5qfCWc4ftyLywHRT5DU66PZBuqEVW9u0n6bbKZDH/FvEvLpKL22uAXOMH4dw/njM/HAs/RF7EBKkKCBO5acgCO0Cur7nb3xrfe53HM+vUySb4q16RKa+/KlEkiZL960NLNGkga1nYZp34fKbmkicx2gtgqP2NvKFe7ur6PRnBSB741cH4JK9G3gOuNKDYJG1D5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9MW5VpIDutS+xk2fN7zf8dA5cmPE00CK1koqHNMMt4s=; b=FVZJxO9s8W/YjohyEOw1DkfwFoa9/cD5TtT57fDTKBQQbyZA2AYjiQETuQVnJXfd3/j0S31iCLIRHC1UT0lX9qBRnqHvYoR2bIYuCDoXNHUzum8MnxCuepcWxZvgxIYe/ORSqXFp/3tJhpgwx3eKUErAeyeNu5DqpRhhRfdcfDQ/jb+GzbuJOOIBXzul+OhhQ3U9JKYxg2YPmux0oY3JJSPGSfD+b2SKBrKBzDVPUQx9KEa65KW/pp7xsPBwKWwFyNACSJsPbyagIpqwY684wxf8xFmmawFsfjNOMxYMLeOoK0VBhU1GY5VLIX+IB7rG6woUyEyIxZ71sluTlY5Z2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=coderedcorp.com; dmarc=pass action=none header.from=coderedcorp.com; dkim=pass header.d=coderedcorp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coderedcorp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9MW5VpIDutS+xk2fN7zf8dA5cmPE00CK1koqHNMMt4s=; b=fmAou9Og2Jgp4OWk26GNWQfL1kBki1Rw9GofipHfLDR993PcuS+3xT0BTuhDchaWthTzmP40Wq/oMofo8Y/4dF6Z3dcCWiBVc2mFgAgdHGtADFNlgUa5aghGudo0boXlSpy5bXE+p/80IFP6NsL1eQtTv9znxlw3K04ZCCI6Gb4= Original-Received: from CH2PR12MB4231.namprd12.prod.outlook.com (2603:10b6:610:7d::24) by CH2PR12MB3976.namprd12.prod.outlook.com (2603:10b6:610:28::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Tue, 26 Oct 2021 04:29:30 +0000 Original-Received: from CH2PR12MB4231.namprd12.prod.outlook.com ([fe80::55e4:7d22:a6df:970b]) by CH2PR12MB4231.namprd12.prod.outlook.com ([fe80::55e4:7d22:a6df:970b%6]) with mapi id 15.20.4628.020; Tue, 26 Oct 2021 04:29:29 +0000 Thread-Topic: Dark mode on Windows Thread-Index: AdfJJLnhgOTSduS6R4GjAFarFtqzBwA8bFBw In-Reply-To: Accept-Language: en-US Content-Language: en-US authentication-results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=coderedcorp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5176aff2-6f08-4c2b-7f9f-08d9983933c2 x-ms-traffictypediagnostic: CH2PR12MB3976: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WA04qNjCFWUztOeKWOh6EoZIF65aBVvzr8LL3W4oIoUei0WQ06i5+uWFYLoL0hKmaNyaCBRvYI2r+m208QNihtg1Vd2Cb/sHswOTq+ZUItuuo7Vv4DeO7AmtVeloGhmr/vamDwGajczWzNh1D3+S3UYUiK1Vly9aMDnnUFF8BVdn2mFEuiM7lUJYk3yj1FXq3jUT2T1qVqbnSUAzp5JcpLeKVH3rb83S4u0mRO7sNwrMWmTkUioOlRAR90da5E+GdXLHvXIAiAmaWAYGVS5nyouCiM99+ryuPneqsoiBzdHajWaGINPAff62UmSkwJIPw1+iAiMZu+Y0T8XTDe7PESi0KysGkK709d//w2kFEIclaR1qGBe/OT/KTLeK7gDK0G4PLIqWLHJKCSQuGi8k5gRbyDnaqyzZs3RUNSmoD5sJtkKGoW6ks1zZDDmRPY1sNyO+4kWcV0dNtXmoPwRNh1V5NIucgOQLQAelhNpnRjhcUJh7ChhmMchznxY8qVWKyO5jr5cbL0q46bHcpJwAYguTQi5qnPJM3PJQcGR5oOZftomx2oqOKNrTo9D/QRmbx4m4CGSN8fXhs+0wK08BWv8WULTc81b9sygBYDDBiKKuhzs26ckHvlQPmg1IXIl5ARE6JyBuvvYn/sTJVzEQ1rqmIipIT+VDIMsvzFzwBxbAyWKitBmmeHkWx1WCv+1xW1KVaM/SKSdiWxAwSgQfkL579d15pIUk/nVC6lVUszTu8hPMuQcDf93UtYx06 Jjt5vgOSxgQZDRCFnfh2SMemaOTaXCiuPbU+eIeTcjx4TI= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4231.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(39830400003)(396003)(136003)(346002)(366004)(5660300002)(53546011)(316002)(8936002)(122000001)(7696005)(3480700007)(26005)(33656002)(508600001)(8676002)(6506007)(64756008)(66556008)(66446008)(66476007)(38100700002)(2906002)(86362001)(966005)(52536014)(66946007)(76116006)(38070700005)(83380400001)(186003)(9686003)(55016002)(6916009)(71200400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IXeqyefMkuvshYMnGwFhRgG92h+ByPKcQOhNlPAU5W9YwKhF4DemwerciMS8?= =?us-ascii?Q?Zb//1TVtXgy2rTluFJ3ftO2wBfmyAchuraTOUaSSRF3ZGbJdfqNClyHiknbB?= =?us-ascii?Q?zd4ss3GkMEso+8MRYbgc2HPc+dK/6FvE7D5XKsGbb8+cR+zd1URdyJTGAmNn?= =?us-ascii?Q?3eGjtQeCClRJnjzJVfFw0xAe02LtUYdJy/H1bCO8dOTkuJlXgxdFMVhV72kd?= =?us-ascii?Q?4giejeZTkvW8DWRJ1oJlaRY2aXlo/Opjpl99sgJcJGwiPR5oT2XWDyCsbF5U?= =?us-ascii?Q?xihJ3NZacEhEqE03pthMR5faA5E7a2m/zRlTO9diqS+0W8qGP+mQ5e799M9b?= =?us-ascii?Q?NcrS5K23jStGkns7ftpU/HcXf52KFcOKD6NdrVCGUaj93ftfJhzfhz9sC+qn?= =?us-ascii?Q?e/KEauybNtHtnvbdGjsKYEqIp5HWqbiyCAIp3P6sKNO9b6QsEtCIZ/nDkf+s?= =?us-ascii?Q?ubYqxgB/9BtAzKYwPQWvVSFE81eiTgu5IeISBksl0xmkBotuksgh0ekd+H5o?= =?us-ascii?Q?L5QV3dsMJR/Pdk8a8TEdfGOIuccxq306+AxGUhjvD9E4wHQklaCNSG9k8M1u?= =?us-ascii?Q?1odC90rLNHx4BADLKl6C1cU719MUEufZ5EVICsPVaVAOWdyaY8OeOpLvdfCY?= =?us-ascii?Q?CF X-OriginatorOrg: coderedcorp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4231.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5176aff2-6f08-4c2b-7f9f-08d9983933c2 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2021 04:29:29.7333 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9c94adb1-2ce8-484f-be82-c9b5127d4cb1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: eR0QQhg8eX+7yKHVSY8LfaDHFh1wuzKsP7PeJDoloV5LmS5vKitxTXAvUQK3BWrUZ8/kTP0IaUcT7O3JISpQRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3976 Received-SPF: pass client-ip=2a01:111:f400:7e88::60c; envelope-from=salvino@coderedcorp.com; helo=NAM10-DM6-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:277817 Archived-At: All right everyone, thanks for all your help. I managed to work out the lib= rary loading issue, and now have it querying the preferred theme from the r= egistry. I will submit shortly following the CONTRIBUTE guide. Info and download: https://github.com/vsalvino/emacs Patch: https://github.com/vsalvino/emacs/pull/1/files It currently works as so: * Queries if emacs is running on a supported version of Windows, and OS the= me is set to "dark" (light is default). * Applies system dark title bar * Applies system dark scroll bars The following is needed to "complete" the dark mode, but requires a lot mor= e rabbit holes, so will have to be saved for a later date: * Dark menu bar (no idea how to do this) * Dark tool bar (probably same implementation as menu bar) Feel free to debate among yourselves as to the meaning of life: * Automatically switching the faces/theme to a light/dark theme. This would= be cool but also kind of useless as most people configure their own theme = anyhow. And nearly every other editor DOES NOT do this, so I think trying t= o automatically switch user settings is pointless. Maybe add a link on the = splash screen to set your theme. * Make sure themes support dark tab bars. Most do not style it (since it is= a newer feature) so it still appears light even on a dark theme. * I do not want to implement a watcher that receives system light/dark mode= changes to dynamically update the window theme. Just restart emacs, it's n= ot a big deal. Vince Salvino -----Original Message----- From: Vince Salvino=20 Sent: Sunday, October 24, 2021 6:27 PM To: emacs-devel@gnu.org Subject: Dark mode on Windows Windows 10 has a system-wide "dark mode", which if supported by an app, can= tell the app to use dark title bars, scrollbars, etc. In a fit of rage after staring at the blinding white titlebar on my Emacs f= rame, I researched the issue and implemented "dark mode" in Emacs for Windo= ws (the rage had been building for years). Here is a work in progress, which seemingly works quite well, but needs a b= it more work. Would anyone be able to help, or possibly help get such a fea= ture merged in? See README.md in my fork: https://github.com/vsalvino/emacs=20 Vince Salvino