mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 22:29:06 +01:00
hyprland/noctalia: Use hypridle for idle management
This commit is contained in:
parent
ed5b3adf2d
commit
0b09699cc5
4 changed files with 26 additions and 8 deletions
|
|
@ -18,8 +18,11 @@
|
|||
|
||||
services = {
|
||||
wpaperd.enable = true;
|
||||
hypridle.enable = true;
|
||||
cliphist.enable = true;
|
||||
hypridle = {
|
||||
enable = true;
|
||||
lockCommand = "pidof hyprlock || hyprlock";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,13 @@
|
|||
noctalia-shell.enable = true;
|
||||
};
|
||||
|
||||
services.cliphist.enable = true;
|
||||
services = {
|
||||
cliphist.enable = true;
|
||||
hypridle = {
|
||||
enable = true;
|
||||
lockCommand = "noctalia-shell ipc call lockScreen lock";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [ pkgs.grimblast ];
|
||||
|
|
@ -35,8 +41,8 @@
|
|||
bind = SUPER, V, exec, $ipc launcher clipboard
|
||||
|
||||
# Manage session
|
||||
bindrl = SUPER CONTROL, L, exec, $ipc lockScreen lock
|
||||
bindrl = SUPER CONTROL, S, exec, $ipc sessionMenu lockAndSuspend
|
||||
bindrl = SUPER CONTROL, L, exec, loginctl lock-session
|
||||
bindrl = SUPER CONTROL, S, exec, systemctl sleep
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
largeButtonsStyle = false;
|
||||
countdownDuration = 3000;
|
||||
};
|
||||
idle.enabled = true;
|
||||
idle.enabled = false;
|
||||
audio.mprisBlacklist = [ "firefox" ];
|
||||
network.bluetoothAutoConnect = false;
|
||||
location = {
|
||||
|
|
|
|||
|
|
@ -4,17 +4,26 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.services.hypridle;
|
||||
in
|
||||
{
|
||||
options.custom.services.hypridle.enable = lib.mkEnableOption "";
|
||||
options.custom.services.hypridle = {
|
||||
enable = lib.mkEnableOption "";
|
||||
lockCommand = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.custom.services.hypridle.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.hypridle;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = lib.mkIf config.custom.programs.hyprlock.enable "pidof hyprlock || hyprlock";
|
||||
lock_cmd = cfg.lockCommand;
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue