MIT License

项目介绍

glouw/paperview 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 MIT License 许可证,目前获得 1.5k 个 Star、46 次 Fork。

仓库全名
glouw/paperview
开源许可证
MIT License
Star 数
1.5k
Fork 数
46
未关闭 Issue
20

README 摘要

PAPERVIEW Paperview is a high performance animated desktop background setter for Linux and X11. Video of the above screenshot: https://www.youtube.com/watch?v=6ZTiA885bWM Build make # NOTE: SDL2 is required Single Monitor Use ./paperview FOLDER SPEED A lower SPEED number will result in a faster frame rate. Only BMP files are supported. Multi Monitor Use Paperview supports any number of monitors with its dynamic…

完整内容见 GitHub 原始 README 或本页 。

常见问题

paperview 用什么语言开发?

主要使用 C 编写,采用 MIT License 许可证,目前有 1.5k 个 Star。

paperview 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 paperview 的源码?

可以直接克隆仓库:git clone https://github.com/glouw/paperview.git,默认分支为 master;安装与运行步骤见仓库 README。

paperview 最近还在维护吗?

仓库最近一次更新为 2023年3月5日,当前有 20 个未关闭 Issue;Star 数为 1.5k,可作为社区活跃度的参考。

简要分析

热度分
1595
价值分
906
活跃状态
活跃

语言占比

C
Makefile

贡献者

README

PAPERVIEW

Paperview is a high performance animated desktop background setter for Linux and X11.

Video of the above screenshot: https://www.youtube.com/watch?v=6ZTiA885bWM

Build

make # NOTE: SDL2 is required

Single Monitor Use

./paperview FOLDER SPEED

A lower SPEED number will result in a faster frame rate. Only BMP files are supported.

Multi Monitor Use

Paperview supports any number of monitors with its dynamic parameter list:

./paperview FOLDER SPEED X Y W H FOLDER SPEED X Y W H # ... And so on

The values X, Y, W (width), H (height) are integers and represent a rectangle with pixel dimensions specifying where the wallpaper animation will be placed. For instance, with a 1366x768 monitor on the left and a 1920x1080 monitor on the right, the following command will animate the left monitor with a cat animation, and the right, a river animation:

./paperview \
    ~/scenes/cat   5    0   0 1366  768 \
    ~/scenes/river 5 1366   0 1928 1080

Running Background Daemon

Append an (&) to a paperview command to have it run as a background process. Eg:

./paperview FOLDER SPEED &

To stop this backgroud process, use killall:

killall paperview

Creating Custom Scenes

Creating a custom BMP scene folder from a GIF requires imagemagick. For example, to create a castle scene folder from a castle.gif:

mkdir castle
mv castle.gif castle
cd castle
convert -coalesce castle.gif out.bmp
rm castle.gif

Random Animated Wallpapers at Startup

Assuming a scenes folder containing a number of scene folders is present in the home folder, run the following snippet as a background process within .xinitrc before running startx, or simply execute it after X11 is running:

while true
do
    scene=$(ls -d ~/scenes/*/ | shuf -n 1)
    timeout 600 paperview $scene 5 # See Multi-Monitor Use above for multiple monitor support
done

Performance

Running on a Thinkpad X230 from 2012 at 1920x1080 and 60fps with an integrated Intel GPU:

intel_gpu_time ./paperview castle 5

user: 1.904135s, sys: 0.357277s, elapsed: 100.458648s, CPU: 2.3%, GPU: 11.7%

Known Issues

Picom, Compton (and possibly other compositors) seem to already write to the base root X11 window which may overwrite the render done by paperview.

Alternatives

Alternatively, if SDL2 is a problem, or if you are on Windows, two workarounds are currently available:

Pure X11 (without SDL2)

https://gist.github.com/AlecsFerra/ef1cc008990319f3b676eb2d8aa89903

Windows 10

https://github.com/TrAyZeN/sdl-wallpaper

评论

暂无评论