温馨提示×

哪里找linux compton配置

小樊
46
2026-09-18 22:07:02
栏目: 智能运维

Compton 是一个曾经流行的 Xorg 合成器(现在大多被它的分支 picom 取代)。下面给你几种找 Compton 配置的常见途径:


一、系统里的默认/示例配置

1. 官方示例配置文件

如果你是通过包管理器安装的 compton,通常会有示例配置:

# Debian / Ubuntu
ls /usr/share/doc/compton/

# 可能看到
compton.sample.conf

复制出来用:

cp /usr/share/doc/compton/compton.sample.conf ~/.config/compton.conf

2. 用户配置目录

Compton 默认读取:

~/.config/compton.conf
# 或
~/.compton.conf

如果没有,可以自己新建。


二、GitHub 上找配置(最常用)

官方仓库(已停止维护)

https://github.com/chjj/compton

示例配置在:

https://github.com/chjj/compton/blob/master/compton.sample.conf

更推荐:picom(compton 分支)

https://github.com/yshui/picom

示例配置:

https://github.com/yshui/picom/blob/next/picom.conf.example

三、论坛 / 社区配置参考

  • Arch Wiki

    https://wiki.archlinux.org/title/Picom
    

    (虽写 picom,但 compton 配置基本兼容)

  • Reddit

    • r/unixporn(搜 compton.conf)
    • r/linuxquestions
  • Dotfiles 网站

    https://dotfiles.github.io/
    https://github.com/search?q=compton.conf
    

四、最小可用配置示例(compton)

backend = "glx";
vsync = true;

shadow = true;
shadow-radius = 12;
shadow-opacity = 0.5;

fade = true;
fade-in-step = 0.03;
fade-out-step = 0.03;

opacity-rule = [
  "90:class_g = 'URxvt'",
  "95:class_g = 'Firefox'"
];

五、重要提醒(2026 年视角)

  • compton 已不再维护
  • 新系统建议直接用 picom
  • Wayland 用户不需要 compton / picom

如果你愿意,可以告诉我:

  • 用的是 哪个发行版
  • 是 compton 还是 picom
  • 想要 透明 / 阴影 / 动画 / 省电 哪种效果

我可以直接帮你写一份配置。

0 踩