framework: fix brightness scripts

This commit is contained in:
tristan 2025-04-03 18:21:13 +01:00
parent dfc0391d27
commit 3d18f696aa
3 changed files with 20 additions and 19 deletions

View file

@ -79,6 +79,11 @@
];
stylix.fonts.sizes = {
applications = 20;
desktop = 12;
terminal = 20;
};

View file

@ -1,6 +1,7 @@
{
config,
pkgs,
lib,
...
}: let
modifier = config.windowManager.modifierKey;
@ -9,6 +10,7 @@
my-deps = {
notify-send = "${pkgs.libnotify}/bin/notify-send";
playerctl = "${pkgs.playerctl}/bin/playerctl";
brightnessctl = lib.getExe pkgs.brightnessctl;
grim = "${pkgs.grim}/bin/grim";
slurp = "${pkgs.slurp}/bin/slurp";
amixer = "${pkgs.alsa-utils}/bin/amixer";
@ -103,44 +105,35 @@ in {
];
}
{
name = "brightness-down";
name = "brightness";
text = ''
light -U $1
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-down -t 1000
percent=$(${my-deps.brightnessctl} set $1 -m | awk -F, '{print $4}')
${my-deps.notify-send} "Brightness" -h "int:value:$percent" -h string:x-canonical-private-synchronous:brightness -t 3000
'';
hotkeys = [
{
modifier = "";
key = "XF86MonBrightnessDown";
args = "10";
args = "10%-";
}
{
modifier = "SHIFT";
key = "XF86MonBrightnessDown";
args = "1";
args = "1%-";
}
];
install = false;
}
{
name = "brightness-up";
text = ''
light -A $1
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-up -t 1000
'';
hotkeys = [
{
modifier = "";
key = "XF86MonBrightnessUp";
args = "10";
args = "+10%";
}
{
modifier = "SHIFT";
key = "XF86MonBrightnessUp";
args = "1";
args = "+1%";
}
];
install = false;
install = true;
}
{
name = "picker";

View file

@ -29,7 +29,10 @@ in {
boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true;
programs.nm-applet.enable = true;
programs.nm-applet = {
enable = true;
indicator = true;
};
# fix nixos-containers
networking.nat.enable = true;