framework: fix brightness scripts
This commit is contained in:
parent
dfc0391d27
commit
3d18f696aa
3 changed files with 20 additions and 19 deletions
|
|
@ -79,6 +79,11 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
stylix.fonts.sizes = {
|
||||||
|
applications = 20;
|
||||||
|
desktop = 12;
|
||||||
|
terminal = 20;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
modifier = config.windowManager.modifierKey;
|
modifier = config.windowManager.modifierKey;
|
||||||
|
|
@ -9,6 +10,7 @@
|
||||||
my-deps = {
|
my-deps = {
|
||||||
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
|
brightnessctl = lib.getExe pkgs.brightnessctl;
|
||||||
grim = "${pkgs.grim}/bin/grim";
|
grim = "${pkgs.grim}/bin/grim";
|
||||||
slurp = "${pkgs.slurp}/bin/slurp";
|
slurp = "${pkgs.slurp}/bin/slurp";
|
||||||
amixer = "${pkgs.alsa-utils}/bin/amixer";
|
amixer = "${pkgs.alsa-utils}/bin/amixer";
|
||||||
|
|
@ -103,44 +105,35 @@ in {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "brightness-down";
|
name = "brightness";
|
||||||
text = ''
|
text = ''
|
||||||
light -U $1
|
percent=$(${my-deps.brightnessctl} set $1 -m | awk -F, '{print $4}')
|
||||||
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-down -t 1000
|
|
||||||
|
${my-deps.notify-send} "Brightness" -h "int:value:$percent" -h string:x-canonical-private-synchronous:brightness -t 3000
|
||||||
'';
|
'';
|
||||||
hotkeys = [
|
hotkeys = [
|
||||||
{
|
{
|
||||||
modifier = "";
|
modifier = "";
|
||||||
key = "XF86MonBrightnessDown";
|
key = "XF86MonBrightnessDown";
|
||||||
args = "10";
|
args = "10%-";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
modifier = "SHIFT";
|
modifier = "SHIFT";
|
||||||
key = "XF86MonBrightnessDown";
|
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 = "";
|
modifier = "";
|
||||||
key = "XF86MonBrightnessUp";
|
key = "XF86MonBrightnessUp";
|
||||||
args = "10";
|
args = "+10%";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
modifier = "SHIFT";
|
modifier = "SHIFT";
|
||||||
key = "XF86MonBrightnessUp";
|
key = "XF86MonBrightnessUp";
|
||||||
args = "1";
|
args = "+1%";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
install = false;
|
install = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "picker";
|
name = "picker";
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,10 @@ in {
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
programs.nm-applet.enable = true;
|
programs.nm-applet = {
|
||||||
|
enable = true;
|
||||||
|
indicator = true;
|
||||||
|
};
|
||||||
|
|
||||||
# fix nixos-containers
|
# fix nixos-containers
|
||||||
networking.nat.enable = true;
|
networking.nat.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue