skip to content
MusesΜοῦσαιdocs

running / 12 of 15

Lock screens

On Wayland, a second phonto can play behind hyprlock. On macOS, phonto hands the video to the system, which plays it on the lock screen itself.

Behind hyprlock

hyprlock owns the lock screen, and phonto can’t draw on it. It can play a second copy of the wallpaper on the overlay layer, over your windows, for as long as hyprlock runs. Give hyprlock’s background a transparent color and no path, and the video shows through behind the clock and the password field.

lock.sh
#!/bin/sh
phonto "$(cat ~/.cache/phonto/current)" --layer overlay &
pid=$!
hyprlock
kill "$pid"

Run this script wherever you’d run hyprlock: from a keybind, or as hypridle’s lock_cmd. ~/.cache/phonto/current holds the video your desktop phonto is playing, a --rand pick included, so the lock screen matches the desktop. phonto only writes it when one video plays on every display. With a video per display, name a video in the script instead.

On the macOS lock screen

macOS hides every window that isn’t Apple’s as soon as the screen locks, phonto’s included. So for the lock screen, phonto doesn’t play the video itself. It converts the video into the format of Apple’s Aerial wallpapers and registers it with macOS, which plays it on the desktop and the lock screen.

shell
phonto install-live-lockscreen ~/Videos/harbour.mp4

This takes a while. phonto encodes the video again as 10-bit HEVC at its own resolution, the form Apple’s Aerial player needs to play it after every unlock, and makes a thumbnail. Then it adds the video to the system’s wallpapers, in a section called Phonto.

To use it, open System Settings → Wallpaper, pick your video in the Phonto section, and lock the screen to check it plays. From then on macOS plays it, and phonto doesn’t need to be running.

--name sets the name shown in System Settings. Without it, phonto uses the file’s name.

Removing one

shell
phonto install-live-lockscreen ~/Videos/harbour.mp4 --remove

phonto knows each video by the path you installed it from. Give the same path, even if the file has gone since.