summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2024-08-16 22:44:45 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2024-08-16 22:44:45 +0200
commit21311806407ac301702996a4658c1dee2bf5f80e (patch)
treebd00318d641bcf83c341351f50f6b8869f3ad4b2
parent12793fd839de4353df35690faaadbdf9c43f29f6 (diff)
downloadnixos-21311806407ac301702996a4658c1dee2bf5f80e.tar
nixos-21311806407ac301702996a4658c1dee2bf5f80e.tar.gz
nixos-21311806407ac301702996a4658c1dee2bf5f80e.tar.bz2
nixos-21311806407ac301702996a4658c1dee2bf5f80e.tar.xz
nixos-21311806407ac301702996a4658c1dee2bf5f80e.zip
...
-rw-r--r--accounts/gkleen@sif/default.nix4
-rw-r--r--accounts/gkleen@sif/hyprland.nix4
-rw-r--r--overlays/avizo/default.nix7
-rw-r--r--overlays/avizo/min-value.patch38
4 files changed, 49 insertions, 4 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix
index 4913b244..47d2212b 100644
--- a/accounts/gkleen@sif/default.nix
+++ b/accounts/gkleen@sif/default.nix
@@ -427,8 +427,8 @@ in {
427 icon-size = iconSize; 427 icon-size = iconSize;
428 tooltip-format = "{percent}%"; 428 tooltip-format = "{percent}%";
429 format-icons = ["&#xf00da;" "&#xf00db;" "&#xf00dc;" "&#xf00dd;" "&#xf00de;" "&#xf00df;" "&#xf00e0;"]; 429 format-icons = ["&#xf00da;" "&#xf00db;" "&#xf00dc;" "&#xf00dd;" "&#xf00de;" "&#xf00df;" "&#xf00e0;"];
430 on-scroll-up = "lightctl -d up"; 430 on-scroll-up = "lightctl -d -e4 -n1 up";
431 on-scroll-down = "lightctl -d down"; 431 on-scroll-down = "lightctl -d -e4 -n1 down";
432 }; 432 };
433 wireplumber = { 433 wireplumber = {
434 format = "<span font=\"Symbols Nerd Font Mono\" size=\"90%\">{icon}</span>"; 434 format = "<span font=\"Symbols Nerd Font Mono\" size=\"90%\">{icon}</span>";
diff --git a/accounts/gkleen@sif/hyprland.nix b/accounts/gkleen@sif/hyprland.nix
index 0c7f19cb..23cbc972 100644
--- a/accounts/gkleen@sif/hyprland.nix
+++ b/accounts/gkleen@sif/hyprland.nix
@@ -178,8 +178,8 @@ in {
178 178
179 "$mainMod ALT, E, exec, emacsclient -c" 179 "$mainMod ALT, E, exec, emacsclient -c"
180 180
181 ", XF86MonBrightnessUp, exec, lightctl -d up" 181 ", XF86MonBrightnessUp, exec, lightctl -d -e4 -n1 up"
182 ", XF86MonBrightnessDown, exec, lightctl -d down" 182 ", XF86MonBrightnessDown, exec, lightctl -d -e4 -n1 down"
183 ", XF86AudioRaiseVolume, exec, volumectl -d -u up" 183 ", XF86AudioRaiseVolume, exec, volumectl -d -u up"
184 ", XF86AudioLowerVolume, exec, volumectl -d -u down" 184 ", XF86AudioLowerVolume, exec, volumectl -d -u down"
185 ", XF86AudioMute, exec, volumectl -d toggle-mute" 185 ", XF86AudioMute, exec, volumectl -d toggle-mute"
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