small cleanup
This commit is contained in:
parent
6827157ab0
commit
44a8030c0f
1 changed files with 19 additions and 21 deletions
|
@ -4,27 +4,25 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.udev = {
|
||||
extraRules = let
|
||||
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
|
||||
services.udev.extraRules = let
|
||||
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
|
||||
|
||||
power_supply = pkgs.writeShellScript "on_power_supply" ''
|
||||
${pkgs.asusctl}/bin/asusctl profile -P Performance
|
||||
#${pkgs.supergfxctl}/bin/supergfxctl -m Hybrid
|
||||
${config.boot.kernelPackages.cpupower}/bin/cpupower frequency-set -g performance
|
||||
${hyprland}/bin/hyprctl keyword decoration:blur:enabled true
|
||||
${hyprland}/bin/hyprctl keyword animations:enabled true
|
||||
'';
|
||||
battery = pkgs.writeShellScript "on_battery" ''
|
||||
${pkgs.asusctl}/bin/asusctl profile -P Quiet
|
||||
#${pkgs.supergfxctl}/bin/supergfxctl -m Integrated
|
||||
${config.boot.kernelPackages.cpupower}/bin/cpupower frequency-set -g powersave
|
||||
${hyprland}/bin/hyprctl keyword decoration:blur:enabled false
|
||||
${hyprland}/bin/hyprctl keyword animations:enabled false
|
||||
'';
|
||||
in ''
|
||||
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="1",RUN+="${power_supply}"
|
||||
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="0",RUN+="${battery}"
|
||||
power_supply = pkgs.writeShellScript "on_power_supply" ''
|
||||
${pkgs.asusctl}/bin/asusctl profile -P Performance
|
||||
#${pkgs.supergfxctl}/bin/supergfxctl -m Hybrid
|
||||
${config.boot.kernelPackages.cpupower}/bin/cpupower frequency-set -g performance
|
||||
${hyprland}/bin/hyprctl keyword decoration:blur:enabled true
|
||||
${hyprland}/bin/hyprctl keyword animations:enabled true
|
||||
'';
|
||||
};
|
||||
battery = pkgs.writeShellScript "on_battery" ''
|
||||
${pkgs.asusctl}/bin/asusctl profile -P Quiet
|
||||
#${pkgs.supergfxctl}/bin/supergfxctl -m Integrated
|
||||
${config.boot.kernelPackages.cpupower}/bin/cpupower frequency-set -g powersave
|
||||
${hyprland}/bin/hyprctl keyword decoration:blur:enabled false
|
||||
${hyprland}/bin/hyprctl keyword animations:enabled false
|
||||
'';
|
||||
in ''
|
||||
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="1",RUN+="${power_supply}"
|
||||
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="0",RUN+="${battery}"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue