Added wallpaper and styling to greetd

This commit is contained in:
Erwin Boskma 2022-07-03 22:43:40 +02:00
parent 8d3907f9dd
commit 6b6a32a661
Signed by: erwin
GPG key ID: 270B20D17394F7E5
2 changed files with 19 additions and 1 deletions

View file

@ -5,6 +5,8 @@
}:
with lib; let
cfg = config.eboskma.greetd;
style = builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString ../../home-manager/modules/sway/wallpapers/river-2560.png) ] (builtins.readFile ./greetd.css);
in
{
options.eboskma.greetd = {
@ -29,7 +31,7 @@ in
"greetd/sway-config" = {
text = ''
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css; swaymsg exit"
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
@ -48,6 +50,11 @@ in
user = "greeter";
group = "greeter";
};
"greetd/gtkgreet.css" = {
text = style;
user = "greeter";
group = "greeter";
};
"sway/config.d/systemd-env.conf" = {
text = ''
exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK

11
modules/greetd/greetd.css Normal file
View file

@ -0,0 +1,11 @@
window {
background-image: url("file://{WALLPAPER}");
background-size: cover;
background-position: center;
}
box#body {
background-color: rgba(50, 50, 50, 0.5);
border-radius: 10px;
padding: 50px;
}