From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Gibbons Subject: Re: How to set default screen brightness? Date: Sat, 15 Jun 2019 17:03:29 -0600 Message-ID: <20190615170329.6dca1038@gmail.com> References: <20190615110054.358ca451@gmail.com> <87muiiwxz3.fsf@nckx> <20190615132223.5f11e270@gmail.com> <87ftoawp65.fsf@nckx> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34376) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcHhw-00020W-Ai for help-guix@gnu.org; Sat, 15 Jun 2019 19:03:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcHht-0002PN-D8 for help-guix@gnu.org; Sat, 15 Jun 2019 19:03:35 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:46644) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcHhs-0002O9-Ph for help-guix@gnu.org; Sat, 15 Jun 2019 19:03:33 -0400 Received: by mail-pl1-x632.google.com with SMTP id e5so2519817pls.13 for ; Sat, 15 Jun 2019 16:03:32 -0700 (PDT) In-Reply-To: <87ftoawp65.fsf@nckx> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Tobias Geerinckx-Rice Cc: help-guix@gnu.org On Sat, 15 Jun 2019 22:48:18 +0200 Tobias Geerinckx-Rice wrote: > Jesse, >=20 > Jesse Gibbons wrote: > > Thanks. I think I can add a service using the `light` tool. =20 >=20 > Yeah, I currently call it from my .xsession, which is horrible=E2=80=A6 > A proper service would be most welcome. >=20 > > Administrators will likely prefer to install it on anything with=20 > > a > > display that runs on battery power, so I might contribute it in > > gnu/services/pm.scm =20 >=20 > Ew. We actually have that poorly-named file :-( I agree the filename is cringeworthy. Unfortunatley it will be difficult to change the file name now because it will break a lot of end-user OS definitions and documentation. >=20 > > if nobody beats me to it. =20 >=20 > Go for it! >=20 > I still wonder whether it would be possible (and worth it) to do=20 > this without external dependencies (i.e. basically reimplementing=20 > =E2=80=98light=E2=80=99 in Scheme), so I won't be stepping directly on yo= ur toes=20 > in the meantime. It would be nice to script the commands in shepherd. All it needs to do is read/write the value in the hardware either using syscalls or in a virtual file it finds in /sys, and keep track of the value in a designated location (something like /etc/light.d/backlight) when the daemon is started/stopped, correct? The only potential problem I see is it probably wouldn't work on a non-linux kernel like hurd or bsd; that can be fixed when the need arises. > Kind regards, >=20 > T G-R