aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVagrant Cascadian <vagrant@debian.org>2019-03-24 18:01:51 -0700
committerRicardo Wurmus <rekado@elephly.net>2019-03-25 15:21:15 +0100
commitab7f1eb97abd49676f8e98e35e861f9785f0c2b2 (patch)
tree6448dc668ad70599b34b148f3fe9f75884696766
parent80eb01c7763e99603dac6c1e4ad41f521fed5c26 (diff)
downloadguix-ab7f1eb97abd49676f8e98e35e861f9785f0c2b2.tar
guix-ab7f1eb97abd49676f8e98e35e861f9785f0c2b2.tar.gz
gnu: Add brightnessctl.
* gnu/packages/linux.scm (brightnessctl): New variable. Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
-rw-r--r--gnu/packages/linux.scm39
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index cd1f069a13..404cd63dbb 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4304,6 +4304,45 @@ set the screen to be pitch black at a vaĺue of 0 (or higher).
Light is the successor of lightscript.")
(license license:gpl3+)))
+(define-public brightnessctl
+ (let ((commit "6a791e7694aeeb5d027f71c6098e5182cf03371c"))
+ (package
+ (name "brightnessctl")
+ (version (git-version "0.4" "0" commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Hummer12007/brightnessctl/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ; no tests
+ #:make-flags (list "CC=gcc"
+ (string-append "PREFIX=" %output)
+ (string-append "UDEVDIR=" %output "/lib/udev/rules.d/"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'adjust-udev-rules
+ (lambda _
+ (substitute* "90-brightnessctl.rules"
+ (("/bin/") "/run/current-system/profile/bin/"))
+ #t)))))
+ (home-page "https://github.com/Hummer12007/brightnessctl")
+ (synopsis "Backlight and LED brightness control")
+ (description
+ "This program allows you read and control device brightness. Devices
+include backlight and LEDs. It can also preserve current brightness before
+applying the operation, such as on lid close.
+
+The appropriate permissions must be set on the backlight or LED control
+interface in sysfs, which can be accomplished with the included udev rules.")
+ (license license:expat))))
+
(define-public tlp
(package
(name "tlp")