📦 Moved more configs to common files, and refactored code with common

This commit is contained in:
2025-01-08 19:47:02 +01:00
parent 57ebb73095
commit 89acd3e5cb
15 changed files with 317 additions and 243 deletions

View File

@ -1,15 +1,17 @@
# Log out and shutdown menu
{ ... }:
{
home.file = {
".config/wlogout/hibernate.svg".source = ./hibernate.svg;
".config/wlogout/lock.svg".source = ./lock.svg;
".config/wlogout/logout.svg".source = ./logout.svg;
".config/wlogout/reboot.svg".source = ./reboot.svg;
".config/wlogout/shutdown.svg".source = ./shutdown.svg;
".config/wlogout/suspend.svg".source = ./suspend.svg;
};
home.file =
let
dir = ".config/wlogout";
in
{
"${dir}/hibernate.svg".source = ./hibernate.svg;
"${dir}/lock.svg".source = ./lock.svg;
"${dir}/logout.svg".source = ./logout.svg;
"${dir}/reboot.svg".source = ./reboot.svg;
"${dir}/shutdown.svg".source = ./shutdown.svg;
"${dir}/suspend.svg".source = ./suspend.svg;
};
programs.wlogout = {
enable = true;
@ -51,6 +53,64 @@
keybind = "r";
}
];
style = ./style.css;
style =
let
theme = import ../../theme.nix;
in
''
* {
background-image: none;
box-shadow: none;
}
window {
background-color: rgba(30, 30, 46, 0.9);
}
button {
border-radius: 0;
border-color: #${theme.pinkAlpha};
text-decoration-color: #${theme.textAlpha};
color: #${theme.textAlpha};
background-color: #${theme.mantleAlpha};
border-style: solid;
border-width: 1px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:focus,
button:active,
button:hover {
/* 20% Overlay 2, 80% mantle */
background-color: rgb(48, 50, 66);
outline-style: none;
}
#lock {
background-image: url("./lock.svg");
}
#logout {
background-image: url("./logout.svg");
}
#suspend {
background-image: url("./suspend.svg");
}
#hibernate {
background-image: url("./hibernate.svg");
}
#shutdown {
background-image: url("./shutdown.svg");
}
#reboot {
background-image: url("./reboot.svg");
}
'';
};
}