mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 19:51:34 +01:00
Use systemctl sleep for automatic suspend mode selection
This commit is contained in:
parent
1b27e93c03
commit
86d31cc3c6
5 changed files with 6 additions and 17 deletions
|
|
@ -8,7 +8,6 @@
|
|||
# l = locked
|
||||
|
||||
# Variables
|
||||
$suspend = systemctl suspend${lib.optionalString config.myConfig.hibernation.enable "-then-hibernate"}
|
||||
$play-pause = playerctl --ignore-player=firefox play-pause
|
||||
$play-next = playerctl --ignore-player=firefox next
|
||||
$play-previous = playerctl --ignore-player=firefox previous
|
||||
|
|
@ -62,9 +61,9 @@
|
|||
bindrl = SUPER CONTROL, Q, exit,
|
||||
bindrl = SUPER CONTROL, P, exec, poweroff
|
||||
bindrl = SUPER CONTROL, R, exec, reboot
|
||||
${lib.optionalString config.myConfig.hibernation.enable "bindrl = SUPER CONTROL, H, exec, systemctl hibernate"}
|
||||
bindrl = SUPER CONTROL, S, exec, $suspend
|
||||
bindl = , switch:on:Lid Switch, exec, $suspend
|
||||
bindrl = SUPER CONTROL, H, exec, systemctl hibernate
|
||||
bindrl = SUPER CONTROL, S, exec, systemctl sleep
|
||||
bindl = , switch:on:Lid Switch, exec, systemctl sleep
|
||||
bindrl = SUPER CONTROL, L, exec, loginctl lock-session
|
||||
bindrl = SUPER CONTROL, B, exec, sleep 1 && hyprctl dispatch dpms off
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
}
|
||||
{
|
||||
timeout = 1800;
|
||||
on-timeout = "systemctl suspend${lib.optionalString config.myConfig.hibernation.enable "-then-hibernate"}";
|
||||
on-timeout = "systemctl sleep";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.myConfig.hibernation.enable = lib.mkEnableOption "";
|
||||
}
|
||||
|
|
@ -3,10 +3,7 @@
|
|||
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
myConfig = {
|
||||
theme = "light";
|
||||
hibernation.enable = true;
|
||||
};
|
||||
myConfig.theme = "light";
|
||||
|
||||
wayland.windowManager.hyprland.settings.monitor = [
|
||||
"eDP-1,2880x1920@120,0x0,2,vrr,1"
|
||||
|
|
|
|||
|
|
@ -4,10 +4,7 @@
|
|||
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
myConfig = {
|
||||
theme = "dark";
|
||||
hibernation.enable = true;
|
||||
};
|
||||
myConfig.theme = "dark";
|
||||
|
||||
home.packages = [
|
||||
pkgs.ffmpeg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue