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 13:22:23 -0600 Message-ID: <20190615132223.5f11e270@gmail.com> References: <20190615110054.358ca451@gmail.com> <87muiiwxz3.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]:52773) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcEFz-0007UH-5y for help-guix@gnu.org; Sat, 15 Jun 2019 15:22:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcEFx-0007h0-7t for help-guix@gnu.org; Sat, 15 Jun 2019 15:22:31 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:32847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcEFx-0007gH-2O for help-guix@gnu.org; Sat, 15 Jun 2019 15:22:29 -0400 Received: by mail-pg1-x533.google.com with SMTP id k187so3497907pga.0 for ; Sat, 15 Jun 2019 12:22:29 -0700 (PDT) In-Reply-To: <87muiiwxz3.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 19:41:13 +0200 Tobias Geerinckx-Rice wrote: > Jesse, >=20 > Jesse Gibbons wrote: > > My Librem 13 laptop battery lasts much longer with a lower=20 > > screen > > brightness. When it runs gnome on guix (and I haven't tried any=20 > > other > > de) I have to turn down the brightness every time. This is not=20 > > so with > > my other partition running PureOS. Is there a way to configure a > > default screen brightness in guix/gnome? =20 >=20 > Guix doesn't have a notion of =E2=80=98default=E2=80=99 screen brightness= because=20 > it doesn't know anything about brightness. >=20 > My guess is that PureOS uses systemd; systemd provides a=20 > backlight.service that reads the backlight brightness at shutdown,=20 > stores it to disc, and writes that value back to the device at=20 > next start-up. >=20 > It would be a relatively trivial service to add, but that hasn't=20 > been done yet :-) >=20 > We do already provide a simple, script-friendly abstraction tool=C2=B9: >=20 > $ guix install light > $ sudo light -S 50 # percentage >=20 > It can even run setuid. >=20 > Kind regards, >=20 > T G-R >=20 > [1]: As opposed to manually reading and writing `find /sys -path=20 > *backlight*brightness*`. Thanks. I think I can add a service using the `light` tool. Administrators will likely prefer to install it on anything with a display that runs on battery power, so I might contribute it in gnu/services/pm.scm if nobody beats me to it. -Jesse