linux丝滑的动画体验

picom

视频链接

xserver的窗口效果合成器, fork自 compton

提供了窗口的透明、背景模糊、淡入淡出、圆角、动画等效果

github仓库 | 个人fork版本

个人自用配置

个人fork的版本修改了什么?

在dccsillag/picom实现动画效果的基础上,增加了两个动画相关的配置 PR#35

安装

从仓库clone到本地

1
2
3
4
5
6
cd picom

rm -rf build
LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" meson --buildtype=release . build
ninja -C build
sudo ninja -C build install

启动

picom --experimental-backends --config ~/scripts/config/picom.conf

为了更更方便大家安装 我从别人那抄了pkgbuild

  • 将以下内容写入PKGBUILD文件
  • 执行makepkg -si
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
_forkname=yaocccc
pkgname=picom-animations-git
_gitname=picom
pkgver=1786__2022.09.19
pkgrel=1
pkgdesc="X compositor (fork of compton) (git-version; animation fork)"
arch=(i686 x86_64)
url="https://github.com/${_forkname}/${_gitname}"
license=('MIT' 'MPL2')
depends=('libgl' 'libev' 'pcre' 'libx11' 'xcb-util-renderutil' 'libxcb' 'xcb-util-image' 'libxext'
'pixman' 'libconfig' 'libdbus' 'hicolor-icon-theme')
makedepends=('git' 'mesa' 'meson' 'asciidoc' 'uthash' 'xorgproto')
optdepends=('dbus: To control picom via D-Bus'
'xorg-xwininfo: For picom-trans'
'xorg-xprop: For picom-trans'
'python: For picom-convgen.py')
provides=('compton' 'compton-git' 'picom')
conflicts=('compton' 'compton-git' 'picom')
replaces=('compton-git')
source=(git+"https://github.com/${_forkname}/${_gitname}.git")
sha256sums=("SKIP")

pkgver() {
cd ${_gitname}
_tag=$(git describe --tags | sed 's:^v::') # tag is mobile, and switches between numbers and letters, can't use it for versioning
_commits=$(git rev-list --count HEAD) # total commits is the most sane way of getting incremental pkgver
_date=$(git log -1 --date=short --pretty=format:%cd)
printf "%s_%s_%s\n" "${_commits}" "${_tag}" "${_date}" | sed 's/-/./g'
}

build() {
cd "${srcdir}/${_gitname}"
meson --buildtype=release . build --prefix=/usr -Dwith_docs=true
ninja -C build
}

package() {
cd "${srcdir}/${_gitname}"

DESTDIR="${pkgdir}" ninja -C build install

# install license
install -D -m644 "LICENSES/MIT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-MIT"

# example conf
install -D -m644 "picom.sample.conf" "${pkgdir}/etc/xdg/picom.conf.example"
}

linux丝滑的动画体验
https://yaocc.cc/linuxpicomanimation/
作者
Yaocan Chen
发布于
2022年6月19日
许可协议