Add wlogout. Hypridle config.
This commit is contained in:
parent
de81e89df6
commit
3f6c52f187
1 changed files with 96 additions and 1 deletions
|
@ -270,11 +270,102 @@ with lib; {
|
|||
|
||||
stylix.targets.hyprlock.useWallpaper = false;
|
||||
|
||||
# Logout screen.
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
|
||||
layout = [
|
||||
{
|
||||
label = "lock";
|
||||
action = "loginctl lock-session";
|
||||
text = "Lock";
|
||||
keybind = "l";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "niri msg action exit";
|
||||
text = "Logout";
|
||||
keybind = "e";
|
||||
}
|
||||
{
|
||||
label = "suspend";
|
||||
action = "systemctl suspend";
|
||||
text = "Suspend";
|
||||
keybind = "u";
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
}
|
||||
];
|
||||
|
||||
style = ''
|
||||
* {
|
||||
background-image: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: rgba(12, 12, 12, 0.6);
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
border-color: #7fbbb3;
|
||||
text-decoration-color: #d3c6aa;
|
||||
color: #d3c6aa;
|
||||
background-color: #272e33;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
}
|
||||
|
||||
button:focus, button:active, button:hover {
|
||||
outline-style: none;
|
||||
background-color: #2e383c;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("${pkgs.wleave}/share/wleave/icons/lock.svg"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("${pkgs.wleave}/share/wleave/icons/logout.svg"));
|
||||
}
|
||||
|
||||
#suspend {
|
||||
background-image: image(url("${pkgs.wleave}/share/wleave/icons/suspend.svg"));
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("${pkgs.wleave}/share/wleave/icons/shutdown.svg"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("${pkgs.wleave}/share/wleave/icons/reboot.svg"));
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# Auto-lock.
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general.lock_cmd = "hyprlock";
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "niri msg action power-on-monitors";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
|
@ -286,6 +377,10 @@ with lib; {
|
|||
timeout = 600;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 900;
|
||||
on-timeout = "niri msg action power-off-monitors";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue