framework: fix brightness scripts
This commit is contained in:
parent
dfc0391d27
commit
3d18f696aa
3 changed files with 20 additions and 19 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue