replace swaylock with nova-shell lock
This commit is contained in:
parent
3c8024045e
commit
4c82ecd2b9
5 changed files with 42 additions and 42 deletions
|
|
@ -12,7 +12,8 @@
|
|||
./podman.nix
|
||||
./ssh.nix
|
||||
./starship.nix
|
||||
./swaylock.nix
|
||||
./swayidle.nix
|
||||
#./swaylock.nix
|
||||
#./swaync.nix
|
||||
./vscode.nix
|
||||
# ./waybar.nix
|
||||
|
|
@ -52,8 +53,10 @@
|
|||
nova-shell = {
|
||||
enable = true;
|
||||
theme = {
|
||||
fontSize = 13;
|
||||
fontSize = 14;
|
||||
};
|
||||
#modules.backgroundOverlay.enable = false;
|
||||
#modules.screenCorners.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -402,6 +402,11 @@
|
|||
|
||||
"Mod+W".action.toggle-column-tabbed-display = { };
|
||||
"Mod+O".action.toggle-overview = { };
|
||||
|
||||
"Super+Alt+L" = {
|
||||
action.spawn = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
27
homeConfigurations/muede/swayidle.nix
Normal file
27
homeConfigurations/muede/swayidle.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.swayidle =
|
||||
let
|
||||
lock-command = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
systemdTarget = "graphical-session.target";
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 30;
|
||||
command = lock-command;
|
||||
}
|
||||
{
|
||||
timeout = 60 * 10;
|
||||
command = "${pkgs.systemd}/bin/systemctl suspend";
|
||||
}
|
||||
];
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.playerctl}/bin/playerctl pause; ${lock-command}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +1,5 @@
|
|||
# based on https://codeberg.org/kiara/cfg/src/commit/b9c472acd78c9c08dfe8b6a643c5c82cc5828433/home-manager/kiara/swaylock.nix#
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
stylix.targets.swaylock = {
|
||||
enable = true;
|
||||
|
|
@ -30,34 +25,4 @@
|
|||
indicator-thickness = 20;
|
||||
};
|
||||
};
|
||||
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
systemdTarget = "graphical-session.target";
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 5;
|
||||
command = "${config.programs.swaylock.package}/bin/swaylock";
|
||||
}
|
||||
{
|
||||
timeout = 60 * 10;
|
||||
command = "${pkgs.systemd}/bin/systemctl suspend";
|
||||
}
|
||||
];
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.playerctl}/bin/playerctl pause; ${config.programs.swaylock.package}/bin/swaylock";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${config.programs.swaylock.package}/bin/swaylock";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.niri.settings.binds."Super+Alt+L" = {
|
||||
action.spawn = "${lib.getBin config.programs.swaylock.package}/bin/swaylock";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue