This commit is contained in:
2026-04-09 11:16:48 -05:00
parent 76a5bf5917
commit f4b032e96f
23 changed files with 274 additions and 160 deletions

View File

@@ -26,9 +26,64 @@
};
aurora-greeter-hypr-conf = pkgs.writeText "greeter-conf" ''
exec-once=${self.packages.${system}.aurora-greeter}/bin/aurora-greeter
exec-once=${self'.packages.aurora-set-wallpaper}/bin/aurora-set-wallpaper
exec-once=${self'.packages.aurora-greeter}/bin/aurora-greeter
'';
aurora-change-colors = (pkgs.writeShellScriptBin "aurora-change-colors" ''
img=''$(realpath "''$1")
alpha=''${2:-80}
if [[ ''$alpha -lt 0 ]]; then
alpha=0
elif [[ ''$alpha -gt 100 ]]; then
alpha=100
fi
if [[ -f ~/.config/wal/colorschemes/dark/''$(basename "''$img")-''$alpha.json ]]; then
${pkgs.pywal16}/bin/wal -n -f "''$(basename "''$img")-''$alpha"
else
${pkgs.pywal16}/bin/wal -n -i "''$img" -a "''$alpha" --cols16 -p "''$(basename "''$img")-''$alpha"
fi
'');
aurora-set-wallpaper = (pkgs.writeShellScriptBin "aurora-set-wallpaper" ''
if [[ ! -d /tmp/aurora/wallpaper ]]; then
mkdir -p /tmp/aurora/wallpaper
fi
src=''$(realpath "''${1:-$(find /tmp/aurora/wallpaper/*)}")
n=''$(basename "''$src")
ext="''${n''\#''\#*.}"
out=''${3:-/dev/null}
if [[ ! -z $1 ]]; then
rm -rf /tmp/aurora/wallpaper/*
cp ''$src /tmp/aurora/wallpaper/wallpaper.$ext
chmod 666 /tmp/aurora/wallpaper/wallpaper.$ext
fi
img="/tmp/aurora/wallpaper/wallpaper.$ext"
if [[ ''$ext == "gif" || ''$ext == "mp4" ]]; then
yes | ${pkgs.ffmpeg}/bin/ffmpeg -i "''$img" -vframes 1 /tmp/aurora/tmp.jpg >> ''$out
pidof mpvpaper >> $out && pkill mpvpaper
${pkgs.swww}/bin/swww img /tmp/aurora/tmp.jpg -t wipe >> ''$out
sleep 0.6
hyprctl dispatch exec "${pkgs.mpvpaper}/bin/mpvpaper ALL ''$img -o loop" >> ''$out
else
yes | ${pkgs.ffmpeg}/bin/ffmpeg -i "''$img" /tmp/aurora/tmp.jpg >> ''$out
pidof mpvpaper >> $out && pkill mpvpaper
hyprctl dispatch exec "${pkgs.swww}/bin/swww img ''$img -t wipe" >> ''$out
fi
${self'.packages.aurora-change-colors}/bin/aurora-change-colors "''$src" "''$2" >> ''$out
'');
};
};
@@ -44,9 +99,21 @@
system = pkgs.stdenv.hostPlatform.system;
in {
environment.systemPackages = [
self.packages.${system}.aurora-greeter
];
users.users.aurora = {
createHome = true;
home = "/tmp/aurora/home";
packages = with pkgs; [
self.packages.${system}.aurora-greeter
self.packages.${system}.aurora-set-wallpaper
swww
mpvpaper
ffmpeg
];
};
services.greetd = {
enable = cfg.enable;
@@ -54,8 +121,8 @@
settings = {
default_session = {
command = "Hyprland -c ${self.packages.${system}.aurora-greeter-hypr-conf}";
#user = "greeter";
command = "start-hyprland -- -c ${self.packages.${system}.aurora-greeter-hypr-conf}";
user = "aurora";
};
};
};

View File

@@ -14,34 +14,40 @@ ClippingWrapperRectangle {
anchors.fill: parent
radius: 10
color: Pywal.special.background
color: "black"
//color: Pywal.special.background
ColumnLayout {
anchors.fill: parent
Text {
id: error
text: ""
color: Pywal.colors.color13
color: "red"
//color: Pywal.colors.color13
visible: false
}
Text {
text: "User"
color: Pywal.special.foreground
color: "white"
//color: Pywal.special.foreground
}
TextInput {
id: username
text: "guest"
color: Pywal.special.foreground
color: "white"
//color: Pywal.special.foreground
}
Text {
text: "Password"
color: Pywal.special.foreground
color: "white"
//color: Pywal.special.foreground
}
TextInput {
id: password
text: "test"
echoMode: TextInput.Password
color: Pywal.special.foreground
color: "white"
//color: Pywal.special.foreground
}
Button {