Added wlogout

This commit is contained in:
2025-11-11 22:47:51 -05:00
parent 55f2b15896
commit e35f7923ae
5 changed files with 117 additions and 2 deletions

View File

@@ -17,6 +17,7 @@
./stylix.nix
./vscode.nix
./wallpaper.nix
./wlogout.nix
./xdg.nix
./yazi.nix
./zsh.nix

View File

@@ -7,6 +7,7 @@
enableZshIntegration = true;
settings = {
theme = "Catppuccin Mocha";
term = "xterm-256color";
};
systemd.enable = true;
};

View File

@@ -13,6 +13,7 @@
"$mod, Q, killactive"
"$mod, W, exec, ghostty +new-window"
"$mod, S, exec, rofi -show drun -show-icons"
"$mod, Escape, exec, wlogout"
# Window Movement
"$mod, left, movefocus, l"

111
modules/home/wlogout.nix Normal file
View File

@@ -0,0 +1,111 @@
{
config,
pkgs,
...
}:
{
programs.wlogout = {
enable = true;
layout = [
{
label = "lock";
action = "loginctl lock-session";
text = "Lock";
keybind = "l";
}
{
label = "hibernate";
action = "systemctl hibernate";
text = "Hibernate";
keybind = "h";
}
{
label = "logout";
action = "loginctl terminate-user $USER";
text = "Logout";
keybind = "e";
}
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
}
{
label = "suspend";
action = "systemctl suspend";
text = "Suspend";
keybind = "u";
}
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
}
];
style = with config.lib.stylix.colors.withHashtag; ''
* {
font-family: "Rubik Light";
background-image: none;
box-shadow: none;
}
window {
background: url("${config.xdg.userDirs.extraConfig.XDG_WALLPAPERS_DIR}/lanterns_of_twilight.png");
background-size: cover;
}
button {
margin: 10px;
border-radius: 20px;
border-color: ${base0F};
text-decoration-color: ${base0F};
color: ${base0F};
background-color: alpha(${base01}, 0.5);
border-style: solid;
border-width: 2px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:focus, button:active, button:hover {
background-color: alpha(${base0F}, 0.3);
outline-style: none;
}
button:hover {
background-size: 27%;
}
button span {
font-size: 1.2em;
}
#lock {
background-image: url("${pkgs.wlogout}/share/wlogout/assets/lock.svg");
}
#logout {
background-image: url("${pkgs.wlogout}/share/wlogout/assets/logout.svg");
}
#suspend {
background-image: url("${pkgs.wlogout}/share/wlogout/assets/suspend.svg");
}
#hibernate {
background-image: url("${pkgs.wlogout}/share/wlogout/assets/hibernate.svg");
}
#shutdown {
background-image: url("${pkgs.wlogout}/share/wlogout/assets/shutdown.svg");
}
#reboot {
background-image: url("${pkgs.wlogout}/share/wlogout/assets/reboot.svg");
}
'';
};
}