[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-77522":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":36,"discoverSource":37},77522,"phonto","museslabs\u002Fphonto","museslabs","GPU-accelerated video wallpaper program for wayland compositors and macos","",null,"Rust",380,9,4,1,0,2,7,320,8,60.36,"GNU General Public License v3.0",false,"main",true,[27,28,29,30,31,32],"live-wallpaper","macos","macos-wallpaper","video-wallpaper","wallpaper","wayland-wallpaper","2026-06-12 04:01:21","\n\n\n# Phonto\n\n> phonto (\u002F'fon.to\u002F) — from Greek φόντο: background\n\nGPU-accelerated video wallpaper program for Wayland compositors and macOS, written in Rust. Also supports live lockscreen wallpapers on macOS.\n\n\n![example](.\u002Fmac-example.gif)\n\n\nOn Linux, phonto plays videos as your desktop background with minimal overhead, decoding and rendering entirely on the GPU through GStreamer and EGL. On macOS it drives an `AVPlayerLayer` attached to a window sitting just below the system wallpaper level, so VideoToolbox handles decoding and CoreAnimation handles compositing.\n\n## Installation\n\nUsing Nix (NixOS and macOS with nix-darwin):\n\n```bash\nnix profile install github:museslabs\u002Fphonto\n```\n\nUsing Homebrew (macOS and Linux x86_64):\n\n```bash\nbrew tap museslabs\u002Fphonto\nbrew install phonto\n```\n\nUsing AUR on Arch Linux:\n\n```bash\nyay -S phonto\n```\n\nUsing cargo:\n\n```bash\ncargo install phonto\n```\n\nFrom source:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fmuseslabs\u002Fphonto\ncd phonto\ncargo build --release\n```\n\n## Dependencies\n\n### Linux (Wayland)\n\nPhonto requires GStreamer and a VA-API GStreamer plugin for GPU-accelerated decoding. Without the VA-API plugin, GStreamer falls back to software decoding and CPU usage will be significantly higher.\n\n**Arch Linux:**\n```bash\nsudo pacman -S gst-plugin-va\n```\n\n**Ubuntu\u002FDebian:**\n```bash\nsudo apt install gstreamer1.0-vaapi\n```\n\n**Fedora:**\n```bash\nsudo dnf install gstreamer1-vaapi\n```\n\n### macOS\n\nNo external dependencies. phonto links against system frameworks (`AVFoundation`, `CoreMedia`, `AppKit`, `QuartzCore`). Decoding goes through VideoToolbox automatically for codecs the OS supports (H.264, HEVC, ProRes, etc.).\n\n## Usage\n\nPlay a specific video:\n```bash\nphonto \u002Fpath\u002Fto\u002Fvideo.mp4\n```\n\nPlay a random wallpaper from your configured search paths:\n```bash\nphonto --rand\n```\n\nOn Linux\u002FWayland, choose the layer-shell layer to render on:\n```bash\nphonto \u002Fpath\u002Fto\u002Fvideo.mp4 --layer background\n```\n\nAvailable layers are `background` (default), `bottom`, `top`, and `overlay`.\n\nPhonto also writes the currently selected video path to `~\u002F.cache\u002Fphonto\u002Fcurrent`.\nThis is useful when `--rand` chooses a wallpaper and another tool needs to reuse\nthe same video.\n\n## Lock screen backgrounds with hyprlock (Wayland)\n\nHyprlock owns the lock-screen UI, but phonto can render the animated background\non a higher layer while hyprlock is active. Start a second phonto process on the\n`overlay` layer before launching hyprlock:\n\n```bash\nphonto \"$(cat \"$HOME\u002F.cache\u002Fphonto\u002Fcurrent\")\" --layer overlay &\nphonto_lock_pid=$!\n\nhyprlock\nkill \"$phonto_lock_pid\"\n```\n\nThis pairs well with a normal desktop phonto session running on the default\n`background` layer. If you use `phonto --rand`, the cache file lets the lock\nscreen reuse the same randomly selected wallpaper.\n\nHyprlock must leave its background transparent or partially transparent for the\nvideo to be visible behind its controls.\n\n## Live lockscreen wallpapers (macOS)\n\nThe lock screen is owned by `loginwindow`, which hides every non-Apple-signed window the moment the screen locks. Phonto sidesteps that by registering your video into Apple's aerial catalog, so Apple's own signed extension plays it on both the desktop and the lock screen.\n\n```bash\nphonto install-live-lockscreen \u002Fpath\u002Fto\u002Fvideo.mp4\n```\n\nThis transcodes the video to HEVC Main10 with two temporal sub-layers (the exact bitstream shape the aerials extension requires for multi-cycle playback), generates a thumbnail, and registers the asset under a **Phonto** section in System Settings → Wallpaper.\n\nTo activate, open **System Settings → Wallpaper**, pick the **Phonto** category, click your entry, then lock the screen (Apple menu → Lock Screen) to verify it plays across cycles.\n\nTo remove a previously-installed entry:\n\n```bash\nphonto install-live-lockscreen \u002Fpath\u002Fto\u002Fvideo.mp4 --remove\n```\n\nOptional flags:\n\n- `--name \u003CSTRING>` — display name shown in the picker (defaults to the file stem).\n\n## Configuration\n\nPhonto reads its config from `$XDG_CONFIG_HOME\u002Fphonto\u002Fconfig.toml`, falling back to `~\u002F.config\u002Fphonto\u002Fconfig.toml`.\n\n### `search_paths`\n\nA list of directories to scan when using `--rand`. Each entry has a `path` and a `depth` controlling how many levels deep to search.\n\n```toml\n[[search_paths]]\npath = \"\u002Fhome\u002Fuser\u002Fwallpapers\"\ndepth = 1\n\n[[search_paths]]\npath = \"\u002Fmnt\u002Fmedia\u002Fvideos\"\ndepth = 2\n```\n\n`depth = 0` scans only the top-level directory. `depth = 1` includes one level of subdirectories, and so on.\n\n### GLSL shaders (Wayland only)\n\n`--shader PATH` applies a custom GLSL ES fragment shader to every frame. Pass the path to any `.glsl` file:\n\n```bash\nphonto \u002Fpath\u002Fto\u002Fvideo.mp4 --shader ~\u002F.config\u002Fphonto\u002Fedge-detect.glsl\n```\n\nShaders must target **GLSL ES 3.00** — start every shader with `#version 300 es`. Use `in` for inputs, declare an `out vec4` for the output colour, and use `texture()` (not `texture2D()`).\n\nYour shader has access to:\n\n- `u_tex` (`sampler2D`) — the current video frame.\n- `v_uv` (`vec2`) — UV coordinates for the current fragment.\n- `u_resolution` (`vec2`, optional) — surface size in pixels, useful for computing per-texel offsets (`1.0 \u002F u_resolution`).\n\nAn example sobel edge detection shader:\n\n```glsl\n#version 300 es\nprecision mediump float;\nuniform sampler2D u_tex;\nuniform vec2 u_resolution;\nin vec2 v_uv;\nout vec4 frag_color;\nvoid main() {\n    vec2 px = 1.0 \u002F u_resolution;\n    float tl = dot(texture(u_tex, v_uv + vec2(-px.x,  px.y)).rgb, vec3(0.299, 0.587, 0.114));\n    float tc = dot(texture(u_tex, v_uv + vec2(  0.0,  px.y)).rgb, vec3(0.299, 0.587, 0.114));\n    float tr = dot(texture(u_tex, v_uv + vec2( px.x,  px.y)).rgb, vec3(0.299, 0.587, 0.114));\n    float ml = dot(texture(u_tex, v_uv + vec2(-px.x,   0.0)).rgb, vec3(0.299, 0.587, 0.114));\n    float mr = dot(texture(u_tex, v_uv + vec2( px.x,   0.0)).rgb, vec3(0.299, 0.587, 0.114));\n    float bl = dot(texture(u_tex, v_uv + vec2(-px.x, -px.y)).rgb, vec3(0.299, 0.587, 0.114));\n    float bc = dot(texture(u_tex, v_uv + vec2(  0.0, -px.y)).rgb, vec3(0.299, 0.587, 0.114));\n    float br = dot(texture(u_tex, v_uv + vec2( px.x, -px.y)).rgb, vec3(0.299, 0.587, 0.114));\n    float gx = -tl - 2.0*ml - bl + tr + 2.0*mr + br;\n    float gy = -tl - 2.0*tc - tr + bl + 2.0*bc + br;\n    frag_color = vec4(vec3(sqrt(gx*gx + gy*gy)), 1.0);\n}\n```\n\nNote: multi-pass effects (separable blur, bloom) are not supported, the shader runs once per frame with no intermediate framebuffers.\n\n### Fit modes\n\n`--scale` controls how the video fits to the screen:\n\n- `stretch` — distort to fill, aspect not preserved.\n- `fit` — preserve aspect, letterbox to fit inside.\n- `fill` — preserve aspect, crop overflow to fill (default).\n- `center` — render at native pixel size, centered.\n\n```bash\nphonto \u002Fpath\u002Fto\u002Fvideo --scale fit\n```\n\nOn macOS, `center` currently falls back to `fill` (`AVPlayerLayer` has no native equivalent).\n\n### Battery pausing\n\nStop playback when the laptop is unplugged or charge drops below a threshold. The two flags are mutually exclusive.\n\n- `--pause-on-battery` — pause whenever the system is on battery, resume on AC.\n- `--pause-below PERCENT` — pause when on battery *and* charge is below `PERCENT` (1–100). Always plays on AC.\n\n```bash\nphonto \u002Fpath\u002Fto\u002Fvideo --pause-on-battery\nphonto \u002Fpath\u002Fto\u002Fvideo --pause-below 30\n```\n","Phonto 是一个为Wayland合成器和macOS设计的GPU加速视频壁纸程序。该项目使用Rust语言编写，能够在Linux上通过GStreamer和EGL实现低开销的GPU解码与渲染，在macOS上则利用AVPlayerLayer及VideoToolbox进行解码与CoreAnimation完成合成，支持macOS上的动态锁屏壁纸功能。适用于希望桌面或锁屏具有个性化视频背景的用户，尤其是在追求高性能图形处理的同时保持系统流畅运行的场景下。","2026-06-11 03:55:36","CREATED_QUERY"]