summaryrefslogtreecommitdiff
path: root/overlays
diff options
context:
space:
mode:
Diffstat (limited to 'overlays')
-rw-r--r--overlays/avizo/default.nix7
-rw-r--r--overlays/avizo/min-value.patch38
2 files changed, 45 insertions, 0 deletions
diff --git a/overlays/avizo/default.nix b/overlays/avizo/default.nix
new file mode 100644
index 00000000..f89f7a8a
--- /dev/null
+++ b/overlays/avizo/default.nix
@@ -0,0 +1,7 @@
1{ prev, ... }: {
2 avizo = prev.avizo.overrideAttrs (oldAttrs: {
3 patches = (oldAttrs.patches or []) ++ [
4 ./min-value.patch
5 ];
6 });
7}
diff --git a/overlays/avizo/min-value.patch b/overlays/avizo/min-value.patch
new file mode 100644
index 00000000..629fe3ed
--- /dev/null
+++ b/overlays/avizo/min-value.patch
@@ -0,0 +1,38 @@
1diff --git a/lightctl b/lightctl
2index f5333ae..6a68aef 100755
3--- a/lightctl
4+++ b/lightctl
5@@ -16,6 +16,7 @@
6 #
7 # Options:
8 # -e <exponent> Change percentage curve to exponential (only for brightnessctl).
9+# -n <min_value> Set minimum value (only for brightnessctl).
10 # -D <device> Specify the device name.
11 # -M <monitornr> Set monitor where notification will be shown.
12 # -d Show dark theme friendly variant of the icon
13@@ -47,13 +48,15 @@ is_float() {
14 }
15
16 exp=
17+min=
18 dev=
19 optind=1
20 dark=0
21 monitor=-1
22-while getopts ':e:D:h:M:d' OPT; do
23+while getopts ':e:n:D:h:M:d' OPT; do
24 case "$OPT" in
25 e) exp=$OPTARG;;
26+ n) min=$OPTARG;;
27 D) dev=$OPTARG;;
28 h) help; exit 0;;
29 M) monitor="$OPTARG";;
30@@ -96,7 +99,7 @@ esac
31 if command -v brightnessctl >/dev/null; then
32 prog='brightnessctl'
33 opts="${dev:+-d $dev}"
34- out=$(brightnessctl $opts ${exp:+-e$exp} -m set "${value}%${cmd}")
35+ out=$(brightnessctl $opts ${exp:+-e$exp} ${min:+-n$min} -m set "${value}%${cmd}")
36 light=$(printf '%s\n' "$out" | cut -d, -f4)
37 light=${light%\%}
38