diff options
author | Marc Coquand <marc@mccd.space> | 2024-11-26 11:05:50 +0200 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-11-26 11:05:50 +0200 |
commit | d555a9c6bb8f224ac32f3d26c482fa78d3891511 (patch) | |
tree | 4561ba36c2bec9542b58cc0d0b6236a1edeaa61f /os/custom | |
parent | f2267f63134432923e9e7a7ad900532bec6a5bd6 (diff) | |
download | guix-main.tar.gz guix-main.tar.bz2 guix-main.zip |
Diffstat (limited to 'os/custom')
-rwxr-xr-x | os/custom/caps-brightness | 2 | ||||
-rw-r--r-- | os/custom/caps-brightness.scm | 31 |
2 files changed, 33 insertions, 0 deletions
diff --git a/os/custom/caps-brightness b/os/custom/caps-brightness new file mode 100755 index 0000000..4556c33 --- /dev/null +++ b/os/custom/caps-brightness @@ -0,0 +1,2 @@ +#!/bin/sh +setleds -D +caps < /dev/console diff --git a/os/custom/caps-brightness.scm b/os/custom/caps-brightness.scm new file mode 100644 index 0000000..dbae748 --- /dev/null +++ b/os/custom/caps-brightness.scm @@ -0,0 +1,31 @@ +(define-module (caps-brightness) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix build-system trivial) + #:use-module (gnu packages bash)) + +(define-public caps-brightness + (let ((script-name "caps-brightness")) + (package + (name script-name) + (version "0.1") + (source (local-file "/home/mccd/system/os/custom/caps-brightness")) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((bin-dir (string-append %output "/bin")) + (bin-file (string-append bin-dir "/" ,script-name)) + (bash-bin (string-append (assoc-ref %build-inputs "bash") + "/bin"))) + (mkdir-p bin-dir) + (copy-file (assoc-ref %build-inputs "source") bin-file) + (patch-shebang bin-file (list bash-bin)) + (chmod bin-file #o555))))) + (inputs `(("bash" ,bash))) + (home-page #f) + (synopsis "Set capslock brightness to $1") + (description "Set capslock brightness to $1") + (license #f)))) |