fix: hyprlock is broken on asahi kernel, replace it with swaylock

This commit is contained in:
Ryan Yin
2025-08-05 16:00:26 +08:00
parent 1ef015cb16
commit 09a01ff947
4 changed files with 6 additions and 5 deletions

View File

@@ -134,6 +134,6 @@ bind = $mod, Print, exec, hyprshot -m window -o ~/Pictures/Screenshot
bind = CTRL, Print, exec, hyprshot -m region -o ~/Pictures/Screenshots
# -- Others --
bind = CTRL ALT, l, exec, hyprlock
bind = CTRL ALT, l, exec, swaylock
bind = $mod SHIFT, x, exec, wlogout
bind = $mod, n, exec, nm-connection-editor # need install network-manager-applet

View File

@@ -1,6 +1,6 @@
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple instances
lock_cmd = pidof swaylock || swaylock # avoid starting multiple instances
before_sleep_cmd = loginctl lock-session # lock before suspend
after_sleep_cmd = hyprctl dispatch dpms on # resume dpms after suspend
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests
@@ -21,7 +21,7 @@ general {
listener {
timeout = 1200 # 20 minutes
on-timeout = pidof hyprlock || hyprlock # lock screen
on-timeout = pidof swaylock || swaylock # lock screen
on-resume = hyprctl dispatch dpms on # monitor wake up
}

View File

@@ -1,5 +1,6 @@
{
pkgs,
pkgs-stable,
config,
...
}:
@@ -29,7 +30,7 @@ in
catppuccin.waybar.enable = false;
# screen locker
programs.hyprlock.enable = true;
programs.swaylock.enable = true;
# Logout Menu
programs.wlogout.enable = true;

View File

@@ -47,7 +47,7 @@ in
};
# fix https://github.com/ryan4yin/nix-config/issues/10
security.pam.services.hyprlock = { };
security.pam.services.swaylock = { };
})
];
}