refactor(hyprlock): inline command paths #162
@@ -6,11 +6,6 @@
|
|||||||
}:
|
}:
|
||||||
# The lock screen: a hyprlock session-lock surface the compositor owns.
|
# The lock screen: a hyprlock session-lock surface the compositor owns.
|
||||||
let
|
let
|
||||||
user = config.user.name;
|
|
||||||
|
|
||||||
# The hyprlock this module installs, used by the lock keybind below.
|
|
||||||
hyprlock = "${config.home-manager.users.${user}.programs.hyprlock.package}/bin/hyprlock";
|
|
||||||
|
|
||||||
sleepIcon = builtins.fromJSON ''"\udb81\udcb2"'';
|
sleepIcon = builtins.fromJSON ''"\udb81\udcb2"'';
|
||||||
sleepOffIcon = builtins.fromJSON ''"\udb81\udcb3"'';
|
sleepOffIcon = builtins.fromJSON ''"\udb81\udcb3"'';
|
||||||
|
|
||||||
@@ -48,25 +43,7 @@ in
|
|||||||
lib.mkEnableOption "the hyprlock lock screen";
|
lib.mkEnableOption "the hyprlock lock screen";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.desktop.session.hyprland.hyprlock.enable {
|
config = lib.mkIf config.modules.desktop.session.hyprland.hyprlock.enable {
|
||||||
registry.keybind.${config.networking.hostName} = {
|
home-manager.users.${config.user.name} = {
|
||||||
hyprlock-lock = {
|
|
||||||
keys = "SUPER + X";
|
|
||||||
action = {
|
|
||||||
kind = "exec";
|
|
||||||
command = "${pkgs.procps}/bin/pidof hyprlock || ${hyprlock}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
hyprlock-toggle-idle-inhibit = {
|
|
||||||
keys = "SUPER + CTRL + X";
|
|
||||||
action = {
|
|
||||||
kind = "exec";
|
|
||||||
command = "${idleLockToggle}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
|
||||||
# Colors and the lock-screen background come from Stylix's hyprlock target,
|
# Colors and the lock-screen background come from Stylix's hyprlock target,
|
||||||
# so only geometry and behaviour are set here.
|
# so only geometry and behaviour are set here.
|
||||||
programs.hyprlock = {
|
programs.hyprlock = {
|
||||||
@@ -99,7 +76,26 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
registry.keybind.${config.networking.hostName} = {
|
||||||
|
hyprlock-lock = {
|
||||||
|
keys = "SUPER + X";
|
||||||
|
action = {
|
||||||
|
kind = "exec";
|
||||||
|
# The guard drops the call when a locker is already up, so no manual
|
||||||
|
# trigger stacks a second hyprlock over the first.
|
||||||
|
command = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
hyprlock-toggle-idle-inhibit = {
|
||||||
|
keys = "SUPER + CTRL + X";
|
||||||
|
action = {
|
||||||
|
kind = "exec";
|
||||||
|
command = "${idleLockToggle}";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user