skip to content
MusesΜοῦσαιdocs

basics / 03 of 15

A first wallpaper

Play a video, let phonto pick one from a folder, and start it with your session.

Play a video

shell
phonto ~/Videos/harbour.mp4

The video covers every display, cropped to the screen’s shape, and starts again from the top when it ends. phonto stays in the foreground while it plays. Press Ctrl+c to stop it, and the desktop shows whatever was there before.

On Linux the video sits on the layer-shell background layer, under your windows and bars. Layers covers the other three.

Pick one at random

Tell phonto where your videos are. On its first run it wrote a config file, ~/.config/phonto/config.toml, with every section commented out. Add a search path:

config.toml
[[search_paths]]
path = "~/Videos/wallpapers"
depth = 1

depth = 1 searches the folder and the folders inside it. Then:

shell
phonto --rand

plays one of them, a fresh pick each time phonto starts.

Start it with your session

phonto doesn’t fork into the background. Start it the way your desktop starts any program that keeps running.

On Wayland

compositor in its config
Hyprland exec-once = phonto --rand
Sway exec phonto --rand
niri spawn-at-startup "phonto" "--rand"
river riverctl spawn "phonto --rand"

With AeroSpace or Rift

Both tiling window managers run commands when they start. In AeroSpace, add phonto to after-startup-command. With start-at-login = true, that’s every login:

aerospace.toml
after-startup-command = [
    'exec-and-forget phonto --rand --pause-on-battery',
]

AeroSpace adds Homebrew’s /opt/homebrew/bin to the PATH its commands get, and finds a Homebrew phonto by name.

In Rift, add it to run_on_start:

rift/config.toml
[settings]
run_on_start = [
  "/opt/homebrew/bin/phonto --rand --pause-on-battery",
]

Rift starts the command without a shell. Give it phonto’s full path, the one which phonto prints.

With a LaunchAgent

Without a window manager to start it, launchd can. Save this as ~/Library/LaunchAgents/com.museslabs.phonto.plist:

com.museslabs.phonto.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.museslabs.phonto</string>
    <key>ProgramArguments</key>
    <array>
        <string>/opt/homebrew/bin/phonto</string>
        <string>--rand</string>
        <string>--pause-on-battery</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>/tmp/phonto.log</string>
</dict>
</plist>

launchd starts it at every login from then on. To start it now, without logging out, load it:

shell
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.museslabs.phonto.plist

launchd doesn’t use your shell’s PATH, so the plist names phonto by its full path. Errors go to /tmp/phonto.log. To stop phonto, unload it:

shell
launchctl bootout gui/$(id -u)/com.museslabs.phonto

Delete the plist as well, or launchd loads it again at the next login.

Next