VF2/VF2L上自动动态更换桌面壁纸

linux支持自动、动态更换壁纸的软件有不少,但大多都是支持X11(例如feh),支持wayland的很少; VF2/VF2L的GPU驱动只支持wayland, 所以riscv架构里支持wayland的自动动态更换壁纸更少。我寻找测试了一些,最终编译并运行成功,wpaperd能在VF2、wayland环境里正常使用。
wpaperd是意大利软件工程师Danilo Spinella开发的。
我在debian官方库任何版本里都没找到wpaperd, 在archlinux里看到收录了X64版本,所以需要去wpaperd的页面下载源码编译。VF2上,我在labwc和sway里都运行成功,labwc里运行wpaperd比sway更流畅。

Notice: wpaperd uses wlr_layer_shell wayland protocol, which is available on all wlroots based compositors (sway, hyprland, …) and on KDE. Therefore it won’t work on GNOME.

git clone GitHub - danyspin97/wpaperd: Modern wallpaper daemon for Wayland
cd wpaperd
cargo build --release

编译后会有 2 个二进制程序 wpaperctl、wpaperd, 前者为控制程序,后者为守护进程.可以按官网说明安装,也可以用一个更简单的方法:

sudo cp target/release/wpaperctl target/release/wpaperd /usr/local/bin

配置文件:

sudo mkdir ~/.config/wpaperd/

创建编辑 ~/.config/wpaperd/wallpaper.toml

[default]
#指定壁纸集所在目录
path = “~/Pictures/bg/”
#设定10分钟更换1次
duration = “10m”
#随机(random),升序(ascending), 降序(descending)
sorting = “random”

修改编辑labwc配置文件~/.config/labwc/autostart ,
关闭 swaybg 或 .azotebg ,并添加

wpaperd -d >/dev/null 2>&1 &

修改编辑labwc配置文件~/.config/labwc/menu.xml , 添加:

 <item label="wpaperd">
     <action name="Execute" command="wpaperctl next" />
 </item>





树莓派OS也被我魔改,所以树莓派4B上编译、运行了wpaperd.

3 Likes

2 Likes