added autobrightness to Lenni
This commit is contained in:
parent
d4bcb07147
commit
92c74027d8
1 changed files with 10 additions and 2 deletions
|
@ -1,6 +1,10 @@
|
||||||
{ inputs, lib, config, pkgs, ... }:
|
{ inputs, lib, config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
SCRIPTS = "$XDG_CONFIG_HOME/desktop-utils/scripts";
|
SCRIPTS = "$XDG_CONFIG_HOME/desktop-utils/scripts";
|
||||||
|
autobrightness = fetchTarball {
|
||||||
|
url = "https://git.huwe.mooo.com/willifan/Mac-like-automatic-brightness/archive/0.1.0.tar.gz";
|
||||||
|
sha256 = "1andyln5vmm934nl1lsid2gpc88h9il83b84yd9dmqr7pninwk37";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
lib.mkIf config.desktop.wm.niri.enable {
|
lib.mkIf config.desktop.wm.niri.enable {
|
||||||
|
|
||||||
|
@ -14,6 +18,7 @@ lib.mkIf config.desktop.wm.niri.enable {
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.xwayland-satellite
|
pkgs.xwayland-satellite
|
||||||
|
pkgs.bc
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.niri.settings = {
|
programs.niri.settings = {
|
||||||
|
@ -26,6 +31,9 @@ lib.mkIf config.desktop.wm.niri.enable {
|
||||||
{
|
{
|
||||||
command = [ "xwayland-satellite" ":0" ];
|
command = [ "xwayland-satellite" ":0" ];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
command = [ "sh" "${autobrightness}/AutomaticBrightness.sh" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
hotkey-overlay.skip-at-startup = true;
|
hotkey-overlay.skip-at-startup = true;
|
||||||
|
@ -77,8 +85,8 @@ lib.mkIf config.desktop.wm.niri.enable {
|
||||||
"XF86AudioPrev".action.spawn = [ "playerctl" "previous" ];
|
"XF86AudioPrev".action.spawn = [ "playerctl" "previous" ];
|
||||||
"XF86AudioPlay".action.spawn = [ "playerctl" "play-pause" ];
|
"XF86AudioPlay".action.spawn = [ "playerctl" "play-pause" ];
|
||||||
"XF86AudioNext".action.spawn = [ "playerctl" "next" ];
|
"XF86AudioNext".action.spawn = [ "playerctl" "next" ];
|
||||||
"XF86MonBrightnessDown".action.spawn = [ "light" "-U" "5" ];
|
"XF86MonBrightnessDown".action.spawn = [ "sh" "${autobrightness}/AutomaticBrightness.sh" "-d" "10" ];
|
||||||
"XF86MonBrightnessUp".action.spawn = [ "light" "-A" "5" ];
|
"XF86MonBrightnessUp".action.spawn = [ "sh" "${autobrightness}/AutomaticBrightness.sh" "-i" "10" ];
|
||||||
"Print".action.screenshot = { };
|
"Print".action.screenshot = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue