Tweak lockscreen and themes

This commit is contained in:
2024-10-03 21:27:31 +02:00
parent 3527a4fd65
commit 13d1b5a116
9 changed files with 236 additions and 15 deletions

View File

@ -2,7 +2,7 @@
# configured for wayland
set LOCKPROG swaylock
set OPTIONAL_CMDS rg sed grim lockscreen-blur
set OPTIONAL_CMDS rg sed grim lockscreen-blur jq
set CONFIG "$HOME/.config/sway/swaylock.config"
set DEFAULT_ARGS --daemonize --ignore-empty-password --show-failed-attempts --color 302f3b --config $CONFIG
set BLUR_FACTOR 40
@ -29,7 +29,7 @@ switch $XDG_CURRENT_DESKTOP
case sway
set outputs (swaymsg -t get_outputs -r | rg "name" | sed 's/^.*"name": "//' | sed 's/",$//')
case niri
set outputs (niri msg outputs | rg --pcre2 -o '[^" ]+(?=")')
set outputs (niri msg --json outputs | jq -r 'keys | join("\n")')
case '*'
echo "unsupported compositor, falling back to basic mode."
$LOCKPROG $DEFAULT_ARGS

View File

@ -0,0 +1,26 @@
#!/usr/bin/fish
# Run hyprlock and spawn fullscreen video windows to be shown behind the lockscreen
set LOCKPROG hyprlock
set video ~/hämtningar/video-screensavers/4k/comp_GMT329_117NC_401C_1037_IRELAND_TO_ASIA_v48_SDR_PS_FINAL_20180725_F0F6300_SDR_4K_HEVC.mov
# check if lock program is running
if ps -e | grep " $LOCKPROG\$"
echo "$LOCKPROG is already running"
exit 1
end
# Spawn an mpv instance for each monitor
for workspace in (hyprctl -j monitors | jq '.[] | .activeWorkspace.id')
# Thi "WORKSPACE n" title is read by hyprland to position the window correctly
mpv --fs --panscan=1.0 --title="WORKSPACE $workspace" $video &
end
$LOCKPROG
for pid in (jobs -p | tail -n +1)
kill $pid
end