This commit is contained in:
parent
9c6c02bc69
commit
9ccc3dadf3
2 changed files with 34 additions and 1 deletions
|
|
@ -21,6 +21,11 @@
|
||||||
boot.loader.systemd-boot.configurationLimit = 5;
|
boot.loader.systemd-boot.configurationLimit = 5;
|
||||||
boot.initrd.systemd.enable = true;
|
boot.initrd.systemd.enable = true;
|
||||||
|
|
||||||
|
services.logind = {
|
||||||
|
lidSwitch = "suspend";
|
||||||
|
lidSwitchExternalPower = "suspend";
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.fred = { ... }: {
|
home-manager.users.fred = { ... }: {
|
||||||
wayland.windowManager.hyprland.settings.monitor =
|
wayland.windowManager.hyprland.settings.monitor =
|
||||||
[ ",preferred,auto,auto" ];
|
[ ",preferred,auto,auto" ];
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ in
|
||||||
"wl-paste --type text --watch cliphist store"
|
"wl-paste --type text --watch cliphist store"
|
||||||
"wl-paste --type image --watch cliphist store"
|
"wl-paste --type image --watch cliphist store"
|
||||||
"hyprctl setcursor Bibata-Modern-Ice 24"
|
"hyprctl setcursor Bibata-Modern-Ice 24"
|
||||||
];
|
] ++ lib.optionals isMacbook [ "hypridle" ];
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
gaps_in = 6;
|
gaps_in = 6;
|
||||||
|
|
@ -373,6 +373,34 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.hyprlock.enable = true;
|
||||||
|
|
||||||
|
services.hypridle = lib.mkIf isMacbook {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
lock_cmd = "pidof hyprlock || hyprlock";
|
||||||
|
before_sleep_cmd = "loginctl lock-session";
|
||||||
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
|
};
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 300; # 5 min — lock
|
||||||
|
on-timeout = "loginctl lock-session";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 420; # 7 min — display off
|
||||||
|
on-timeout = "hyprctl dispatch dpms off";
|
||||||
|
on-resume = "hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 600; # 10 min — suspend
|
||||||
|
on-timeout = "systemctl suspend";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Scope all HM Wayland services (hyprpaper, waybar, …) to the
|
# Scope all HM Wayland services (hyprpaper, waybar, …) to the
|
||||||
# Hyprland session so they don't crash-loop in a GNOME session.
|
# Hyprland session so they don't crash-loop in a GNOME session.
|
||||||
wayland.systemd.target = "hyprland-session.target";
|
wayland.systemd.target = "hyprland-session.target";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue