diff options
| -rw-r--r-- | CONTRIBUTORS | 198 | ||||
| -rw-r--r-- | LICENSE.spdx | 2 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rwxr-xr-x | bin/picom-trans | 407 | ||||
| -rw-r--r-- | compfy-dbus.desktop (renamed from picom-dbus.desktop) | 6 | ||||
| -rw-r--r-- | compfy.desktop (renamed from picom.desktop) | 6 | ||||
| -rw-r--r-- | compfy.sample.conf (renamed from picom.sample.conf) | 0 | ||||
| -rw-r--r-- | flake.nix | 15 | ||||
| -rw-r--r-- | man/compfy.1 | 696 | ||||
| -rw-r--r-- | man/compfy.md | 517 | ||||
| -rw-r--r-- | man/picom-trans.1.asciidoc | 114 | ||||
| -rw-r--r-- | man/picom.1 | 1049 | ||||
| -rw-r--r-- | man/picom.1.asciidoc | 549 | ||||
| -rw-r--r-- | man/picom.1.gz | bin | 10328 -> 0 bytes | |||
| -rw-r--r-- | meson.build | 26 | ||||
| -rw-r--r-- | src/backend/backend.c | 4 | ||||
| -rw-r--r-- | src/backend/gl/egl.c | 2 | ||||
| -rw-r--r-- | src/backend/gl/glx.c | 12 | ||||
| -rw-r--r-- | src/backend/xrender/xrender.c | 2 | ||||
| -rw-r--r-- | src/c2.c | 10 | ||||
| -rw-r--r-- | src/c2.h | 9 | ||||
| -rw-r--r-- | src/common.h | 12 | ||||
| -rw-r--r-- | src/compfy.c (renamed from src/picom.c) | 25 | ||||
| -rw-r--r-- | src/compfy.h (renamed from src/picom.h) | 1 | ||||
| -rw-r--r-- | src/config.c | 10 | ||||
| -rw-r--r-- | src/config_libconfig.c | 14 | ||||
| -rw-r--r-- | src/dbus.c | 31 | ||||
| -rw-r--r-- | src/dbus.h | 9 | ||||
| -rw-r--r-- | src/diagnostic.c | 4 | ||||
| -rw-r--r-- | src/event.c | 2 | ||||
| -rw-r--r-- | src/meson.build | 10 | ||||
| -rw-r--r-- | src/opengl.c | 9 | ||||
| -rw-r--r-- | src/opengl.h | 9 | ||||
| -rw-r--r-- | src/options.c | 56 | ||||
| -rw-r--r-- | src/picom.modulemap | 4 | ||||
| -rw-r--r-- | src/win.c | 4 |
36 files changed, 1417 insertions, 2409 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 0f48855..0b5d320 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3,108 +3,112 @@ pull request if you want to change or remove your mention. # Updated 14/Nov/2023 +Contributors to `compfy` + + Allusive (allusive-dev) + Contributors to `picom-allusive` -Allusive -IogaMaster -xrun1 + Allusive + IogaMaster + xrun1 Contributors to `pijulius/picom` -Pijulius -dccsilag + dccsilag + Pijulius Contributors to `yshui/picom` -Adam Jackson <ajax at nwnk.net> -adelin-b <berard.adelin at gmail.com> -Alexander Kapshuna <kapsh at kap.sh> -Antonin Décimo <antonin.decimo at gmail.com> -Antonio Vivace <dev at avivace.com> -Avi ד <avi.the.coder at gmail.com> -Ben Friesen <bfriesen95 at gmail.com> -Bernd Busse <bernd at busse-net.de> -Bert Gijsbers <gijsbers at science.uva.nl> -bhagwan <bhagwan at disroot.org> -Bodhi <craig.langman at gmail.com> -Brottweiler <tibell.christoffer at gmail.com> -Carl Worth <cworth at cworth.org> -Christopher Jeffrey <chjjeffrey at gmail.com> -Corax26 <cor.ax26 at gmail.com> -Dan Elkouby <streetwalkermc at gmail.com> -Dana Jansens <danakj at orodu.net> -Daniel Kwan <daniel.w.t.kwan at outlook.com> -Dave Airlie <airlied at linux.ie> -David Schlachter -dolio -Duncan <duncan.britton at outlook.com> -Dylan Araps <dylan.araps at gmail.com> -Einar Lielmanis <einars at gmail.com> -Eric Anholt <anholt at freebsd.org> <eric at anholt.net> -Evgeniy Baskov <j-basevgser at yandex.ru> -Greg Flynn -h7x4 <h7x4 at nani.wtf> -Harish Rajagopal <harish.rajagopals at gmail.com> -hasufell <julian.ospald at googlemail.com> -i-c-u-p -Ignacio Taranto <ignacio.taranto at eclypsium.com> -Istvan Petres -Jake <jakeroggenbuck2 at gmail.com> -James Cloos <cloos at jhcloos.com> -Jamey Sharp <jamey at minilop.net> -Jan Beich <jbeich at freebsd.org> -Jarrad <jarrad.whitaker at gmail.com> -Javeed Shaikh <syscrash2k at gmail.com> -Jerónimo Navarro <jnavarro at ancasrl.com.ar> -jialeens <jialeadmin at 163.com> -Johnny Pribyl <pribylsnbits at gmail.com> -Keith Packard <keithp at keithp.com> -Kevin Kelley <kelleyk at kelleyk.net> -ktprograms <ktprograms at gmail.com> -Kurenshe Nurdaulet -Lukas Schmelzeisen <l.schmelzeisen at gmx.de> -Mark Tiefenbruck <mark at fluxbox.org> -Matthew Allum <breakfast at 10.am> -Maxim Solovyov <msolovyov at protonmail.com> -Michael Reed <supertron421 at gmail.com> -Michele Lambertucci <michele.lambertucci at mail.polimi.it> -mæp <m.aep at live.com> -Namkhai Bourquin <namkhai.n3 at protonmail.com> -Nate Hart <nejthan at gmail.com> -nia <nia at netbsd.org> -Nikolay Borodin <monsterovich at gmail.com> -notfoss <static.vortex at gmx.com> -Omar Polo <op at omarpolo.com> -oofsauce <alanpanayotov at gmail.com> -orbea <orbea at riseup.net> -Paradigm0001 -Patrick Collins -Peter Mattern <matternp at arcor.de> -Phil Blundell <pb at reciva.com> -Que Quotion <quequotion at bugmenot.com> -Rafael Kitover <rkitover at gmail.com> -Richard Grenville <pyxlcy at gmail.com> -Rytis Karpuska <rytis.karpuska at gmail.com> -Samuel Hand <samuel.d.hand at gmail.com> -Scott Leggett <scott at sl.id.au> -scrouthtv <lennivh24 at gmail.com> -Sebastien Waegeneire <sebastien at waegeneire.com> -Stefan Radziuk <stefan.radziuk19 at imperial.ac.uk> -Subhaditya Nath <sn03.general at gmail.com> -Tasos Sahanidis <tasos at tasossah.com> -Thiago Kenji Okada <thiagokokada at gmail.com> -Tilman Sauerbeck <tilman at code-monkey.de> -Tim Siegel <siegeltr at gmail.com> -Tim van Dalen <tim at timvdalen.nl> -tokyoneon78 <mockcoder at protonmail.ch> -Tom Dörr <tomdoerr96 at gmail.com> -Tomas Janousek <tomi at nomi.cz> -Toni Jarjour -Tuomas Kinnunen <tuomas.kinnunen at aalto.fi> -Uli Schlachter <psychon at znc.in> -Walter Lapchynski <wxl at ubuntu.com> -Will Dietz <w at wdtz.org> -XeCycle <xecycle at gmail.com> -Yuxuan Shui <yshuiv7 at gmail.com> -zilrich -ಠ_ಠ <easteregg at verfriemelt.org> + Adam Jackson <ajax at nwnk.net> + adelin-b <berard.adelin at gmail.com> + Alexander Kapshuna <kapsh at kap.sh> + Antonin Décimo <antonin.decimo at gmail.com> + Antonio Vivace <dev at avivace.com> + Avi ד <avi.the.coder at gmail.com> + Ben Friesen <bfriesen95 at gmail.com> + Bernd Busse <bernd at busse-net.de> + Bert Gijsbers <gijsbers at science.uva.nl> + bhagwan <bhagwan at disroot.org> + Bodhi <craig.langman at gmail.com> + Brottweiler <tibell.christoffer at gmail.com> + Carl Worth <cworth at cworth.org> + Christopher Jeffrey <chjjeffrey at gmail.com> + Corax26 <cor.ax26 at gmail.com> + Dan Elkouby <streetwalkermc at gmail.com> + Dana Jansens <danakj at orodu.net> + Daniel Kwan <daniel.w.t.kwan at outlook.com> + Dave Airlie <airlied at linux.ie> + David Schlachter + dolio + Duncan <duncan.britton at outlook.com> + Dylan Araps <dylan.araps at gmail.com> + Einar Lielmanis <einars at gmail.com> + Eric Anholt <anholt at freebsd.org> <eric at anholt.net> + Evgeniy Baskov <j-basevgser at yandex.ru> + Greg Flynn + h7x4 <h7x4 at nani.wtf> + Harish Rajagopal <harish.rajagopals at gmail.com> + hasufell <julian.ospald at googlemail.com> + i-c-u-p + Ignacio Taranto <ignacio.taranto at eclypsium.com> + Istvan Petres + Jake <jakeroggenbuck2 at gmail.com> + James Cloos <cloos at jhcloos.com> + Jamey Sharp <jamey at minilop.net> + Jan Beich <jbeich at freebsd.org> + Jarrad <jarrad.whitaker at gmail.com> + Javeed Shaikh <syscrash2k at gmail.com> + Jerónimo Navarro <jnavarro at ancasrl.com.ar> + jialeens <jialeadmin at 163.com> + Johnny Pribyl <pribylsnbits at gmail.com> + Keith Packard <keithp at keithp.com> + Kevin Kelley <kelleyk at kelleyk.net> + ktprograms <ktprograms at gmail.com> + Kurenshe Nurdaulet + Lukas Schmelzeisen <l.schmelzeisen at gmx.de> + Mark Tiefenbruck <mark at fluxbox.org> + Matthew Allum <breakfast at 10.am> + Maxim Solovyov <msolovyov at protonmail.com> + Michael Reed <supertron421 at gmail.com> + Michele Lambertucci <michele.lambertucci at mail.polimi.it> + mæp <m.aep at live.com> + Namkhai Bourquin <namkhai.n3 at protonmail.com> + Nate Hart <nejthan at gmail.com> + nia <nia at netbsd.org> + Nikolay Borodin <monsterovich at gmail.com> + notfoss <static.vortex at gmx.com> + Omar Polo <op at omarpolo.com> + oofsauce <alanpanayotov at gmail.com> + orbea <orbea at riseup.net> + Paradigm0001 + Patrick Collins + Peter Mattern <matternp at arcor.de> + Phil Blundell <pb at reciva.com> + Que Quotion <quequotion at bugmenot.com> + Rafael Kitover <rkitover at gmail.com> + Richard Grenville <pyxlcy at gmail.com> + Rytis Karpuska <rytis.karpuska at gmail.com> + Samuel Hand <samuel.d.hand at gmail.com> + Scott Leggett <scott at sl.id.au> + scrouthtv <lennivh24 at gmail.com> + Sebastien Waegeneire <sebastien at waegeneire.com> + Stefan Radziuk <stefan.radziuk19 at imperial.ac.uk> + Subhaditya Nath <sn03.general at gmail.com> + Tasos Sahanidis <tasos at tasossah.com> + Thiago Kenji Okada <thiagokokada at gmail.com> + Tilman Sauerbeck <tilman at code-monkey.de> + Tim Siegel <siegeltr at gmail.com> + Tim van Dalen <tim at timvdalen.nl> + tokyoneon78 <mockcoder at protonmail.ch> + Tom Dörr <tomdoerr96 at gmail.com> + Tomas Janousek <tomi at nomi.cz> + Toni Jarjour + Tuomas Kinnunen <tuomas.kinnunen at aalto.fi> + Uli Schlachter <psychon at znc.in> + Walter Lapchynski <wxl at ubuntu.com> + Will Dietz <w at wdtz.org> + XeCycle <xecycle at gmail.com> + Yuxuan Shui <yshuiv7 at gmail.com> + zilrich + ಠ_ಠ <easteregg at verfriemelt.org> diff --git a/LICENSE.spdx b/LICENSE.spdx index 83aa2da..215bcbe 100644 --- a/LICENSE.spdx +++ b/LICENSE.spdx @@ -1,4 +1,4 @@ SPDXVersion: SPDX-2.1 DataLicense: CC0-1.0 -PackageName: picom +PackageName: compfy PackageLicenseDeclared: MPL-2.0 AND MIT @@ -21,7 +21,7 @@ See [What is This](https://github.com/allusive-dev/picom-allusive#what-is-this) Want to chat or maybe help bug test? Contatct me here: -[](https://matrix.to/#/@allusive_:matrix.org) +[](https://matrix.to/#/#compfy:matrix.org) [](https://github.com/allusive-dev/allusive-dev#contact-me) [](mailto:[email protected]) diff --git a/bin/picom-trans b/bin/picom-trans deleted file mode 100755 index b686128..0000000 --- a/bin/picom-trans +++ /dev/null @@ -1,407 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: MIT - -# -# picom-trans -# Copyright (c) 2021, Subhaditya Nath -# Based on previous works of Christopher Jeffrey -# - -# -# Conforming to POSIX-1.2007 -# https://pubs.opengroup.org/onlinepubs/9699919799 -# - -# Usage: -# $ picom-trans [options] [+|-]opacity -# By window id -# $ picom-trans -w "$WINDOWID" 75 -# By name -# $ picom-trans -n "urxvt" 75 -# By current window -# $ picom-trans -c 75 -# By selection -# $ picom-trans 75 -# $ picom-trans -s 75 -# Increment current window 5% -# $ picom-trans -c +5 -# Delete current window's opacity -# $ picom-trans -c --delete -# Toggle current window's opacity between 90 and unset -# $ picom-trans -c --toggle 90 -# Reset all windows -# $ picom-trans --reset - - -# Save $0 now to print correct value while printing from functions. -# Printing errormsgs from functions using "$0" prints the function name -# instead of the executable name. -EXE_NAME="$0" - - -# Instead of printing the full path to this file (e.g. /usr/bin/picom-trans) -# only print the base name (i.e. picom-trans) -EXE_NAME="$(basename "$EXE_NAME")" - - -print_usage() -{ #{{ - echo "Usage: $EXE_NAME [options] [+|-]opacity" - echo "" - echo "Options:" - echo " -h, --help Print this help message." - echo " -o, --opacity OPACITY Specify the new opacity value in range 0-100 for the window. If" - echo " prefixed with + or -, increment or decrement from the current" - echo " opacity of the target window." - echo "" - echo "Actions:" - echo " -g, --get Print current opacity of the target window." - echo " -d, --delete Delete opacity of the target window." - echo " -t, --toggle Toggle the target window's opacity, i.e. set if not already set" - echo " and delete else." - echo " -r, --reset Reset opacity for all windows." - echo "" - echo "Window Selection:" - echo " -s, --select Select target window with mouse cursor. (DEFAULT)" - echo " -c, --current Select the currently active window as target." - echo " -n, --name WINDOW_NAME Specify and try to match a window name." - echo " -w, --window WINDOW_ID Specify the window id of the target window." -} #}} - - -parse_args() -{ #{{ - i=1 # because we start from "$1", not from "$0" - while [ $i -le $# ] - do - #### [START] Convert GNU longopts to POSIX equivalents #### - if [ "$1" = "--${1##--}" ] # check if $1 is a longopt - then - # Catch invalid options - case "$1" in - (--opacity=|--name=|--window=) - echo "$EXE_NAME: option ${1%=} needs a value" >&2 - exit 1;; - (--opacity|--name|--window) - test $i -eq $# \ - && echo "$EXE_NAME: option $1 needs a value" >&2 \ - && exit 1;; - esac - - # Separate "--ARG=VAL" into "--ARG" "VAL" - case "$1" in - (--opacity=*|--name=*|--window=*) - ARG="$(echo "$1" | sed -E 's/(--[^=]+)=.*$/\1/')" - VAL="${1##${ARG}=}" - shift && set -- "$ARG" "$VAL" "$@" - esac - - # Turn into short form - case "$1" in - (--help|--opacity|--get|--delete|--toggle|--reset|--select|--current|--name|--window) - ARG=${1#-} # remove one '-' from prefix - ARG="$(echo "$ARG" | cut -c -2)" # get first two characters - shift && set -- "$ARG" "$@" - esac - - # If the argument still starts with --, it is an invalid argument - case "$1" in - (--*) - echo "$EXE_NAME: illegal option $1" >&2 - exit 1 - esac - fi - #### [END] Convert GNU longopts to POSIX equivalents #### - - - #### [START] Prepend '-o' to standalone opacity values #### - # Iterate over every argument and check if it is an opacity without the -o - # option in the previous argument. If so, then prepend the -o option. - # e.g. Turn this - - # picom-trans -c +10 -s - # into this - - # picom-trans -c -o +10 -s - # - # NOTE: Don't touch arguments that are preceded by -o, -w, or -n (i.e. the - # options that take a value.) - # e.g. This - - # picom-trans -w 75 -o 90 - # should NOT be turned into this - - # picom-trans -w -o 75 -o 90 - # We ensure this by checking the "$#"th (i.e. the last) argument. If - # argument is an option that needs a value, we don't do anything to $1. - # - # NOTE: we are using printf because most echo implementations aren't - # POSIX-compliant. For example, according to POSIX.1-2017, echo doesn't - # support any options, so, - # $ echo "-n" - # should output - - # -n - # But it doesn't. It instead interprets the "-n" as the option -n, which, - # in most implementations, means that the trailing newline should not be - # printed. - if echo "$1" | grep -qE '^[+-]?[[:digit:]]+%?$' && \ - ! eval "printf '%s' \"\${$#}\"" | grep -q '^-[hdtrgsc]*[own]$' - # NOTE: eval "printf '%s' \"\${$#}\"" means 'print the last argument' - # NOTE: The letters inside the first square brackets (ie. hdtrgsc) are - # the same as those in the getopts argument, minus those that are - # followed by a ':' - # NOTE: The letters inside the second square brackets (ie. own) are - # the same as those in the getopts argument, minus those that are - # NOT followed by a ':' - then - set -- "$@" "-o" - i=$(( i + 1 )) - fi - #### [END] Prepend '-o' to standalone opacity values #### - - - # Prepare for next iteration - ARG="$1" - shift && set -- "$@" "$ARG" - i=$(( i + 1 )) - done - - - # NOTE: DO NOT ATTEMPT TO USE "$OPTIND" INSIDE THE getopts LOOP - # - https://github.com/yshui/picom/pull/634#discussion_r654571535 - # - https://www.mail-archive.com/austin-group-l%40opengroup.org/msg04112.html - OPTIND=1 - while getopts 'ho:dtrgsn:w:c' OPTION - do - case "$OPTION" in - (h) print_usage; exit 0;; - (o) target_opacity="$OPTARG";; - (d) action=delete;; - (t) action=toggle;; - (r) action=reset;; - (g) action=get;; - (s) winidtype=; winid=;; - (n) winidtype=-name; winid="$OPTARG";; - (w) winidtype=-id; winid="$OPTARG";; - (c) winidtype=-id; winid="$(get_focused_window_id)";; - (\?) exit 1 - esac - done -} #}} - - -get_target_window_id() -{ #{{ - - # Get the output of xwininfo - if test -z "$winidtype" - then xwininfo_output="$(xwininfo -children -frame)" - elif test "$winidtype" = "-name" - then xwininfo_output="$(xwininfo -children -name "$winid")" - elif test "$winidtype" = "-id" - then - # First, check if supplied window id is valid - if ! echo "$winid" | grep -Eiq '^[[:space:]]*(0x[[:xdigit:]]+|[[:digit:]]+)[[:space:]]*$' - then - echo "Bad window ID" >&2 - exit 1 - fi - xwininfo_output="$(xwininfo -children -id "$winid")" - fi - - # Extract window id from xwininfo output - winid="$(echo "$xwininfo_output" | sed -n 's/^xwininfo:.*: \(0x[[:xdigit:]]*\).*$/\1/p')" - if test -z "$winid" - then - echo "Failed to find window" >&2 - exit 1 - fi - - # Make sure it's not root window - if echo "$xwininfo_output" | grep -Fq "Parent window id: 0x0" - then - echo "Cannot set opacity on root window" >&2 - exit 1 - fi - - # If it's not the topmost window, get the topmost window - if ! echo "$xwininfo_output" | grep -q 'Parent window id: 0x[[:xdigit:]]* (the root window)' - then - window_tree="$(xwininfo -root -tree)" - if test -z "$window_tree" - then - echo "Failed to get root window tree" >&2 - exit 1 - fi - - # Find the highest ancestor of the target window - winid="$(echo "$window_tree" \ - | sed -n "/^\s*$winid/q;s/^ \(0x[[:xdigit:]]*\).*/\1/p" \ - | tail -n 1)" - if test -z "$winid" - then - echo "Failed to find window in window tree" >&2 - exit 1 - fi - fi - if test -z "$winid" - then - echo "Failed to find the highest parent window below root of the selected window" >&2 - exit 1 - fi - - echo "$winid" -} #}} - -get_focused_window_id() -{ #{{ - id="$(xprop -root -notype -f _NET_ACTIVE_WINDOW 32x '$0' _NET_ACTIVE_WINDOW)" - echo "${id#_NET_ACTIVE_WINDOW}" -} #}} - -get_current_opacity() -{ #{{ - # Gets current opacity in the range 0-100 - # Doesn't output anything if opacity isn't set - cur="$(xprop -id "$winid" -notype -f _NET_WM_WINDOW_OPACITY 32c '$0' _NET_WM_WINDOW_OPACITY)" - cur="${cur#_NET_WM_WINDOW_OPACITY}" - cur="${cur%:*}" - test -n "$cur" && - cur=$(( cur * 100 / 0xffffffff )) - echo "$cur" -} #}} - - -get_opacity() -{ #{{ - cur="$(get_current_opacity)" - test -z "$cur" && cur=100 # Unset opacity means fully opaque - echo "$cur" - exit 0 -} #}} - -delete_opacity() -{ #{{ - xprop -id "$winid" -remove _NET_WM_WINDOW_OPACITY - exit 0 -} #}} - -reset_opacity() # Reset opacity of all windows -{ #{{ - for winid in $(xwininfo -root -tree | sed -n 's/^ \(0x[[:xdigit:]]*\).*/\1/p') - do xprop -id "$winid" -remove _NET_WM_WINDOW_OPACITY 2>/dev/null - done - exit 0 -} #}} - -set_opacity() -{ #{{ - if ! echo "$target_opacity" | grep -qE '^[+-]?[[:digit:]]+%?$' - then - if test -z "$target_opacity" - then echo "No opacity specified" >&2 - else echo "Invalid opacity specified: $target_opacity" >&2 - fi - exit 1 - fi - - # strip trailing '%' sign, if any - target_opacity="${target_opacity%%%}" - - if echo "$target_opacity" | grep -q '^[+-]' - then - current_opacity="$(get_current_opacity)" - test -z "$current_opacity" && current_opacity=100 - target_opacity=$(( current_opacity + target_opacity )) - fi - - test $target_opacity -lt 0 && target_opacity=0 - test $target_opacity -gt 100 && target_opacity=100 - - target_opacity=$(( target_opacity * 0xffffffff / 100 )) - xprop -id "$winid" -f _NET_WM_WINDOW_OPACITY 32c \ - -set _NET_WM_WINDOW_OPACITY "$target_opacity" - - exit $? -} #}} - -toggle_opacity() -{ #{{ - # If opacity is currently set, unset it. - # If opacity is currently unset, set opacity to the supplied value. If no - # value is supplied, we default to 100%. - if test -z "$(get_current_opacity)" - then - test -n "$target_opacity" || target_opacity=100 - set_opacity - else - delete_opacity - fi -} #}} - - -# Warn about rename of compton to picom -case "$0" in - *compton-trans*) echo "Warning: compton has been renamed, please use picom-trans instead" >&2;; -esac - - -# Check if both xwininfo and xprop are available -if ! command -v xprop >/dev/null || ! command -v xwininfo >/dev/null -then - echo "The command xwininfo or xprop is not available. They might reside in a package named xwininfo, xprop, x11-utils, xorg-xprop, or xorg-xwininfo" >&2 - exit 1 -fi - - -# No arguments given. Show help. -if test $# -eq 0 -then - print_usage >&2 - exit 1 -fi - - -# Variables -# action is set to 'set' by default -action=set -winid= -winidtype= -target_opacity= - -# If there's only one argument, and it's a valid opacity -# then take it as target_opacity. Else, parse all arguments. -if test $# -eq 1 && echo "$1" | grep -qE '^[+-]?[[:digit:]]+%?$' -then - target_opacity=$1 - shift -else - parse_args "$@" -fi - - -# reset_opacity doesn't need $winid -case $action in - (reset) reset_opacity;; -esac - -# Any other action needs $winid -# -# NOTE: Do NOT change the order of winid= and winidtype= below -# the output of get_target_window_id depends on $winidtype -# -# NOTE: If get_target_window_id returns with a non-zero $? -# that must mean that some error occured. So, exit with that same $? -# -winid=$(get_target_window_id) || exit $? -winidtype=-id -case $action in - (set) set_opacity;; - (get) get_opacity;; - (delete) delete_opacity;; - (toggle) toggle_opacity;; -esac - - -# We should never reach this part of the file -echo "This sentence shouldn't have been printed. Please file a bug report." >&2 -exit 128 - - -# vim:ft=sh:ts=4:sts=4:sw=2:et:fdm=marker:fmr=#{{,#}}:nowrap diff --git a/picom-dbus.desktop b/compfy-dbus.desktop index 5f35c8e..9822d0c 100644 --- a/picom-dbus.desktop +++ b/compfy-dbus.desktop @@ -2,10 +2,10 @@ Version=1.0 Type=Application NoDisplay=true -Name=picom (dbus) +Name=compfy (dbus) GenericName=X compositor (dbus) Comment=An X compositor with dbus backend enabled Categories=Utility; Keywords=compositor;composite manager;window effects;transparency;opacity; -TryExec=picom -Exec=picom --dbus +TryExec=compfy +Exec=compfy --dbus diff --git a/picom.desktop b/compfy.desktop index 051e893..4231820 100644 --- a/picom.desktop +++ b/compfy.desktop @@ -2,13 +2,13 @@ Version=1.0 Type=Application NoDisplay=false -Name=picom +Name=compfy GenericName=X compositor Comment=An X compositor Categories=Utility; Keywords=compositor;composite manager;window effects;transparency;opacity; -TryExec=picom -Exec=picom +TryExec=compfy +Exec=compfy StartupNotify=false Terminal=false # Thanks to quequotion for providing this file! diff --git a/picom.sample.conf b/compfy.sample.conf index be60b3d..be60b3d 100644 --- a/picom.sample.conf +++ b/compfy.sample.conf @@ -13,23 +13,26 @@ flake-utils.lib.eachDefaultSystem ( system: let pkgs = nixpkgs.legacyPackages.${system}; - nativeBuildInputs = with pkgs; []; - buildInputs = with pkgs; [pcre2]; + nativeBuildInputs = with pkgs; [ go-md2man ]; + buildInputs = with pkgs; [ pcre2 ]; in { devShells.default = pkgs.mkShell {inherit nativeBuildInputs buildInputs;}; packages = rec { - default = picom-allusive; - picom-allusive = pkgs.picom.overrideAttrs (_old: { + default = compfy; + compfy = pkgs.picom.overrideAttrs (_old: { src = ./.; + name = "compfy"; buildInputs = buildInputs ++ _old.buildInputs; nativeBuildInputs = nativeBuildInputs ++ _old.nativeBuildInputs; + postInstall = ''''; + mainProgram = "compfy"; }); }; overlays = rec { - default = picom-allusive; - picom-allusive = self.packages.default; + default = compfy; + compfy = self.packages.default; }; } ); diff --git a/man/compfy.1 b/man/compfy.1 new file mode 100644 index 0000000..a105c1b --- /dev/null +++ b/man/compfy.1 @@ -0,0 +1,696 @@ +.nh +.TH Compfy +.SH Guide for Configuring Compfy +.SS Config can be placed at either \fB\fC~/.config/compfy.conf\fR or \fB\fC~/.config/compfy/compfy.conf\fR + +.SH Options +.SH corner-radius +.PP +\fIBy default this is set to 12 in the sample config\fP + +.PP +Adjusts the window corner rounding in pixels. + +.SH rounded-corners-exclude [] +.PP +\fIBy default this rule-set is empty\fP + +.PP +Here you can declare rules of what windows will not have their borders rounded. This can be good for some games that go full screen but still have rounded borders. + +.PP +Here is an example + +.PP +.RS + +.nf +rounded-corners-exclude = [ + "class_g = 'Alacritty'", +]; + +.fi +.RE + +.SH corners-rule [] +.PP +\fIBy default this rule-set is empty\fP + +.PP +Within this rule-set you can explicitly declare the corner-radius of individual windows based on their name or class name attributes. + +.PP +It functions in a similar way to \fB\fCopacity-rule\fR in that the number you put before the window name is the amount of rounding you want applied to that window. + +.PP +Currently you can only use number 1-100. This may be fixed in later updates. + +.PP +.RS + +.nf +corners-rule = [ + "20:class_g = 'Polybar'", + "15:class_g = 'Dunst'", +]; + +.fi +.RE + +.SH shadow +.PP +\fIBy default this will be set to \fB\fCfalse\fR in the sample config\fP + +.PP +Enables shadows for windows. + +.PP +Shadows tend to be a bit finicky on some window managers, so make sure to play around with it and see what is best for you. + +.SH shadow-radius +.PP +\fIBy default this is set to 12\fP + +.PP +Shadow radius/roundness in pixels. + +.SH shadow-opacity +.PP +\fIBy default this is set to 0.75 (0.0 ~ 1.0)\fP + +.PP +Set the opacity of the window shadow. + +.SH shadow-offset-x +.PP +\fIBy default this is set to -15 (-100 ~ 100)\fP + +.PP +Set the offset of the shadow along the x-axis. + +.SH shadow-offset-y +.PP +\fIBy default this is set to -15 (-100 ~ 100)\fP + +.PP +Set the offset of the shadow along the y-axis. + +.SH shadow-color +.PP +The color for shadows as a HEX code. + +.PP +.RS + +.nf +shadow-color = "#101010"; + +.fi +.RE + +.SH shadow-exclude [] +.PP +\fIBy default this rule-set is empty\fP + +.PP +Declare windows which will not render a shadow. + +.SH fading +.PP +\fIBy default this is set to \fB\fCtrue\fR in the sample config\fP + +.PP +\fIFade windows in/out when opening/closing and when opacity changes\fP + +.PP +Fading is required for unmap animations to work. + +.SH fade-in-step +.PP +\fIBy default this is set to \fB\fC0.03\fR in the sample config\fP + +.PP +\fIOpacity change between steps while fading in. (0.01 - 1.0)\fP + +.PP +Increasing this value will result in faster fading in of windows. +Decreasing makes the fading in of windows take longer. (This does not means the animations take longer, just the fading). + +.SH fade-out-step +.PP +\fIBy default this is set to \fB\fC0.03\fR in the sample config\fP + +.PP +\fIOpacity change between steps while fading out. (0.01 - 1.0)\fP + +.PP +Increasing this value will result in faster fading out AND animating out of windows. +Decreasing this makes fading and animating out take longer. + +.SH fade-delta +.PP +\fIBy default this is set to \fB\fC5\fR\fP + +.PP +\fIThe time between steps in fade step, in milliseconds. ( > 0)\fP + +.PP +Currently unsure what this does but it is recommended to keep it at the default. + +.SH fade-exclude [] +.PP +\fIEmpty by default\fP + +.PP +\fISpecify a list of windows that should not be faded.\fP + +.PP +.RS + +.nf +fade-exclude = [ + "class_g = 'foo'" +] + +.fi +.RE + +.SH inactive-opacity +.PP +\fIBy default this is set to 1.0 (0.0 - 1.0)\fP + +.PP +Declares the opacity of unfocused windows. + +.SH frame-opacity +.PP +\fIBy default this is set to 1.0 (0.0 - 1.0)\fP + +.PP +Declares the opacity of window borders and title-bars. + +.SH inactive-opacity-override +.PP +\fIBy default this is set to false (true/false)\fP + +.PP +If this is not enabled then windows which have their opacity set in \fB\fCopacity-rule\fR or \fB\fCwintypes\fR will not be affected by \fB\fCinactive-opacity\fR\&. Enable this to fix that. + +.SH active-opacity +.PP +\fIBy default this is set to 1.0 (0.0 - 1.0)\fP + +.PP +Declares the opacity of focused windows. + +.SH active-opacity-exclude [] +.PP +\fIBy default this rule-set is empty\fP + +.PP +A list of windows that should never have their opacity changed by \fB\fCactive-opacity\fR when focused. + +.SH inactive-exclude [] +.PP +\fIBy default this rule-set is empty\fP + +.PP +A list of windows that should have their \fB\fCinactive-opacity\fR set to whatever the \fB\fCactive-opacity\fR is. Unless the window is also in \fB\fCactive-opacity-exclude\fR then it will be set to \fB\fC1.0\fR or if it is set in \fB\fCopacity-rule\fR it will use the opacity set there as the \fB\fCinactive-opacity\fR\&. + +.PP +Also excludes inactive dimming. + +.SH focus-exclude [] +.PP +\fIBy default this rule-set is empty\fP + +.PP +Declare windows that should always be considered to be focused by the compositor. + +.SH opacity-rule [] +.PP +\fIBy default this rule-set is empty\fP + +.PP +Declare windows that should have their opacity hard set. As an example. Where 95 is can be anything between (0 - 100) + +.PP +.RS + +.nf +opacity-rule = [ + "95:class_g = 'Alacritty'", +]; + +.fi +.RE + +.SH blur-background +.PP +\fIBy default this is set to false\fP + +.PP +Toggle background blurring + +.SH blur-method +.PP +\fIBy default this is set to \fB\fCnone\fR\fP + +.PP +Selects the blur method. Available options are: + +.RS +.IP \(bu 2 +none +.IP \(bu 2 +kernel +.IP \(bu 2 +gaussian +.IP \(bu 2 +box +.IP \(bu 2 +dual_kawase (most used) + +.RE + +.SH blur-radius +.PP +\fIBy default this is set to 3\fP + +.PP +Sets the radius of the blur. + +.SH blur-strength +.PP +\fIBy default this is set to 5\fP + +.PP +Sets the strength/intensity of the blur. + +.SH blur-whitelist +.PP +\fIDefaults to \fB\fCtrue\fR (true / false)\fP + +.PP +Toggle whether you want to use blurring on a whitelist basis(blur-include) or a blacklist basis(blur-exclude). + +.SH blur-include +.PP +\fIBy default this rule set is empty\fP + +.PP +This acts a a whitelist for blurring the background of windows. See the example below. +Using a whitelist helps to reduce hardware consumption. + +.PP +.RS + +.nf +blur-rule = [ + "class_g = 'kitty'", + "class_g = 'Emacs'", + "class_g = 'Rofi'" +]; + +.fi +.RE + +.SH blur-exclude +.PP +\fIBy default this rule set is empty\fP + +.PP +When used with \fB\fCblur-whitelist = false;\fR this will exclude specific windows from having their background blurred. + +.PP +.RS + +.nf +blur-exclude = [ + "class_g = 'Firefox'" +]; + +.fi +.RE + +.PP +The part of the wiki you have probably all come for. + +.SH animations +.PP +\fIBy default this option is set to \fB\fCtrue\fR\fP(true/false) + +.PP +\fIToggles whether animations should be used for windows\fP + +.SH animation-stiffness +.PP +\fIBy default this is set to \fB\fC100\fR\fP + +.PP +\fIChanges the stiffness of animations\fP + +.PP +What stiffness basically is inferring is how much the window geometry will be stretched when opening/closing windows. It's best illustrated in the video below. + +.PP +With a higher stiffness the windows go to the final animation position faster resulting in a snappier looking transition. + +.SH animation-window-mass +.PP +\fIBy default this is set to \fB\fC0.5\fR\fP + +.PP +\fIChanges the mass of windows\fP + +.PP +Modifying the mass of windows makes them virtually heavier and therefore slower to animate. + +.SH animation-dampening +.PP +\fIBy default this is set to \fB\fC10\fR\fP + +.PP +\fIChanges the dampening applied to windows during the animation\fP + +.PP +This setting basically does what it says. It dampens the animation of windows. + +.PP +The more windows are dampened, the slower/softer they come into and out of view. + +.SH animation-clamping +.PP +\fIBy default this is set to \fB\fCfalse\fR\fP (true/false) + +.PP +\fIToggles window clamping\fP + +.PP +Stop the animation from making the window exceed its set geometry. Shoutout to @thecodsman +\[la]https://github.com/thecodsman\[ra] for finding this out. + +.PP +Basically if you are using a animation setting that would make the window extend larger than it would be after the animation has played then it will cut the animation off once the window reaches its physical geometry. + +.SH animation-for-open-window +.PP +\fIBy default this is set to \fB\fCzoom\fR\fP + +.PP +Options: +- \fB\fCfly-in\fR \fINewly opened windows will fly in from a random position on the edge of the screen\fP +- \fB\fCzoom\fR \fINewly opened windows will zoom in from the center point of wherever they were going to appear\fP +- \fB\fCslide-up\fR \fINewly opened windows will slide up from the bottom of screen\fP +- \fB\fCslide-down\fR \fINewly opened windows will slide down from the top of the screen\fP +- \fB\fCslide-left\fR \fINewly opened windows will slide in from the right of where they are opened\fP +- \fB\fCslide-right\fR \fINewly opened windows will slide in from the left of where they are opened\fP +- \fB\fCauto\fR \fINewly opened windows will not have an animation\fP + +.PP +Feel free to play around with these options to see which animation you prefer. + +.SH animation-for-unmap-window +.PP +\fIBy default this is set to \fB\fCzoom\fR\fP + +.PP +\fIDefines the animation for when windows are closed/killed\fP + +.PP +Options: +- \fB\fCfly-in\fR \fINewly closed windows will fly out to a random position on the edge of the screen\fP +- \fB\fCzoom\fR \fINewly closed windows will zoom out from the center point of the window\fP +- \fB\fCslide-up\fR \fINewly closed windows will slide up from where they were closed\fP +- \fB\fCslide-down\fR \fINewly closed windows will slide down from where they were closed\fP +- \fB\fCslide-left\fR \fINewly closed windows will slide out from the right of where they are opened\fP +- \fB\fCslide-right\fR \fINewly closed windows will slide out from the left of where they are opened\fP +- \fB\fCauto\fR \fINewly closed windows will not have an animation\fP + +.PP +Feel free to play around with these options to see which animation you prefer. + +.SH animation-open-exclude +.PP +\fIBy default this rule-set is empty\fP + +.PP +Define windows that will not render any open animation. + +.PP +Example + +.PP +.RS + +.nf +animation-open-exclude = [ + "class_g = 'Alacritty'" +]; + +.fi +.RE + +.SH animation-unmap-exclude +.PP +\fIBy default this rule-set is empty\fP + +.PP +Define windows that will not render any closing animation. + +.PP +Example + +.PP +.RS + +.nf +animation-unmap-exclude = [ + "class_g = 'Alacritty'" +]; + +.fi +.RE + + +.SH Using wintypes. +.PP +In picom you can set many options on the basis of what the windows 'type' is. + +.PP +Listed below are the available types. +I can't say what applications or windows all of these link to so you will have to play with them to find what works. + +.PP +.RS + +.nf +wintypes: +{ + desktop = {}; + dock = {}; + toolbar = {}; + menu = {}; + utility = {}; + splash = {}; + dialog = {}; + normal = {}; + dropdown_menu = {}; + popup_menu = {}; + tooltip = {}; + notification = {}; + combo = {}; + dnd = {}; +} + +.fi +.RE + +.SH Wintype Options +.PP +You can pass multiple options into one window type. Below is an example: + +.PP +.RS + +.nf +wintypes: +{ + normal = { shadow = true; fade = false; animation = "slide-down"; }; +} + +.fi +.RE + +.PP +Below is all the options you can pass into wintypes. + +.SS shadow +.PP +Toggle shadows. ( true / false ) + +.PP +.RS + +.nf +wintypes: +{ + popup_menu = { shadow = true; }; +} + +.fi +.RE + +.SS fade +.PP +Toggle fading. ( true / false ) + +.PP +.RS + +.nf +wintypes: +{ + popup_menu = { fade = false; }; +} + +.fi +.RE + +.SS focus +.PP +If focus was true, then that wintype would always be considered focus and therefore not be affected by inactive-opacity or inactive-dim. +If false, it is always considered inactive/unfocused and then always applies those effects. + +.PP +( true / false ) + +.PP +.RS + +.nf +wintypes: +{ + menu = { focus = true; }; +} + +.fi +.RE + +.SS blur-background +.PP +Toggle background blurring for windows under that type. ( true / false ) + +.PP +Setting this to false will not actually do anything since blurring is done on a whitelist basis. + +.PP +.RS + +.nf +wintypes: +{ + desktop = { blur-background = true; }; +} + +.fi +.RE + +.SS full-shadow +.PP +Toggle full shadow. ( true / false ) + +.PP +Not sure what full shadow is at the moment. + +.PP +.RS + +.nf +wintypes: +{ + dropdown_menu = { full-shadow = false; }; +} + +.fi +.RE + +.SS redir-ignore +.PP +Toggle redirect ignoring. ( true / false ) + +.PP +.RS + +.nf +wintypes: +{ + dock = { redir-ignore = true; }; +} + +.fi +.RE + +.SS clip-shadow-above +.PP +Toggle clipping shadows above a window. ( true / false ) + +.PP +.RS + +.nf +wintypes: +{ + utility = { clip-shadow-above = true; }; +} + +.fi +.RE + +.SS opacity +.PP +Set the opacity, both inactive and active. ( 0.0 ~ 1.0 ) + +.PP +.RS + +.nf +wintypes: +{ + popup_menu = { opacity = 0.5; }; +} + +.fi +.RE + +.SS animation +.PP +Set the open animation for specific wintypes. ( See \fB\fCanimation-for-open-window\fR under the Animations page for available options ) + +.PP +.RS + +.nf +wintypes: +{ + popup_menu = { animation = "slide-right"; }; +} + +.fi +.RE + +.SS animation-unmap +.PP +Set the close animation for specific wintypes. ( See \fB\fCanimation-for-unmap-window\fR under the Animations page for available options ) + +.PP +.RS + +.nf +wintypes: +{ + tooltip = { animation-unmap = "fly-in"; }; +} + +.fi +.RE diff --git a/man/compfy.md b/man/compfy.md new file mode 100644 index 0000000..15f5169 --- /dev/null +++ b/man/compfy.md @@ -0,0 +1,517 @@ +# Compfy + +## Guide for Configuring Compfy + +#### Config can be placed at either `~/.config/compfy.conf` or `~/.config/compfy/compfy.conf` + +# Options + +## corner-radius + +_By default this is set to 12 in the sample config_ + +Adjusts the window corner rounding in pixels. + +## rounded-corners-exclude [] + +_By default this rule-set is empty_ + +Here you can declare rules of what windows will not have their borders rounded. This can be good for some games that go full screen but still have rounded borders. + +Here is an example + +``` +rounded-corners-exclude = [ + "class_g = 'Alacritty'", +]; +``` + +## corners-rule [] + +_By default this rule-set is empty_ + +Within this rule-set you can explicitly declare the corner-radius of individual windows based on their name or class name attributes. + +It functions in a similar way to `opacity-rule` in that the number you put before the window name is the amount of rounding you want applied to that window. + +Currently you can only use number 1-100. This may be fixed in later updates. + +``` +corners-rule = [ + "20:class_g = 'Polybar'", + "15:class_g = 'Dunst'", +]; +``` + +## shadow + +_By default this will be set to `false` in the sample config_ + +Enables shadows for windows. + +Shadows tend to be a bit finicky on some window managers, so make sure to play around with it and see what is best for you. + +## shadow-radius + +_By default this is set to 12_ + +Shadow radius/roundness in pixels. + +## shadow-opacity + +_By default this is set to 0.75 (0.0 ~ 1.0)_ + +Set the opacity of the window shadow. + +## shadow-offset-x + +_By default this is set to -15 (-100 ~ 100)_ + +Set the offset of the shadow along the x-axis. + +## shadow-offset-y + +_By default this is set to -15 (-100 ~ 100)_ + +Set the offset of the shadow along the y-axis. + +## shadow-color + +The color for shadows as a HEX code. + +``` +shadow-color = "#101010"; +``` + +## shadow-exclude [] + +_By default this rule-set is empty_ + +Declare windows which will not render a shadow. + +## fading + +_By default this is set to `true` in the sample config_ + +_Fade windows in/out when opening/closing and when opacity changes_ + +Fading is required for unmap animations to work. + +## fade-in-step + +_By default this is set to `0.03` in the sample config_ + +_Opacity change between steps while fading in. (0.01 - 1.0)_ + +Increasing this value will result in faster fading in of windows. +Decreasing makes the fading in of windows take longer. (This does not means the animations take longer, just the fading). + +## fade-out-step + +_By default this is set to `0.03` in the sample config_ + +_Opacity change between steps while fading out. (0.01 - 1.0)_ + +Increasing this value will result in faster fading out AND animating out of windows. +Decreasing this makes fading and animating out take longer. + +## fade-delta + +_By default this is set to `5`_ + +_The time between steps in fade step, in milliseconds. ( > 0)_ + +Currently unsure what this does but it is recommended to keep it at the default. + +## fade-exclude [] + +_Empty by default_ + +_Specify a list of windows that should not be faded._ + +``` +fade-exclude = [ + "class_g = 'foo'" +] +``` + +## inactive-opacity + +_By default this is set to 1.0 (0.0 - 1.0)_ + +Declares the opacity of unfocused windows. + +## frame-opacity + +_By default this is set to 1.0 (0.0 - 1.0)_ + +Declares the opacity of window borders and title-bars. + +## inactive-opacity-override + +_By default this is set to false (true/false)_ + +If this is not enabled then windows which have their opacity set in `opacity-rule` or `wintypes` will not be affected by `inactive-opacity`. Enable this to fix that. + +## active-opacity + +_By default this is set to 1.0 (0.0 - 1.0)_ + +Declares the opacity of focused windows. + +## active-opacity-exclude [] + +_By default this rule-set is empty_ + +A list of windows that should never have their opacity changed by `active-opacity` when focused. + +## inactive-exclude [] + +_By default this rule-set is empty_ + +A list of windows that should have their `inactive-opacity` set to whatever the `active-opacity` is. Unless the window is also in `active-opacity-exclude` then it will be set to `1.0` or if it is set in `opacity-rule` it will use the opacity set there as the `inactive-opacity`. + +Also excludes inactive dimming. + +## focus-exclude [] + +_By default this rule-set is empty_ + +Declare windows that should always be considered to be focused by the compositor. + +## opacity-rule [] + +_By default this rule-set is empty_ + +Declare windows that should have their opacity hard set. As an example. Where 95 is can be anything between (0 - 100) + +``` +opacity-rule = [ + "95:class_g = 'Alacritty'", +]; +``` + +## blur-background + +_By default this is set to false_ + +Toggle background blurring + +## blur-method + +_By default this is set to `none`_ + +Selects the blur method. Available options are: + +- none +- kernel +- gaussian +- box +- dual_kawase (most used) + +## blur-radius + +_By default this is set to 3_ + +Sets the radius of the blur. + +## blur-strength + +_By default this is set to 5_ + +Sets the strength/intensity of the blur. + +## blur-whitelist + +_Defaults to `true` (true / false)_ + +Toggle whether you want to use blurring on a whitelist basis(blur-include) or a blacklist basis(blur-exclude). + +## blur-include + +_By default this rule set is empty_ + +This acts a a whitelist for blurring the background of windows. See the example below. +Using a whitelist helps to reduce hardware consumption. + +``` +blur-rule = [ + "class_g = 'kitty'", + "class_g = 'Emacs'", + "class_g = 'Rofi'" +]; +``` + +## blur-exclude + +_By default this rule set is empty_ + +When used with `blur-whitelist = false;` this will exclude specific windows from having their background blurred. + +``` +blur-exclude = [ + "class_g = 'Firefox'" +]; +``` + +The part of the wiki you have probably all come for. + +## animations + +_By default this option is set to `true`_(true/false) + +_Toggles whether animations should be used for windows_ + + +## animation-stiffness + +_By default this is set to `100`_ + +_Changes the stiffness of animations_ + +What stiffness basically is inferring is how much the window geometry will be stretched when opening/closing windows. It's best illustrated in the video below. + +With a higher stiffness the windows go to the final animation position faster resulting in a snappier looking transition. + +## animation-window-mass + +_By default this is set to `0.5`_ + +_Changes the mass of windows_ + +Modifying the mass of windows makes them virtually heavier and therefore slower to animate. + +## animation-dampening + +_By default this is set to `10`_ + +_Changes the dampening applied to windows during the animation_ + +This setting basically does what it says. It dampens the animation of windows. + +The more windows are dampened, the slower/softer they come into and out of view. + +## animation-clamping + +_By default this is set to `false`_ (true/false) + +_Toggles window clamping_ + +Stop the animation from making the window exceed its set geometry. Shoutout to [@thecodsman](https://github.com/thecodsman) for finding this out. + +Basically if you are using a animation setting that would make the window extend larger than it would be after the animation has played then it will cut the animation off once the window reaches its physical geometry. + +## animation-for-open-window + +_By default this is set to `zoom`_ + +Options: +- `fly-in` _Newly opened windows will fly in from a random position on the edge of the screen_ +- `zoom` _Newly opened windows will zoom in from the center point of wherever they were going to appear_ +- `slide-up` _Newly opened windows will slide up from the bottom of screen_ +- `slide-down` _Newly opened windows will slide down from the top of the screen_ +- `slide-left` _Newly opened windows will slide in from the right of where they are opened_ +- `slide-right` _Newly opened windows will slide in from the left of where they are opened_ +- `auto` _Newly opened windows will not have an animation_ + +Feel free to play around with these options to see which animation you prefer. + +## animation-for-unmap-window + +_By default this is set to `zoom`_ + +_Defines the animation for when windows are closed/killed_ + +Options: +- `fly-in` _Newly closed windows will fly out to a random position on the edge of the screen_ +- `zoom` _Newly closed windows will zoom out from the center point of the window_ +- `slide-up` _Newly closed windows will slide up from where they were closed_ +- `slide-down` _Newly closed windows will slide down from where they were closed_ +- `slide-left` _Newly closed windows will slide out from the right of where they are opened_ +- `slide-right` _Newly closed windows will slide out from the left of where they are opened_ +- `auto` _Newly closed windows will not have an animation_ + +Feel free to play around with these options to see which animation you prefer. + +## animation-open-exclude + +_By default this rule-set is empty_ + +Define windows that will not render any open animation. + +Example +``` +animation-open-exclude = [ + "class_g = 'Alacritty'" +]; +``` + +## animation-unmap-exclude + +_By default this rule-set is empty_ + +Define windows that will not render any closing animation. + +Example +``` +animation-unmap-exclude = [ + "class_g = 'Alacritty'" +]; +``` + +# Using wintypes. + +In picom you can set many options on the basis of what the windows 'type' is. + +Listed below are the available types. +I can't say what applications or windows all of these link to so you will have to play with them to find what works. +``` +wintypes: +{ + desktop = {}; + dock = {}; + toolbar = {}; + menu = {}; + utility = {}; + splash = {}; + dialog = {}; + normal = {}; + dropdown_menu = {}; + popup_menu = {}; + tooltip = {}; + notification = {}; + combo = {}; + dnd = {}; +} +``` + +## Wintype Options + +You can pass multiple options into one window type. Below is an example: + +``` +wintypes: +{ + normal = { shadow = true; fade = false; animation = "slide-down"; }; +} +``` + + +Below is all the options you can pass into wintypes. + +### shadow + +Toggle shadows. ( true / false ) + +``` +wintypes: +{ + popup_menu = { shadow = true; }; +} +``` + +### fade + +Toggle fading. ( true / false ) + +``` +wintypes: +{ + popup_menu = { fade = false; }; +} +``` + +### focus + +If focus was true, then that wintype would always be considered focus and therefore not be affected by inactive-opacity or inactive-dim. +If false, it is always considered inactive/unfocused and then always applies those effects. + +( true / false ) + +``` +wintypes: +{ + menu = { focus = true; }; +} +``` + +### blur-background + +Toggle background blurring for windows under that type. ( true / false ) + +Setting this to false will not actually do anything since blurring is done on a whitelist basis. + +``` +wintypes: +{ + desktop = { blur-background = true; }; +} +``` + +### full-shadow + +Toggle full shadow. ( true / false ) + +Not sure what full shadow is at the moment. + +``` +wintypes: +{ + dropdown_menu = { full-shadow = false; }; +} +``` + +### redir-ignore + +Toggle redirect ignoring. ( true / false ) + +``` +wintypes: +{ + dock = { redir-ignore = true; }; +} +``` + +### clip-shadow-above + +Toggle clipping shadows above a window. ( true / false ) + +``` +wintypes: +{ + utility = { clip-shadow-above = true; }; +} +``` + +### opacity + +Set the opacity, both inactive and active. ( 0.0 ~ 1.0 ) + +``` +wintypes: +{ + popup_menu = { opacity = 0.5; }; +} +``` + +### animation + +Set the open animation for specific wintypes. ( See `animation-for-open-window` under the Animations page for available options ) + +``` +wintypes: +{ + popup_menu = { animation = "slide-right"; }; +} +``` + +### animation-unmap + +Set the close animation for specific wintypes. ( See `animation-for-unmap-window` under the Animations page for available options ) + +``` +wintypes: +{ + tooltip = { animation-unmap = "fly-in"; }; +} +``` diff --git a/man/picom-trans.1.asciidoc b/man/picom-trans.1.asciidoc deleted file mode 100644 index 22b1dd2..0000000 --- a/man/picom-trans.1.asciidoc +++ /dev/null @@ -1,114 +0,0 @@ -picom-trans(1) -================ -:doctype: manpage -:man source: picom -:man version: {picom-version} -:man manual: User Commands - -NAME ----- -picom-trans - an opacity setter tool - -SYNOPSIS --------- - -*picom-trans* [-w 'WINDOW_ID'] [-n 'WINDOW_NAME'] [-c] [-s] 'OPACITY' - -DESCRIPTION ------------ - -*picom-trans* is a bash script that sets '_NET_WM_WINDOW_OPACITY' attribute of a window using standard X11 command-line utilities, including *xprop*(1) and *xwininfo*(1). It is similar to *transset*(1) or *transset-df*(1). - -OPTIONS -------- -*-w*, *--window*='WINDOW_ID':: -Specify the window id of the target window. - -*-n*, *--name*='WINDOW_NAME':: -Specify and try to match a window name. - -*-c*, *--current*:: -Specify the currently active window as target. Only works if EWMH '_NET_ACTIVE_WINDOW' property exists on root window. - -*-s*, *--select*:: -Select target window with mouse cursor. This is the default if no window has been specified. - -*-o*, *--opacity*='OPACITY':: -Specify the new opacity value for the window. This value can be anywhere from 1-100. If it is prefixed with a plus or minus (+/-), this will increment or decrement from the target window's current opacity instead. - -*-g*, *--get*:: -Print the target window's opacity instead of setting it. - -*-d*, *--delete*:: -Delete opacity of the target window instead of setting it. - -*-t*, *--toggle*:: -Toggle the target window's opacity: Set opacity if not already set, and delete if already set. - -*-r*, *--reset*:: -Reset opacity for all windows instead of setting it. - -EXAMPLES --------- - -* Set the opacity of the window with specific window ID to 75%: -+ ------------- -picom-trans -w "$WINDOWID" 75 ------------- - -* Set the opacity of the window with the name "urxvt" to 75%: -+ ------------- -picom-trans -n "urxvt" 75 ------------- - -* Set current window to opacity of 75%: -+ ------------- -picom-trans -c 75 ------------- - -* Select target window and set opacity to 75%: -+ ------------- -picom-trans -s 75 ------------- - -* Increment opacity of current active window by 5%: -+ ------------- -picom-trans -c +5 ------------- - -* Decrement opacity of current active window by 5%: -+ ------------- -picom-trans -c -- -5 ------------- - -* Delete current window's opacity: -+ ------------- -picom-trans -c --delete ------------- - -* Toggle current window's opacity between 90 and unset -+ ------------- -picom-trans -c --toggle 90 ------------- - -* Reset all windows: -+ ------------- -picom-trans --reset ------------- - -BUGS ----- -Please submit bug reports to <https://github.com/yshui/picom>. - -SEE ALSO --------- -link:picom.1.html[*picom*(1)], *xprop*(1), *xwininfo*(1) diff --git a/man/picom.1 b/man/picom.1 deleted file mode 100644 index 9edffa8..0000000 --- a/man/picom.1 +++ /dev/null @@ -1,1049 +0,0 @@ -'\" t -.\" Title: picom -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 09/19/2023 -.\" Manual: User Commands -.\" Source: picom -.\" Language: English -.\" -.TH "PICOM" "1" "09/19/2023" "picom" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -picom \- a compositor for X11 -.SH "SYNOPSIS" -.sp -\fBpicom\fR [\fIOPTIONS\fR] -.SH "DESCRIPTION" -.sp -picom is a compositor for X11 which gives features to WM and DE such as opacity, blurring, rounded edges, shadows and most importantly\&. Animations! -.SH "OPTIONS" -.PP -\fB\-h\fR, \fB\-\-help\fR -.RS 4 -Get the usage text embedded in program code, which may be more up\-to\-date than this man page\&. -.RE -.PP -\fB\-r\fR, \fB\-\-shadow\-radius\fR=\fIRADIUS\fR -.RS 4 -The blur radius for shadows, in pixels\&. (defaults to 12) -.RE -.PP -\fB\-o\fR, \fB\-\-shadow\-opacity\fR=\fIOPACITY\fR -.RS 4 -The opacity of shadows\&. (0\&.0 \- 1\&.0, defaults to 0\&.75) -.RE -.PP -\fB\-l\fR, \fB\-\-shadow\-offset\-x\fR=\fIOFFSET\fR -.RS 4 -The left offset for shadows, in pixels\&. (defaults to \-15) -.RE -.PP -\fB\-t\fR, \fB\-\-shadow\-offset\-y\fR=\fIOFFSET\fR -.RS 4 -The top offset for shadows, in pixels\&. (defaults to \-15) -.RE -.PP -\fB\-I\fR, \fB\-\-fade\-in\-step\fR=\fIOPACITY_STEP\fR -.RS 4 -Opacity change between steps while fading in\&. (0\&.01 \- 1\&.0, defaults to 0\&.028) -.RE -.PP -\fB\-O\fR, \fB\-\-fade\-out\-step\fR=\fIOPACITY_STEP\fR -.RS 4 -Opacity change between steps while fading out\&. (0\&.01 \- 1\&.0, defaults to 0\&.03) -.RE -.PP -\fB\-D\fR, \fB\-\-fade\-delta\fR=\fIMILLISECONDS\fR -.RS 4 -The time between steps in fade step, in milliseconds\&. (> 0, defaults to 10) -.RE -.PP -\fB\-m\fR, \fB\-\-menu\-opacity\fR=\fIOPACITY\fR -.RS 4 -Default opacity for dropdown menus and popup menus\&. (0\&.0 \- 1\&.0, defaults to 1\&.0) -.RE -.PP -\fB\-c\fR, \fB\-\-shadow\fR -.RS 4 -Enabled client\-side shadows on windows\&. Note desktop windows (windows with -\fI_NET_WM_WINDOW_TYPE_DESKTOP\fR) never get shadow, unless explicitly requested using the wintypes option\&. -.RE -.PP -\fB\-f\fR, \fB\-\-fading\fR -.RS 4 -Fade windows in/out when opening/closing and when opacity changes, unless -\fB\-\-no\-fading\-openclose\fR -is used\&. -.RE -.PP -\fB\-F\fR -.RS 4 -Equals to -\fB\-f\fR\&. Deprecated\&. -.RE -.PP -\fB\-\-animations\fR -.RS 4 -Run animations for window geometry changes (movement and scaling)\&. We use spring\-based animations, which are parametrized by -\fB\-\-animation\-stiffness\fR, -\fB\-\-animation\-dampening\fR, -\fB\-\-animation\-window\-mass\fR -and -\fB\-\-animation\-clamp\fR\&. - -A useful resource for selecting animation parameters is -https://react\-spring\-visualizer\&.com/, which allows you to interactively try out various parameters and see the resulting animation curve\&. Or you can just edit the values in the config file, which is automatically reloaded\&. -.RE -.PP -\fB\-\-animation\-for\-open\-window\fR -.RS 4 -Which animation to run when opening a window\&. Must be one of -none, -fly\-in, -zoom -(default: -none)\&. -.RE -.PP -\fB\-\-animation\-stiffness\fR -.RS 4 -Stiffness (a\&.k\&.a\&. tension) parameter for spring\-based animation (default: 200\&.0)\&. -.RE -.PP -\fB\-\-animation\-dampening\fR -.RS 4 -Dampening (a\&.k\&.a\&. friction) parameter for spring\-based animation (default: 25\&.0)\&. -.RE -.PP -\fB\-\-animation\-window\-mass\fR -.RS 4 -Mass parameter for spring\-based animation (default: 1\&.0)\&. -.RE -.PP -\fB\-\-animation\-clamping\fR -.RS 4 -Whether to clamp animations (default: true)\&. -.sp -.if n \{\ -.RS 4 -.\} -.nf -**NOTE:** With clamping disabled, on very low performance conditions (e\&.g\&., over 100ms to render an animation frame), windows may diverge\&. If this is your case, it is strongly advised to keep clamping on, as it protects against that\&. -.fi -.if n \{\ -.RE -.\} -.RE -.PP -\fB\-i\fR, \fB\-\-inactive\-opacity\fR=\fIOPACITY\fR -.RS 4 -Opacity of inactive windows\&. (0\&.1 \- 1\&.0, defaults to 1\&.0) -.RE -.PP -\fB\-e\fR, \fB\-\-frame\-opacity\fR=\fIOPACITY\fR -.RS 4 -Opacity of window titlebars and borders\&. (0\&.1 \- 1\&.0, disabled by default) -.RE -.PP -\fB\-b\fR, \fB\-\-daemon\fR -.RS 4 -Daemonize process\&. Fork to background after initialization\&. This option can only be set from the command line, setting this in the configuration file will have no effect\&. -.RE -.PP -\fB\-\-log\-level\fR -.RS 4 -Set the log level\&. Possible values are "TRACE", "DEBUG", "INFO", "WARN", "ERROR", in increasing level of importance\&. Case doesn\(cqt matter\&. If using the "TRACE" log level, it\(cqs better to log into a file using -\fB\-\-log\-file\fR, since it can generate a huge stream of logs\&. -.RE -.PP -\fB\-\-log\-file\fR -.RS 4 -Set the log file\&. If -\fB\-\-log\-file\fR -is never specified, logs will be written to stderr\&. Otherwise, logs will to written to the given file, though some of the early logs might still be written to the stderr\&. When setting this option from the config file, it is recommended to use an absolute path\&. -.RE -.PP -\fB\-\-experimental\-backends\fR -.RS 4 -Use the new, reimplemented version of the backends\&. The new backends are HIGHLY UNSTABLE at this point, you have been warned\&. This option is not available in the config file\&. -.RE -.PP -\fB\-\-show\-all\-xerrors\fR -.RS 4 -Show all X errors (for debugging)\&. -.RE -.PP -\fB\-\-config\fR \fIPATH\fR -.RS 4 -Look for configuration file at the path\&. See -\fBCONFIGURATION FILES\fR -section below for where picom looks for a configuration file by default\&. Use -/dev/null -to avoid loading configuration file\&. -.RE -.PP -\fB\-\-write\-pid\-path\fR \fIPATH\fR -.RS 4 -Write process ID to a file\&. it is recommended to use an absolute path\&. -.RE -.PP -\fB\-\-shadow\-color\fR \fISTRING\fR -.RS 4 -Color of shadow, as a hex string (\fI#000000\fR) -.RE -.PP -\fB\-\-shadow\-red\fR \fIVALUE\fR -.RS 4 -Red color value of shadow (0\&.0 \- 1\&.0, defaults to 0)\&. -.RE -.PP -\fB\-\-shadow\-green\fR \fIVALUE\fR -.RS 4 -Green color value of shadow (0\&.0 \- 1\&.0, defaults to 0)\&. -.RE -.PP -\fB\-\-shadow\-blue\fR \fIVALUE\fR -.RS 4 -Blue color value of shadow (0\&.0 \- 1\&.0, defaults to 0)\&. -.RE -.PP -\fB\-\-inactive\-opacity\-override\fR -.RS 4 -Let inactive opacity set by -\fB\-i\fR -override the -\fI_NET_WM_OPACITY\fR -values of windows\&. -.RE -.PP -\fB\-\-active\-opacity\fR \fIOPACITY\fR -.RS 4 -Default opacity for active windows\&. (0\&.0 \- 1\&.0, defaults to 1\&.0) -.RE -.PP -\fB\-\-inactive\-dim\fR \fIVALUE\fR -.RS 4 -Dim inactive windows\&. (0\&.0 \- 1\&.0, defaults to 0\&.0) -.RE -.PP -\fB\-\-corner\-radius\fR \fIVALUE\fR -.RS 4 -Sets the radius of rounded window corners\&. When > 0, the compositor will round the corners of windows\&. Does not interact well with -\fB\-\-transparent\-clipping\fR\&. (defaults to 0)\&. -.RE -.PP -\fB\-\-rounded\-corners\-exclude\fR \fICONDITION\fR -.RS 4 -Exclude conditions for rounded corners\&. -.RE -.PP -\fB\-\-mark\-wmwin\-focused\fR -.RS 4 -Try to detect WM windows (a non\-override\-redirect window with no child that has -\fIWM_STATE\fR) and mark them as active\&. -.RE -.PP -\fB\-\-mark\-ovredir\-focused\fR -.RS 4 -Mark override\-redirect windows that doesn\(cqt have a child window with -\fIWM_STATE\fR -focused\&. -.RE -.PP -\fB\-\-no\-fading\-openclose\fR -.RS 4 -Do not fade on window open/close\&. -.RE -.PP -\fB\-\-no\-fading\-destroyed\-argb\fR -.RS 4 -Do not fade destroyed ARGB windows with WM frame\&. Workaround of bugs in Openbox, Fluxbox, etc\&. -.RE -.PP -\fB\-\-shadow\-ignore\-shaped\fR -.RS 4 -Do not paint shadows on shaped windows\&. Note shaped windows here means windows setting its shape through X Shape extension\&. Those using ARGB background is beyond our control\&. Deprecated, use -\-\-shadow\-exclude \*(Aqbounding_shaped\*(Aq -or -\-\-shadow\-exclude \*(Aqbounding_shaped && !rounded_corners\*(Aq -instead\&. -.RE -.PP -\fB\-\-detect\-rounded\-corners\fR -.RS 4 -Try to detect windows with rounded corners and don\(cqt consider them shaped windows\&. The accuracy is not very high, unfortunately\&. -.RE -.PP -\fB\-\-detect\-client\-opacity\fR -.RS 4 -Detect -\fI_NET_WM_OPACITY\fR -on client windows, useful for window managers not passing -\fI_NET_WM_OPACITY\fR -of client windows to frame windows\&. -.RE -.PP -\fB\-\-refresh\-rate\fR \fIREFRESH_RATE\fR -.RS 4 -Specify refresh rate of the screen\&. If not specified or 0, picom will try detecting this with X RandR extension\&. -.RE -.PP -\fB\-\-vsync\fR, \fB\-\-no\-vsync\fR -.RS 4 -Enable/disable VSync\&. -.RE -.PP -\fB\-\-use\-ewmh\-active\-win\fR -.RS 4 -Use EWMH -\fI_NET_ACTIVE_WINDOW\fR -to determine currently focused window, rather than listening to -\fIFocusIn\fR/\fIFocusOut\fR -event\&. Might have more accuracy, provided that the WM supports it\&. -.RE -.PP -\fB\-\-unredir\-if\-possible\fR -.RS 4 -Unredirect all windows if a full\-screen opaque window is detected, to maximize performance for full\-screen windows\&. Known to cause flickering when redirecting/unredirecting windows\&. -.RE -.PP -\fB\-\-unredir\-if\-possible\-delay\fR \fIMILLISECONDS\fR -.RS 4 -Delay before unredirecting the window, in milliseconds\&. Defaults to 0\&. -.RE -.PP -\fB\-\-unredir\-if\-possible\-exclude\fR \fICONDITION\fR -.RS 4 -Conditions of windows that shouldn\(cqt be considered full\-screen for unredirecting screen\&. -.RE -.PP -\fB\-\-shadow\-exclude\fR \fICONDITION\fR -.RS 4 -Specify a list of conditions of windows that should have no shadow\&. -.RE -.PP -\fB\-\-clip\-shadow\-above\fR \fICONDITION\fR -.RS 4 -Specify a list of conditions of windows that should have no shadow painted over, such as a dock window\&. -.RE -.PP -\fB\-\-fade\-exclude\fR \fICONDITION\fR -.RS 4 -Specify a list of conditions of windows that should not be faded\&. -.RE -.PP -\fB\-\-focus\-exclude\fR \fICONDITION\fR -.RS 4 -Specify a list of conditions of windows that should always be considered focused\&. -.RE -.PP -\fB\-\-inactive\-dim\-fixed\fR -.RS 4 -Use fixed inactive dim value, instead of adjusting according to window opacity\&. -.RE -.PP -\fB\-\-detect\-transient\fR -.RS 4 -Use -\fIWM_TRANSIENT_FOR\fR -to group windows, and consider windows in the same group focused at the same time\&. -.RE -.PP -\fB\-\-detect\-client\-leader\fR -.RS 4 -Use -\fIWM_CLIENT_LEADER\fR -to group windows, and consider windows in the same group focused at the same time\&. -\fIWM_TRANSIENT_FOR\fR -has higher priority if -\fB\-\-detect\-transient\fR -is enabled, too\&. -.RE -.PP -\fB\-\-blur\-method\fR, \fB\-\-blur\-size\fR, \fB\-\-blur\-deviation\fR, \fB\-\-blur\-strength\fR -.RS 4 -Parameters for background blurring, see the -\fBBLUR\fR -section for more information\&. -.RE -.PP -\fB\-\-blur\-background\fR -.RS 4 -Blur background of semi\-transparent / ARGB windows\&. Bad in performance, with driver\-dependent behavior\&. The name of the switch may change without prior notifications\&. -.RE -.PP -\fB\-\-blur\-background\-frame\fR -.RS 4 -Blur background of windows when the window frame is not opaque\&. Implies -\fB\-\-blur\-background\fR\&. Bad in performance, with driver\-dependent behavior\&. The name may change\&. -.RE -.PP -\fB\-\-blur\-background\-fixed\fR -.RS 4 -Use fixed blur strength rather than adjusting according to window opacity\&. -.RE -.PP -\fB\-\-blur\-kern\fR \fIMATRIX\fR -.RS 4 -Specify the blur convolution kernel, with the following format: -.sp -.if n \{\ -.RS 4 -.\} -.nf -WIDTH,HEIGHT,ELE1,ELE2,ELE3,ELE4,ELE5\&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp -In other words, the matrix is formatted as a list of comma separated numbers\&. The first two numbers must be integers, which specify the width and height of the matrix\&. They must be odd numbers\&. Then, the following -\fIwidth * height \- 1\fR -numbers specifies the numbers in the matrix, row by row, excluding the center element\&. -.sp -The elements are finite floating point numbers\&. The decimal pointer has to be -\fI\&.\fR -(a period), scientific notation is not supported\&. -.sp -The element in the center will either be 1\&.0 or varying based on opacity, depending on whether you have -\fB\-\-blur\-background\-fixed\fR\&. Yet the automatic adjustment of blur factor may not work well with a custom blur kernel\&. -.sp -A 7x7 Gaussian blur kernel (sigma = 0\&.84089642) looks like: -.sp -.if n \{\ -.RS 4 -.\} -.nf -\-\-blur\-kern \*(Aq7,7,0\&.000003,0\&.000102,0\&.000849,0\&.001723,0\&.000849,0\&.000102,0\&.000003,0\&.000102,0\&.003494,0\&.029143,0\&.059106,0\&.029143,0\&.003494,0\&.000102,0\&.000849,0\&.029143,0\&.243117,0\&.493069,0\&.243117,0\&.029143,0\&.000849,0\&.001723,0\&.059106,0\&.493069,0\&.493069,0\&.059106,0\&.001723,0\&.000849,0\&.029143,0\&.243117,0\&.493069,0\&.243117,0\&.029143,0\&.000849,0\&.000102,0\&.003494,0\&.029143,0\&.059106,0\&.029143,0\&.003494,0\&.000102,0\&.000003,0\&.000102,0\&.000849,0\&.001723,0\&.000849,0\&.000102,0\&.000003\*(Aq -.fi -.if n \{\ -.RE -.\} -.sp -May also be one of the predefined kernels: -3x3box -(default), -5x5box, -7x7box, -3x3gaussian, -5x5gaussian, -7x7gaussian, -9x9gaussian, -11x11gaussian\&. All Gaussian kernels are generated with sigma = 0\&.84089642 \&. If you find yourself needing to generate custom blur kernels, you might want to try the new blur configuration supported by the experimental backends (See -\fBBLUR\fR -and -\fB\-\-experimental\-backends\fR)\&. -.RE -.PP -\fB\-\-blur\-background\-exclude\fR \fICONDITION\fR -.RS 4 -Exclude conditions for background blur\&. -.RE -.PP -\fB\-\-resize\-damage\fR \fIINTEGER\fR -.RS 4 -Resize damaged region by a specific number of pixels\&. A positive value enlarges it while a negative one shrinks it\&. If the value is positive, those additional pixels will not be actually painted to screen, only used in blur calculation, and such\&. (Due to technical limitations, with -\fB\-\-use\-damage\fR, those pixels will still be incorrectly painted to screen\&.) Primarily used to fix the line corruption issues of blur, in which case you should use the blur radius value here (e\&.g\&. with a 3x3 kernel, you should use -\-\-resize\-damage 1, with a 5x5 one you use -\-\-resize\-damage 2, and so on)\&. May or may not work with -\fB\-\-glx\-no\-stencil\fR\&. Shrinking doesn\(cqt function correctly\&. -.RE -.PP -\fB\-\-invert\-color\-include\fR \fICONDITION\fR -.RS 4 -Specify a list of conditions of windows that should be painted with inverted color\&. Resource\-hogging, and is not well tested\&. -.RE -.PP -\fB\-\-opacity\-rule\fR \fIOPACITY\fR:\*(AqCONDITION\*(Aq -.RS 4 -Specify a list of opacity rules, in the format -PERCENT:PATTERN, like -50:name *= "Firefox"\&. picom\-trans is recommended over this\&. Note we don\(cqt make any guarantee about possible conflicts with other programs that set -\fI_NET_WM_WINDOW_OPACITY\fR -on frame or client windows\&. -.RE -.PP -\fB\-\-shadow\-exclude\-reg\fR \fIGEOMETRY\fR -.RS 4 -Specify a X geometry that describes the region in which shadow should not be painted in, such as a dock window region\&. Use -\-\-shadow\-exclude\-reg x10+0\-0, for example, if the 10 pixels on the bottom of the screen should not have shadows painted on\&. -.RE -.PP -\fB\-\-xinerama\-shadow\-crop\fR -.RS 4 -Crop shadow of a window fully on a particular Xinerama screen to the screen\&. -.RE -.PP -\fB\-\-backend\fR \fIBACKEND\fR -.RS 4 -Specify the backend to use: -xrender, -glx, or -xr_glx_hybrid\&. -xrender -is the default one\&. -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -xrender -backend performs all rendering operations with X Render extension\&. It is what -xcompmgr -uses, and is generally a safe fallback when you encounter rendering artifacts or instability\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -glx -(OpenGL) backend performs all rendering operations with OpenGL\&. It is more friendly to some VSync methods, and has significantly superior performance on color inversion (\fB\-\-invert\-color\-include\fR) or blur (\fB\-\-blur\-background\fR)\&. It requires proper OpenGL 2\&.0 support from your driver and hardware\&. You may wish to look at the GLX performance optimization options below\&. -\fB\-\-xrender\-sync\-fence\fR -might be needed on some systems to avoid delay in changes of screen contents\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -xr_glx_hybrid -backend renders the updated screen contents with X Render and presents it on the screen with GLX\&. It attempts to address the rendering issues some users encountered with GLX backend and enables the better VSync of GLX backends\&. -\fB\-\-vsync\-use\-glfinish\fR -might fix some rendering issues with this backend\&. -.RE -.RE -.PP -\fB\-\-glx\-no\-stencil\fR -.RS 4 -GLX backend: Avoid using stencil buffer, useful if you don\(cqt have a stencil buffer\&. Might cause incorrect opacity when rendering transparent content (but never practically happened) and may not work with -\fB\-\-blur\-background\fR\&. My tests show a 15% performance boost\&. Recommended\&. -.RE -.PP -\fB\-\-glx\-no\-rebind\-pixmap\fR -.RS 4 -GLX backend: Avoid rebinding pixmap on window damage\&. Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe, xf86\-video\-intel, etc\&.)\&. Recommended if it works\&. -.RE -.PP -\fB\-\-no\-use\-damage\fR -.RS 4 -Disable the use of damage information\&. This cause the whole screen to be redrawn everytime, instead of the part of the screen has actually changed\&. Potentially degrades the performance, but might fix some artifacts\&. -.RE -.PP -\fB\-\-xrender\-sync\-fence\fR -.RS 4 -Use X Sync fence to sync clients\*(Aq draw calls, to make sure all draw calls are finished before picom starts drawing\&. Needed on nvidia\-drivers with GLX backend for some users\&. -.RE -.PP -\fB\-\-glx\-fshader\-win\fR \fISHADER\fR -.RS 4 -GLX backend: Use specified GLSL fragment shader for rendering window contents\&. See -compton\-default\-fshader\-win\&.glsl -and -compton\-fake\-transparency\-fshader\-win\&.glsl -in the source tree for examples\&. -.RE -.PP -\fB\-\-force\-win\-blend\fR -.RS 4 -Force all windows to be painted with blending\&. Useful if you have a -\fB\-\-glx\-fshader\-win\fR -that could turn opaque pixels transparent\&. -.RE -.PP -\fB\-\-dbus\fR -.RS 4 -Enable remote control via D\-Bus\&. See the -\fBD\-BUS API\fR -section below for more details\&. -.RE -.PP -\fB\-\-benchmark\fR \fICYCLES\fR -.RS 4 -Benchmark mode\&. Repeatedly paint until reaching the specified cycles\&. -.RE -.PP -\fB\-\-benchmark\-wid\fR \fIWINDOW_ID\fR -.RS 4 -Specify window ID to repaint in benchmark mode\&. If omitted or is 0, the whole screen is repainted\&. -.RE -.PP -\fB\-\-no\-ewmh\-fullscreen\fR -.RS 4 -Do not use EWMH to detect fullscreen windows\&. Reverts to checking if a window is fullscreen based only on its size and coordinates\&. -.RE -.PP -\fB\-\-max\-brightness\fR -.RS 4 -Dimming bright windows so their brightness doesn\(cqt exceed this set value\&. Brightness of a window is estimated by averaging all pixels in the window, so this could comes with a performance hit\&. Setting this to 1\&.0 disables this behaviour\&. Requires -\fB\-\-use\-damage\fR -to be disabled\&. (default: 1\&.0) -.RE -.PP -\fB\-\-transparent\-clipping\fR -.RS 4 -Make transparent windows clip other windows like non\-transparent windows do, instead of blending on top of them\&. -.RE -.SH "FORMAT OF CONDITIONS" -.sp -Some options accept a condition string to match certain windows\&. A condition string is formed by one or more conditions, joined by logical operators\&. -.sp -A condition with "exists" operator looks like this: -.sp -.if n \{\ -.RS 4 -.\} -.nf -<NEGATION> <TARGET> <CLIENT/FRAME> [<INDEX>] : <FORMAT> <TYPE> -.fi -.if n \{\ -.RE -.\} -.sp -With equals operator it looks like: -.sp -.if n \{\ -.RS 4 -.\} -.nf -<NEGATION> <TARGET> <CLIENT/FRAME> [<INDEX>] : <FORMAT> <TYPE> <NEGATION> <OP QUALIFIER> <MATCH TYPE> = <PATTERN> -.fi -.if n \{\ -.RE -.\} -.sp -With greater\-than/less\-than operators it looks like: -.sp -.if n \{\ -.RS 4 -.\} -.nf -<NEGATION> <TARGET> <CLIENT/FRAME> [<INDEX>] : <FORMAT> <TYPE> <NEGATION> <OPERATOR> <PATTERN> -.fi -.if n \{\ -.RE -.\} -.sp -\fINEGATION\fR (optional) is one or more exclamation marks; -.sp -\fITARGET\fR is either a predefined target name, or the name of a window property to match\&. Supported predefined targets are id, x, y, x2 (x + widthb), y2 (like x2), width, height, widthb (width + 2 * border_width), heightb (like widthb), border_width, fullscreen, override_redirect, argb (whether the window has an ARGB visual), focused, wmwin (whether the window looks like a WM window, i\&.e\&. has no child window with WM_STATE and is not override\-redirected), bounding_shaped, rounded_corners (requires \fB\-\-detect\-rounded\-corners\fR), client (ID of client window), window_type (window type in string), leader (ID of window leader), name, class_g (= WM_CLASS[1]), class_i (= WM_CLASS[0]), and role\&. -.sp -\fICLIENT/FRAME\fR is a single @ if the window attribute should be be looked up on client window, nothing if on frame window; -.sp -\fIINDEX\fR (optional) is the index number of the property to look up\&. For example, [2] means look at the third value in the property\&. If not specified, the first value (index [0]) is used implicitly\&. Use the special value [*] to perform matching against all available property values using logical OR\&. Do not specify it for predefined targets\&. -.sp -\fIFORMAT\fR (optional) specifies the format of the property, 8, 16, or 32\&. On absence we use format X reports\&. Do not specify it for predefined or string targets\&. -.sp -\fITYPE\fR is a single character representing the type of the property to match for: c for \fICARDINAL\fR, a for \fIATOM\fR, w for \fIWINDOW\fR, d for \fIDRAWABLE\fR, s for \fISTRING\fR (and any other string types, such as \fIUTF8_STRING\fR)\&. Do not specify it for predefined targets\&. -.sp -\fIOP QUALIFIER\fR (optional), applicable only for equals operator, could be ? (ignore\-case)\&. -.sp -\fIMATCH TYPE\fR (optional), applicable only for equals operator, could be nothing (exact match), * (match anywhere), ^ (match from start), % (wildcard), or ~ (PCRE regular expression)\&. -.sp -\fIOPERATOR\fR is one of = (equals), <, >, <=, =>, or nothing (exists)\&. Exists operator checks whether a property exists on a window (but for predefined targets, exists means != 0 then)\&. -.sp -\fIPATTERN\fR is either an integer or a string enclosed by single or double quotes\&. Python\-3\-style escape sequences and raw string are supported in the string format\&. -.sp -Supported logical operators are && (and) and || (or)\&. && has higher precedence than ||, left\-to\-right associativity\&. Use parentheses to change precedence\&. -.sp -Examples: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# If the window is focused -focused -focused = 1 -# If the window is not override\-redirected -!override_redirect -override_redirect = false -override_redirect != true -override_redirect != 1 -# If the window is a menu -window_type *= "menu" -_NET_WM_WINDOW_TYPE@:a *= "MENU" -# If the window is marked hidden: _NET_WM_STATE contains _NET_WM_STATE_HIDDEN -_NET_WM_STATE@[*]:a = "_NET_WM_STATE_HIDDEN" -# If the window is marked sticky: _NET_WM_STATE contains an atom that contains -# "sticky", ignore case -_NET_WM_STATE@[*]:a *?= "sticky" -# If the window name contains "Firefox", ignore case -name *?= "Firefox" -_NET_WM_NAME@:s *?= "Firefox" -# If the window name ends with "Firefox" -name %= "*Firefox" -name ~= "Firefox$" -# If the window has a property _COMPTON_SHADOW with value 0, type CARDINAL, -# format 32, value 0, on its frame window -_COMPTON_SHADOW:32c = 0 -# If the third value of _NET_FRAME_EXTENTS is less than 20, or there\*(Aqs no -# _NET_FRAME_EXTENTS property on client window -_NET_FRAME_EXTENTS@[2]:32c < 20 || !_NET_FRAME_EXTENTS@:32c -# The pattern here will be parsed as "dd4" -name = "\ex64\ex64\eo64" -# The pattern here will be parsed as "\ex64\ex64\ex64" -name = r"\ex64\ex64\eo64" -.fi -.if n \{\ -.RE -.\} -.SH "LEGACY FORMAT OF CONDITIONS" -.sp -This is the old condition format we once used\&. Support of this format might be removed in the future\&. -.sp -.if n \{\ -.RS 4 -.\} -.nf -condition = TARGET:TYPE[FLAGS]:PATTERN -.fi -.if n \{\ -.RE -.\} -.sp -\fITARGET\fR is one of "n" (window name), "i" (window class instance), "g" (window general class), and "r" (window role)\&. -.sp -\fITYPE\fR is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE regular expressions, if compiled with the support)\&. -.sp -\fIFLAGS\fR could be a series of flags\&. Currently the only defined flag is "i" (ignore case)\&. -.sp -\fIPATTERN\fR is the actual pattern string\&. -.SH "CONFIGURATION FILES" -.sp -picom could read from a configuration file if libconfig support is compiled in\&. If \fB\-\-config\fR is not used, picom will seek for a configuration file in $XDG_CONFIG_HOME/picom\&.conf (~/\&.config/picom\&.conf, usually), then $XDG_CONFIG_HOME/picom/picom\&.conf, then $XDG_CONFIG_DIRS/picom\&.conf (often /etc/xdg/picom\&.conf), then $XDG_CONFIG_DIRS/picom/picom\&.conf\&. -.sp -picom uses general libconfig configuration file format\&. A sample configuration file is available as picom\&.sample\&.conf in the source tree\&. Most of commandline switches can be used as options in configuration file as well\&. For example, \fB\-\-vsync\fR option documented above can be set in the configuration file using `vsync = `\&. Command line options will always overwrite the settings in the configuration file\&. -.sp -Window\-type\-specific settings are exposed only in configuration file and has the following format: -.sp -.if n \{\ -.RS 4 -.\} -.nf -wintypes: -{ - WINDOW_TYPE = { fade = BOOL; shadow = BOOL; opacity = FLOAT; focus = BOOL; blur\-background = BOOL; full\-shadow = BOOL; clip\-shadow\-above = BOOL; redir\-ignore = BOOL; }; -}; -.fi -.if n \{\ -.RE -.\} -.sp -\fIWINDOW_TYPE\fR is one of the 15 window types defined in EWMH standard: "unknown", "desktop", "dock", "toolbar", "menu", "utility", "splash", "dialog", "normal", "dropdown_menu", "popup_menu", "tooltip", "notification", "combo", and "dnd"\&. -.PP -Following per window\-type options are available: -.RS 4 -.PP -fade, shadow -.RS 4 -Controls window\-type\-specific shadow and fade settings\&. -.RE -.PP -opacity -.RS 4 -Controls default opacity of the window type\&. -.RE -.PP -focus -.RS 4 -Controls whether the window of this type is to be always considered focused\&. (By default, all window types except "normal" and "dialog" has this on\&.) -.RE -.PP -blur\-background -.RS 4 -Controls wether the window of this type will have its transparent background blurred\&. -.RE -.PP -full\-shadow -.RS 4 -Controls whether shadow is drawn under the parts of the window that you normally won\(cqt be able to see\&. Useful when the window has parts of it transparent, and you want shadows in those areas\&. -.RE -.PP -clip\-shadow\-above -.RS 4 -Controls wether shadows that would have been drawn above the window should be clipped\&. Useful for dock windows that should have no shadow painted on top\&. -.RE -.PP -redir\-ignore -.RS 4 -Controls whether this type of windows should cause screen to become redirected again after been unredirected\&. If you have -\fB\-\-unredir\-if\-possible\fR -set, and doesn\(cqt want certain window to cause unnecessary screen redirection, you can set this to -true\&. -.RE -.RE -.SH "BLUR" -.sp -You can configure how the window background is blurred using a \fIblur\fR section in your configuration file\&. Here is an example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -blur: -{ - method = "gaussian"; - size = 10; - deviation = 5\&.0; -}; -.fi -.if n \{\ -.RE -.\} -.PP -Available options of the \fIblur\fR section are: -.RS 4 -.PP -\fBmethod\fR -.RS 4 -A string\&. Controls the blur method\&. Corresponds to the -\fB\-\-blur\-method\fR -command line option\&. Available choices are: -\fInone\fR -to disable blurring; -\fIgaussian\fR -for gaussian blur; -\fIbox\fR -for box blur; -\fIkernel\fR -for convolution blur with a custom kernel; -\fIdual_kawase\fR -for dual\-filter kawase blur\&. Note: -\fIgaussian\fR, -\fIbox\fR -and -\fIdual_kawase\fR -blur methods are only supported by the experimental backends\&. (default: none) -.RE -.PP -\fBsize\fR -.RS 4 -An integer\&. The size of the blur kernel, required by -\fIgaussian\fR -and -\fIbox\fR -blur methods\&. For the -\fIkernel\fR -method, the size is included in the kernel\&. Corresponds to the -\fB\-\-blur\-size\fR -command line option (default: 3)\&. -.RE -.PP -\fBdeviation\fR -.RS 4 -A floating point number\&. The standard deviation for the -\fIgaussian\fR -blur method\&. Corresponds to the -\fB\-\-blur\-deviation\fR -command line option (default: 0\&.84089642)\&. -.RE -.PP -\fBstrength\fR -.RS 4 -An integer in the range 0\-20\&. The strength of the -\fIdual_kawase\fR -blur method\&. Corresponds to the -\fB\-\-blur\-strength\fR -command line option\&. If set to zero, the value requested by -\fB\-\-blur\-size\fR -is approximated (default: 5)\&. -.RE -.PP -\fBkernel\fR -.RS 4 -A string\&. The kernel to use for the -\fIkernel\fR -blur method, specified in the same format as the -\fB\-\-blur\-kerns\fR -option\&. Corresponds to the -\fB\-\-blur\-kerns\fR -command line option\&. -.RE -.RE -.SH "SIGNALS" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -picom reinitializes itself upon receiving -SIGUSR1\&. -.RE -.SH "D\-BUS API" -.sp -It\(cqs possible to control picom via D\-Bus messages, by running picom with \fB\-\-dbus\fR and send messages to com\&.github\&.chjj\&.compton\&.<DISPLAY>\&. <DISPLAY> is the display used by picom, with all non\-alphanumeric characters transformed to underscores\&. For DISPLAY=:0\&.0 you should use com\&.github\&.chjj\&.compton\&._0_0, for example\&. -.sp -The D\-Bus methods and signals are not yet stable, thus undocumented right now\&. -.SH "EXAMPLES" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Disable configuration file parsing: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ picom \-\-config /dev/null -.fi -.if n \{\ -.RE -.\} -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Run picom with client\-side shadow and fading, disable shadow on dock windows and drag\-and\-drop windows: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ picom \-cCGf -.fi -.if n \{\ -.RE -.\} -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Same thing as above, plus making inactive windows 80% transparent, making frame 80% transparent, don\(cqt fade on window open/close, and fork to background: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ picom \-bcCGf \-i 0\&.8 \-e 0\&.8 \-\-no\-fading\-openclose -.fi -.if n \{\ -.RE -.\} -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Draw white shadows: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ picom \-c \-\-shadow\-red 1 \-\-shadow\-green 1 \-\-shadow\-blue 1 -.fi -.if n \{\ -.RE -.\} -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Avoid drawing shadows on wbar window: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ picom \-c \-\-shadow\-exclude \*(Aqclass_g = "wbar"\*(Aq -.fi -.if n \{\ -.RE -.\} -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Enable VSync with GLX backend: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ picom \-\-backend glx \-\-vsync -.fi -.if n \{\ -.RE -.\} -.RE -.SH "BUGS" -.sp -Please submit bug reports to https://github\&.com/allusive\-dev/picom\-allusive\&. -.sp -Out dated information in this man page is NOT considered a bug\&. -.SH "RESOURCES" -.sp -Website: https://allusive\&.dev -.sp -GithubPage: https://github\&.com/allusive\-dev/picom\-allusive diff --git a/man/picom.1.asciidoc b/man/picom.1.asciidoc deleted file mode 100644 index 61af5a2..0000000 --- a/man/picom.1.asciidoc +++ /dev/null @@ -1,549 +0,0 @@ -picom(1) -======== -:doctype: manpage -:man source: picom -:man version: {picom-version} -:man manual: User Commands - -NAME ----- -picom - a compositor for X11 - -SYNOPSIS --------- -*picom* ['OPTIONS'] - -DESCRIPTION ------------ -picom is a compositor based on Dana Jansens' version of xcompmgr (which itself was written by Keith Packard). It includes some improvements over the original xcompmgr, like window frame opacity and inactive window transparency. - -OPTIONS -------- -*-h*, *--help*:: - Get the usage text embedded in program code, which may be more up-to-date than this man page. - -*-r*, *--shadow-radius*='RADIUS':: - The blur radius for shadows, in pixels. (defaults to 12) - -*-o*, *--shadow-opacity*='OPACITY':: - The opacity of shadows. (0.0 - 1.0, defaults to 0.75) - -*-l*, *--shadow-offset-x*='OFFSET':: - The left offset for shadows, in pixels. (defaults to -15) - -*-t*, *--shadow-offset-y*='OFFSET':: - The top offset for shadows, in pixels. (defaults to -15) - -*-I*, *--fade-in-step*='OPACITY_STEP':: - Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) - -*-O*, *--fade-out-step*='OPACITY_STEP':: - Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) - -*-D*, *--fade-delta*='MILLISECONDS':: - The time between steps in fade step, in milliseconds. (> 0, defaults to 10) - -*-c*, *--shadow*:: - Enabled client-side shadows on windows. Note desktop windows (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, unless explicitly requested using the wintypes option. - -*-f*, *--fading*:: - Fade windows in/out when opening/closing and when opacity changes, unless *--no-fading-openclose* is used. - -*-F*:: - Equals to *-f*. Deprecated. - -*-i*, *--inactive-opacity*='OPACITY':: - Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) - -*-e*, *--frame-opacity*='OPACITY':: - Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) - -*-b*, *--daemon*:: - Daemonize process. Fork to background after initialization. This option can only be set from the command line, setting this in the configuration file will have no effect. - -*--log-level*:: - Set the log level. Possible values are "TRACE", "DEBUG", "INFO", "WARN", "ERROR", in increasing level of importance. Case doesn't matter. If using the "TRACE" log level, it's better to log into a file using *--log-file*, since it can generate a huge stream of logs. - -*--log-file*:: - Set the log file. If *--log-file* is never specified, logs will be written to stderr. Otherwise, logs will to written to the given file, though some of the early logs might still be written to the stderr. When setting this option from the config file, it is recommended to use an absolute path. - -*--legacy-backends*:: - Use the old version of the backends. This option can not be set from the config file. - -*--show-all-xerrors*:: - Show all X errors (for debugging). - -*--config* 'PATH':: - Look for configuration file at the path. See *CONFIGURATION FILES* section below for where picom looks for a configuration file by default. Use `/dev/null` to avoid loading configuration file. - -*--write-pid-path* 'PATH':: - Write process ID to a file. it is recommended to use an absolute path. - -*--shadow-color* 'STRING':: - Color of shadow, as a hex string ('#000000') - -*--shadow-red* 'VALUE':: - Red color value of shadow (0.0 - 1.0, defaults to 0). - -*--shadow-green* 'VALUE':: - Green color value of shadow (0.0 - 1.0, defaults to 0). - -*--shadow-blue* 'VALUE':: - Blue color value of shadow (0.0 - 1.0, defaults to 0). - -*--inactive-opacity-override*:: - Let inactive opacity set by *-i* override the '_NET_WM_WINDOW_OPACITY' values of windows. - -*--active-opacity* 'OPACITY':: - Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) - -*--inactive-dim* 'VALUE':: - Dim inactive windows. (0.0 - 1.0, defaults to 0.0) - -*--corner-radius* 'VALUE':: - Sets the radius of rounded window corners. When > 0, the compositor will round the corners of windows. Does not interact well with *--transparent-clipping*. (defaults to 0). - -*--rounded-corners-exclude* 'CONDITION':: - Exclude conditions for rounded corners. - -*--mark-wmwin-focused*:: - Try to detect WM windows (a non-override-redirect window with no child that has 'WM_STATE') and mark them as active. - -*--mark-ovredir-focused*:: - Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. - -*--no-fading-openclose*:: - Do not fade on window open/close. - -*--no-fading-destroyed-argb*:: - Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. - -*--shadow-ignore-shaped*:: - Do not paint shadows on shaped windows. Note shaped windows here means windows setting its shape through X Shape extension. Those using ARGB background is beyond our control. Deprecated, use `--shadow-exclude 'bounding_shaped'` or `--shadow-exclude 'bounding_shaped && !rounded_corners'` instead. - -*--detect-rounded-corners*:: - Try to detect windows with rounded corners and don't consider them shaped windows. The accuracy is not very high, unfortunately. - -*--detect-client-opacity*:: - Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows. - -*--vsync*, *--no-vsync*:: - Enable/disable VSync. - -*--use-ewmh-active-win*:: - Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, provided that the WM supports it. - -*--unredir-if-possible*:: - Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows. Known to cause flickering when redirecting/unredirecting windows. - -*--unredir-if-possible-delay* 'MILLISECONDS':: - Delay before unredirecting the window, in milliseconds. Defaults to 0. - -*--unredir-if-possible-exclude* 'CONDITION':: - Conditions of windows that shouldn't be considered full-screen for unredirecting screen. - -*--shadow-exclude* 'CONDITION':: - Specify a list of conditions of windows that should have no shadow. - -*--clip-shadow-above* 'CONDITION':: - Specify a list of conditions of windows that should have no shadow painted over, such as a dock window. - -*--fade-exclude* 'CONDITION':: - Specify a list of conditions of windows that should not be faded. - -*--focus-exclude* 'CONDITION':: - Specify a list of conditions of windows that should always be considered focused. - -*--inactive-dim-fixed*:: - Use fixed inactive dim value, instead of adjusting according to window opacity. - -*--detect-transient*:: - Use 'WM_TRANSIENT_FOR' to group windows, and consider windows in the same group focused at the same time. - -*--detect-client-leader*:: - Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same group focused at the same time. This usually means windows from the same application will be considered focused or unfocused at the same time.'WM_TRANSIENT_FOR' has higher priority if *--detect-transient* is enabled, too. - -*--blur-method*, *--blur-size*, *--blur-deviation*, *--blur-strength*:: - Parameters for background blurring, see the *BLUR* section for more information. - -*--blur-background*:: - Blur background of semi-transparent / ARGB windows. Bad in performance, with driver-dependent behavior. The name of the switch may change without prior notifications. - -*--blur-background-frame*:: - Blur background of windows when the window frame is not opaque. Implies *--blur-background*. Bad in performance, with driver-dependent behavior. The name may change. - -*--blur-background-fixed*:: - Use fixed blur strength rather than adjusting according to window opacity. - -*--blur-kern* 'MATRIX':: - Specify the blur convolution kernel, with the following format: -+ ----- -WIDTH,HEIGHT,ELE1,ELE2,ELE3,ELE4,ELE5... ----- -+ -In other words, the matrix is formatted as a list of comma separated numbers. The first two numbers must be integers, which specify the width and height of the matrix. They must be odd numbers. Then, the following 'width * height - 1' numbers specifies the numbers in the matrix, row by row, excluding the center element. -+ -The elements are finite floating point numbers. The decimal pointer has to be '.' (a period), scientific notation is not supported. -+ -The element in the center will either be 1.0 or varying based on opacity, depending on whether you have *--blur-background-fixed*. Yet the automatic adjustment of blur factor may not work well with a custom blur kernel. -+ -A 7x7 Gaussian blur kernel (sigma = 0.84089642) looks like: -+ ----- ---blur-kern '7,7,0.000003,0.000102,0.000849,0.001723,0.000849,0.000102,0.000003,0.000102,0.003494,0.029143,0.059106,0.029143,0.003494,0.000102,0.000849,0.029143,0.243117,0.493069,0.243117,0.029143,0.000849,0.001723,0.059106,0.493069,0.493069,0.059106,0.001723,0.000849,0.029143,0.243117,0.493069,0.243117,0.029143,0.000849,0.000102,0.003494,0.029143,0.059106,0.029143,0.003494,0.000102,0.000003,0.000102,0.000849,0.001723,0.000849,0.000102,0.000003' ----- -+ -May also be one of the predefined kernels: `3x3box` (default), `5x5box`, `7x7box`, `3x3gaussian`, `5x5gaussian`, `7x7gaussian`, `9x9gaussian`, `11x11gaussian`. All Gaussian kernels are generated with sigma = 0.84089642 . If you find yourself needing to generate custom blur kernels, you might want to try the new blur configuration (See *BLUR*). - -*--blur-background-exclude* 'CONDITION':: - Exclude conditions for background blur. - -*--resize-damage* 'INTEGER':: - Resize damaged region by a specific number of pixels. A positive value enlarges it while a negative one shrinks it. If the value is positive, those additional pixels will not be actually painted to screen, only used in blur calculation, and such. (Due to technical limitations, with *--use-damage*, those pixels will still be incorrectly painted to screen.) Primarily used to fix the line corruption issues of blur, in which case you should use the blur radius value here (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, with a 5x5 one you use `--resize-damage 2`, and so on). May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. - -*--invert-color-include* 'CONDITION':: - Specify a list of conditions of windows that should be painted with inverted color. Resource-hogging, and is not well tested. - -*--opacity-rule* 'OPACITY':'CONDITION':: - Specify a list of opacity rules, in the format `PERCENT:PATTERN`, like `50:name *= "Firefox"`. picom-trans is recommended over this. Note we don't make any guarantee about possible conflicts with other programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. - -*--shadow-exclude-reg* 'GEOMETRY':: - Specify a X geometry that describes the region in which shadow should not be painted in, such as a dock window region. Use `--shadow-exclude-reg x10+0-0`, for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. - -*--xinerama-shadow-crop*:: - Crop shadow of a window fully on a particular Xinerama screen to the screen. - -*--backend* 'BACKEND':: - Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. `xrender` is the default one. -+ --- -* `xrender` backend performs all rendering operations with X Render extension. It is what `xcompmgr` uses, and is generally a safe fallback when you encounter rendering artifacts or instability. -* `glx` (OpenGL) backend performs all rendering operations with OpenGL. It is more friendly to some VSync methods, and has significantly superior performance on color inversion (*--invert-color-include*) or blur (*--blur-background*). It requires proper OpenGL 2.0 support from your driver and hardware. You may wish to look at the GLX performance optimization options below. *--xrender-sync-fence* might be needed on some systems to avoid delay in changes of screen contents. -* `xr_glx_hybrid` backend renders the updated screen contents with X Render and presents it on the screen with GLX. It attempts to address the rendering issues some users encountered with GLX backend and enables the better VSync of GLX backends. *--vsync-use-glfinish* might fix some rendering issues with this backend. --- - -*--glx-no-stencil*:: - GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. Might cause incorrect opacity when rendering transparent content (but never practically happened) and may not work with *--blur-background*. My tests show a 15% performance boost. Recommended. - -*--glx-no-rebind-pixmap*:: - GLX backend: Avoid rebinding pixmap on window damage. Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). Recommended if it works. - -*--no-use-damage*:: - Disable the use of damage information. This cause the whole screen to be redrawn every time, instead of the part of the screen has actually changed. Potentially degrades the performance, but might fix some artifacts. - -*--xrender-sync-fence*:: - Use X Sync fence to sync clients' draw calls, to make sure all draw calls are finished before picom starts drawing. Needed on nvidia-drivers with GLX backend for some users. - -*--glx-fshader-win* 'SHADER':: - GLX backend: Use specified GLSL fragment shader for rendering window contents. See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` in the source tree for examples. Only works with *--legacy-backends* enabled. - -*--force-win-blend*:: - Force all windows to be painted with blending. Useful if you have a *--glx-fshader-win* that could turn opaque pixels transparent. - -*--dbus*:: - Enable remote control via D-Bus. See the *D-BUS API* section below for more details. - -*--benchmark* 'CYCLES':: - Benchmark mode. Repeatedly paint until reaching the specified cycles. - -*--benchmark-wid* 'WINDOW_ID':: - Specify window ID to repaint in benchmark mode. If omitted or is 0, the whole screen is repainted. - -*--no-ewmh-fullscreen*:: - Do not use EWMH to detect fullscreen windows. Reverts to checking if a window is fullscreen based only on its size and coordinates. - -*--max-brightness*:: - Dimming bright windows so their brightness doesn't exceed this set value. Brightness of a window is estimated by averaging all pixels in the window, so this could comes with a performance hit. Setting this to 1.0 disables this behaviour. Requires *--use-damage* to be disabled. (default: 1.0) - -*--transparent-clipping*:: - Make transparent windows clip other windows like non-transparent windows do, instead of blending on top of them. - -*--transparent-clipping-exclude* 'CONDITION':: - Specify a list of conditions of windows that should never have transparent clipping applied. Useful for screenshot tools, where you need to be able to see through transparent parts of the window. - -*--window-shader-fg* 'SHADER':: - Specify GLSL fragment shader path for rendering window contents. Does not work when *--legacy-backends* is enabled. Shader is searched first relative to the directory the configuration file is in, then in the usual places for a configuration file. See section *SHADER INTERFACE* below for more details on the interface. - -*--window-shader-fg-rule* 'SHADER':'CONDITION':: - Specify GLSL fragment shader path for rendering window contents using patterns. Similar to *--opacity-rule*, arguments should be in the format of 'SHADER:CONDITION', e.g. "shader.frag:name = \'window\'". Leading and trailing whitespaces in 'SHADER' will be trimmed. If 'SHADER' is "default", then the default shader will be used for the matching windows. (This also unfortunately means you can't use a shader file named "default"). Does not work when *--legacy-backends* is enabled. - -FORMAT OF CONDITIONS --------------------- -Some options accept a condition string to match certain windows. A condition string is formed by one or more conditions, joined by logical operators. - -A condition with "exists" operator looks like this: - - <NEGATION> <TARGET> <CLIENT/FRAME> [<INDEX>] : <FORMAT> <TYPE> - -With equals operator it looks like: - - <NEGATION> <TARGET> <CLIENT/FRAME> [<INDEX>] : <FORMAT> <TYPE> <NEGATION> <OP QUALIFIER> <MATCH TYPE> = <PATTERN> - -With greater-than/less-than operators it looks like: - - <NEGATION> <TARGET> <CLIENT/FRAME> [<INDEX>] : <FORMAT> <TYPE> <NEGATION> <OPERATOR> <PATTERN> - -'NEGATION' (optional) is one or more exclamation marks; - -'TARGET' is either a predefined target name, or the name of a window property to match. Supported predefined targets are `id`, `x`, `y`, `x2` (`x` + `widthb`), `y2` (like `x2`), `width`, `height`, `widthb` (`width` + 2 * `border_width`), `heightb` (like `widthb`), `border_width`, `fullscreen`, `override_redirect`, `argb` (whether the window has an ARGB visual), `focused`, `wmwin` (whether the window looks like a WM window, i.e. has no child window with `WM_STATE` and is not override-redirected), `bounding_shaped`, `rounded_corners` (requires *--detect-rounded-corners*), `client` (ID of client window), `window_type` (window type in string), `leader` (ID of window leader), `name`, `class_g` (= `WM_CLASS[1]`), `class_i` (= `WM_CLASS[0]`), and `role`. - -'CLIENT/FRAME' is a single `@` if the window attribute should be be looked up on client window, nothing if on frame window; - -'INDEX' (optional) is the index number of the property to look up. For example, `[2]` means look at the third value in the property. If not specified, the first value (index `[0]`) is used implicitly. Use the special value `[*]` to perform matching against all available property values using logical OR. Do not specify it for predefined targets. - -'FORMAT' (optional) specifies the format of the property, 8, 16, or 32. On absence we use format X reports. Do not specify it for predefined or string targets. - -'TYPE' is a single character representing the type of the property to match for: `c` for 'CARDINAL', `a` for 'ATOM', `w` for 'WINDOW', `d` for 'DRAWABLE', `s` for 'STRING' (and any other string types, such as 'UTF8_STRING'). Do not specify it for predefined targets. - -'OP QUALIFIER' (optional), applicable only for equals operator, could be `?` (ignore-case). - -'MATCH TYPE' (optional), applicable only for equals operator, could be nothing (exact match), `*` (match anywhere), `^` (match from start), `%` (wildcard), or `~` (PCRE regular expression). - -'OPERATOR' is one of `=` (equals), `<`, `>`, `<=`, `=>`, or nothing (exists). Exists operator checks whether a property exists on a window (but for predefined targets, exists means != 0 then). - -'PATTERN' is either an integer or a string enclosed by single or double quotes. Python-3-style escape sequences are supported in the string format. - -Supported logical operators are `&&` (and) and `||` (or). `&&` has higher precedence than `||`, left-to-right associativity. Use parentheses to change precedence. - -Examples: - - # If the window is focused - focused - focused = 1 - # If the window is not override-redirected - !override_redirect - override_redirect = false - override_redirect != true - override_redirect != 1 - # If the window is a menu - window_type *= "menu" - _NET_WM_WINDOW_TYPE@:a *= "MENU" - # If the window is marked hidden: _NET_WM_STATE contains _NET_WM_STATE_HIDDEN - _NET_WM_STATE@[*]:a = "_NET_WM_STATE_HIDDEN" - # If the window is marked sticky: _NET_WM_STATE contains an atom that contains - # "sticky", ignore case - _NET_WM_STATE@[*]:a *?= "sticky" - # If the window name contains "Firefox", ignore case - name *?= "Firefox" - _NET_WM_NAME@:s *?= "Firefox" - # If the window name ends with "Firefox" - name %= "*Firefox" - name ~= "Firefox$" - # If the window has a property _COMPTON_SHADOW with value 0, type CARDINAL, - # format 32, value 0, on its frame window - _COMPTON_SHADOW:32c = 0 - # If the third value of _NET_FRAME_EXTENTS is less than 20, or there's no - # _NET_FRAME_EXTENTS property on client window - _NET_FRAME_EXTENTS@[2]:32c < 20 || !_NET_FRAME_EXTENTS@:32c - # The pattern here will be parsed as "dd4" - name = "\x64\x64\o64" - - -LEGACY FORMAT OF CONDITIONS ---------------------------- - -This is the old condition format we once used. Support of this format might be removed in the future. - - condition = TARGET:TYPE[FLAGS]:PATTERN - -'TARGET' is one of "n" (window name), "i" (window class instance), "g" (window general class), and "r" (window role). - -'TYPE' is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE regular expressions, if compiled with the support). - -'FLAGS' could be a series of flags. Currently the only defined flag is "i" (ignore case). - -'PATTERN' is the actual pattern string. - -SHADER INTERFACE ----------------- - -This secion describes the interface of a custom shader, how it is used by picom, and what parameters are passed by picom to the shader. This does not apply to the legacy backends. - -A custom shader is a GLSL fragment shader program, which can be used to override the default way of how a window is rendered. If a custom shader is used, the default picom effects (e.g. dimming, color inversion, etc.) will no longer be automatically applied. It would be the custom shader's responsibility to apply these effects. - -The interface between picom and a custom shader is dependent on which backend is being used. The xrender backend doesn't support shader at all. Here we descibe the interface provided by the glx backend. - -The shader must define a function, 'vec4 window_shader()', which would be the entry point of the shader. The returned 'vec4' will be used to set 'gl_FragColor'. A function, 'vec4 default_post_processing(vec4 c)', is provided for applying the default picom effects to input color 'c'. - -The following uniform/input variables are made available to the shader: - -[source,glsl] ----- -in vec2 texcoord; // texture coordinate of the fragment - -uniform float opacity; // opacity of the window (0.0 - 1.0) -uniform float dim; // dimming factor of the window (0.0 - 1.0, higher means more dim) -uniform float corner_radius; // corner radius of the window (pixels) -uniform float border_width; // estimated border width of the window (pixels) -uniform bool invert_color; // whether to invert the color of the window -uniform sampler2D tex; // texture of the window -uniform sampler2D brightness; // estimated brightness of the window, 1x1 texture -uniform float max_brightness; // configured maximum brightness of the window (0.0 - 1.0) -uniform float time; // time in milliseconds, counting from an unspecified starting point ----- - -The default behavior of picom window rendering can be replicated by the following shader: - -[source,glsl] ----- -#version 330 -in vec2 texcoord; // texture coordinate of the fragment - -uniform sampler2D tex; // texture of the window - -// Default window post-processing: -// 1) invert color -// 2) opacity / transparency -// 3) max-brightness clamping -// 4) rounded corners -vec4 default_post_processing(vec4 c); - -// Default window shader: -// 1) fetch the specified pixel -// 2) apply default post-processing -vec4 window_shader() { - vec4 c = texelFetch(tex, ivec2(texcoord), 0); - return default_post_processing(c); -} ----- - -The interface is expected to be mostly stable. - -CONFIGURATION FILES -------------------- -picom could read from a configuration file if libconfig support is compiled in. If *--config* is not used, picom will seek for a configuration file in `$XDG_CONFIG_HOME/picom.conf` (`~/.config/picom.conf`, usually), then `$XDG_CONFIG_HOME/picom/picom.conf`, then `$XDG_CONFIG_DIRS/picom.conf` (often `/etc/xdg/picom.conf`), then `$XDG_CONFIG_DIRS/picom/picom.conf`. - -picom uses general libconfig configuration file format. A sample configuration file is available as `picom.sample.conf` in the source tree. Most of commandline switches can be used as options in configuration file as well. For example, *--vsync* option documented above can be set in the configuration file using `vsync = `. Command line options will always overwrite the settings in the configuration file. - -Window-type-specific settings are exposed only in configuration file and has the following format: - ------------- -wintypes: -{ - WINDOW_TYPE = { fade = BOOL; shadow = BOOL; opacity = FLOAT; focus = BOOL; blur-background = BOOL; full-shadow = BOOL; clip-shadow-above = BOOL; redir-ignore = BOOL; }; -}; ------------- - -'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: "unknown", "desktop", "dock", "toolbar", "menu", "utility", "splash", "dialog", "normal", "dropdown_menu", "popup_menu", "tooltip", "notification", "combo", and "dnd". - -Following per window-type options are available: :: - - fade, shadow::: - Controls window-type-specific shadow and fade settings. - - opacity::: - Controls default opacity of the window type. - - focus::: - Controls whether the window of this type is to be always considered focused. (By default, all window types except "normal" and "dialog" has this on.) - - blur-background::: - Controls whether the window of this type will have its transparent background blurred. - - full-shadow::: - Controls whether shadow is drawn under the parts of the window that you normally won't be able to see. Useful when the window has parts of it transparent, and you want shadows in those areas. - - clip-shadow-above::: - Controls whether shadows that would have been drawn above the window should be clipped. Useful for dock windows that should have no shadow painted on top. - - redir-ignore::: - Controls whether this type of windows should cause screen to become redirected again after been unredirected. If you have *--unredir-if-possible* set, and doesn't want certain window to cause unnecessary screen redirection, you can set this to `true`. - -BLUR ----- -You can configure how the window background is blurred using a 'blur' section in your configuration file. Here is an example: - --------- -blur: -{ - method = "gaussian"; - size = 10; - deviation = 5.0; -}; --------- - -Available options of the 'blur' section are: :: - - *method*::: - A string. Controls the blur method. Corresponds to the *--blur-method* command line option. Available choices are: - 'none' to disable blurring; 'gaussian' for gaussian blur; 'box' for box blur; 'kernel' for convolution blur with a custom kernel; 'dual_kawase' for dual-filter kawase blur. - Note: 'gaussian', 'box' and 'dual_kawase' blur methods are not supported by the legacy backends. - (default: none) - - *size*::: - An integer. The size of the blur kernel, required by 'gaussian' and 'box' blur methods. For the 'kernel' method, the size is included in the kernel. Corresponds to the *--blur-size* command line option (default: 3). - - *deviation*::: - A floating point number. The standard deviation for the 'gaussian' blur method. Corresponds to the *--blur-deviation* command line option (default: 0.84089642). - - *strength*::: - An integer in the range 0-20. The strength of the 'dual_kawase' blur method. Corresponds to the *--blur-strength* command line option. If set to zero, the value requested by *--blur-size* is approximated (default: 5). - - *kernel*::: - A string. The kernel to use for the 'kernel' blur method, specified in the same format as the *--blur-kerns* option. Corresponds to the *--blur-kerns* command line option. - -SIGNALS -------- - -* picom reinitializes itself upon receiving `SIGUSR1`. - -D-BUS API ---------- - -It's possible to control picom via D-Bus messages, by running picom with *--dbus* and send messages to `com.github.chjj.compton.<DISPLAY>`. `<DISPLAY>` is the display used by picom, with all non-alphanumeric characters transformed to underscores. For `DISPLAY=:0.0` you should use `com.github.chjj.compton._0_0`, for example. - -The D-Bus methods and signals are not yet stable, thus undocumented right now. - -EXAMPLES --------- - -* Disable configuration file parsing: -+ ------------- -$ picom --config /dev/null ------------- - -* Run picom with client-side shadow and fading: -+ ------------- -$ picom -cf ------------- - -* Same thing as above, plus making inactive windows 80% transparent, making frame 80% transparent, don't fade on window open/close, and fork to background: -+ ------------- -$ picom -bcf -i 0.8 -e 0.8 --no-fading-openclose ------------- - -* Draw white shadows: -+ ------------- -$ picom -c --shadow-red 1 --shadow-green 1 --shadow-blue 1 ------------- - -* Avoid drawing shadows on wbar window: -+ ------------- -$ picom -c --shadow-exclude 'class_g = "wbar"' ------------- - -* Enable VSync with GLX backend: -+ ------------- -$ picom --backend glx --vsync ------------- - -BUGS ----- -Please submit bug reports to <https://github.com/yshui/picom>. - -Out dated information in this man page is considered a bug. - -RESOURCES ---------- -Homepage: <https://github.com/yshui/picom> - -SEE ALSO --------- -*xcompmgr*(1), link:picom-trans.html[*picom-trans*(1)] diff --git a/man/picom.1.gz b/man/picom.1.gz Binary files differdeleted file mode 100644 index 98fe6b2..0000000 --- a/man/picom.1.gz +++ /dev/null diff --git a/meson.build b/meson.build index 91e4ea6..50b37bb 100644 --- a/meson.build +++ b/meson.build @@ -1,21 +1,12 @@ -project('picom', 'c', version: '1.5.0', +project('compfy', 'c', version: '1.6.0', default_options: ['c_std=c11', 'warning_level=1']) cc = meson.get_compiler('c') # use project version by default -version = 'v1.5.0' +version = 'v'+meson.project_version() -# use git describe if that's available -# git = find_program('git', required: false) -# if git.found() -# gitv = run_command('git', 'rev-parse', '--short=5', 'HEAD', check: false) -# if gitv.returncode() == 0 -# version = version -# endif -# endif - -add_global_arguments('-DPICOM_VERSION="'+version+'"', language: 'c') +add_global_arguments('-DCOMPFY_VERSION="'+version+'"', language: 'c') if get_option('buildtype') == 'release' add_global_arguments('-DNDEBUG', language: 'c') @@ -43,7 +34,7 @@ if get_option('modularize') add_global_arguments(['-fmodules', '-fmodule-map-file='+ meson.current_source_dir()+ - '/src/picom.modulemap'], + '/src/compfy.modulemap'], language: 'c') endif @@ -66,10 +57,13 @@ if get_option('warning_level') != '0' endforeach endif +if get_option('with_docs') + install_data('./man/compfy.1', install_dir: join_paths(get_option('mandir'), 'man1')) +endif + test_h_dep = subproject('test.h').get_variable('test_h_dep') subdir('src') -install_data('bin/picom-trans', install_dir: get_option('bindir')) -install_data('picom.desktop', install_dir: 'share/applications') -install_data('picom.desktop', install_dir: get_option('sysconfdir') / 'xdg' / 'autostart') +install_data('compfy.desktop', install_dir: 'share/applications') +install_data('compfy.desktop', install_dir: get_option('sysconfdir') / 'xdg' / 'autostart') diff --git a/src/backend/backend.c b/src/backend/backend.c index 9d4d10c..32e7cb5 100644 --- a/src/backend/backend.c +++ b/src/backend/backend.c @@ -75,8 +75,8 @@ void handle_device_reset(session_t *ps) { // So here we blindly wait 5 seconds and hope ourselves best of the luck. sleep(5); - // Reset picom - log_info("Resetting picom after device reset"); + // Reset compfy + log_info("Resetting compfy after device reset"); ev_break(ps->loop, EVBREAK_ALL); } diff --git a/src/backend/gl/egl.c b/src/backend/gl/egl.c index e6d4d90..f4b1e3f 100644 --- a/src/backend/gl/egl.c +++ b/src/backend/gl/egl.c @@ -19,7 +19,7 @@ #include "compiler.h" #include "config.h" #include "log.h" -#include "picom.h" +#include "compfy.h" #include "utils.h" #include "x.h" diff --git a/src/backend/gl/glx.c b/src/backend/gl/glx.c index 109bec9..7e171e1 100644 --- a/src/backend/gl/glx.c +++ b/src/backend/gl/glx.c @@ -1,14 +1,4 @@ // SPDX-License-Identifier: MIT -/* - * Compton - a compositor for X11 - * - * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard - * - * Copyright (c) 2011-2013, Christopher Jeffrey - * Copyright (c) 2019 Yuxuan Shui <[email protected]> - * See LICENSE-mit for more information. - * - */ #include <X11/Xlib-xcb.h> #include <assert.h> @@ -28,7 +18,7 @@ #include "compiler.h" #include "config.h" #include "log.h" -#include "picom.h" +#include "compfy.h" #include "region.h" #include "utils.h" #include "win.h" diff --git a/src/backend/xrender/xrender.c b/src/backend/xrender/xrender.c index 79b3ca9..1cbc638 100644 --- a/src/backend/xrender/xrender.c +++ b/src/backend/xrender/xrender.c @@ -17,7 +17,7 @@ #include "config.h" #include "kernel.h" #include "log.h" -#include "picom.h" +#include "compfy.h" #include "region.h" #include "types.h" #include "utils.h" @@ -1,15 +1,5 @@ // SPDX-License-Identifier: MIT -/* - * Compton - a compositor for X11 - * - * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard - * - * Copyright (c) 2011-2013, Christopher Jeffrey - * See LICENSE-mit for more information. - * - */ - #include <ctype.h> #include <fnmatch.h> #include <stdio.h> @@ -1,13 +1,4 @@ // SPDX-License-Identifier: MIT -/* - * Compton - a compositor for X11 - * - * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard - * - * Copyright (c) 2011-2013, Christopher Jeffrey - * See LICENSE-mit for more information. - * - */ #pragma once diff --git a/src/common.h b/src/common.h index aa33140..978acf7 100644 --- a/src/common.h +++ b/src/common.h @@ -1,15 +1,4 @@ // SPDX-License-Identifier: MIT -/* - * Compton - a compositor for X11 - * - * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard - * - * Copyright (c) 2011-2013, Christopher Jeffrey - * Copyright (c) 2018, Yuxuan Shui <[email protected]> - * - * See LICENSE-mit for more information. - * - */ #pragma once @@ -245,7 +234,6 @@ typedef struct session { bool redraw_needed; /// Cache a xfixes region so we don't need to allocate it every time. - /// A workaround for yshui/picom#301 xcb_xfixes_region_t damaged_region; /// The region needs to painted on next paint. region_t *damage; diff --git a/src/picom.c b/src/compfy.c index a3ed614..87dc603 100644 --- a/src/picom.c +++ b/src/compfy.c @@ -1,13 +1,4 @@ // SPDX-License-Identifier: MIT -/* - * Compton - a compositor for X11 - * - * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard - * - * Copyright (c) 2011-2013, Christopher Jeffrey - * See LICENSE-mit for more information. - * - */ #include <X11/Xlib-xcb.h> #include <X11/Xlib.h> @@ -37,7 +28,7 @@ #include "config.h" #include "err.h" #include "kernel.h" -#include "picom.h" +#include "compfy.h" #ifdef CONFIG_OPENGL #include "opengl.h" #endif @@ -1248,7 +1239,7 @@ static int register_cm(session_t *ps) { ps->c, xcb_change_property_checked( ps->c, XCB_PROP_MODE_REPLACE, ps->reg_win, prop_atoms[i], prop_is_utf8[i] ? ps->atoms->aUTF8_STRING : XCB_ATOM_STRING, - 8, strlen("picom"), "picom")); + 8, strlen("compfy"), "compfy")); if (e) { log_error_x_error(e, "Failed to set window property %d", prop_atoms[i]); @@ -1256,11 +1247,11 @@ static int register_cm(session_t *ps) { } } - const char picom_class[] = "picom\0picom"; + const char compfy_class[] = "compfy\0compfy"; e = xcb_request_check( ps->c, xcb_change_property_checked(ps->c, XCB_PROP_MODE_REPLACE, ps->reg_win, ps->atoms->aWM_CLASS, XCB_ATOM_STRING, 8, - ARR_SIZE(picom_class), picom_class)); + ARR_SIZE(compfy_class), compfy_class)); if (e) { log_error_x_error(e, "Failed to set the WM_CLASS property"); free(e); @@ -1302,7 +1293,7 @@ static int register_cm(session_t *ps) { ps->c, xcb_change_property_checked( ps->c, XCB_PROP_MODE_REPLACE, ps->reg_win, get_atom(ps->atoms, "COMPTON_VERSION"), XCB_ATOM_STRING, 8, - (uint32_t)strlen(PICOM_VERSION), PICOM_VERSION)); + (uint32_t)strlen(COMPFY_VERSION), COMPFY_VERSION)); if (e) { log_error_x_error(e, "Failed to set COMPTON_VERSION."); free(e); @@ -1798,13 +1789,13 @@ static void x_event_callback(EV_P attr_unused, ev_io *w, int revents attr_unused * This will result in the compostior resetting itself after next paint. */ static void reset_enable(EV_P_ ev_signal *w attr_unused, int revents attr_unused) { - log_info("picom is resetting..."); + log_info("Compfy is resetting..."); ev_break(EV_A_ EVBREAK_ALL); } static void exit_enable(EV_P attr_unused, ev_signal *w, int revents attr_unused) { session_t *ps = session_ptr(w, int_signal); - log_info("picom is quitting..."); + log_info("Compfy is quitting..."); quit(ps); } @@ -2118,7 +2109,7 @@ static session_t *session_init(int argc, char **argv, Display *dpy, } if (strstr(argv[0], "compton")) { - log_warn("This compositor has been renamed to \"picom\", the \"compton\" " + log_warn("This compositor has been renamed to \"compfy\", the \"picom\" " "binary will not be installed in the future."); } diff --git a/src/picom.h b/src/compfy.h index 7ee289b..5eb1002 100644 --- a/src/picom.h +++ b/src/compfy.h @@ -32,7 +32,6 @@ enum root_flags { }; // == Functions == -// TODO(yshui) move static inline functions that are only used in picom.c, into picom.c void add_damage(session_t *ps, const region_t *damage); diff --git a/src/config.c b/src/config.c index 53adeec..d23a69a 100644 --- a/src/config.c +++ b/src/config.c @@ -591,7 +591,7 @@ static char *locate_auxiliary_file_at(const char *base, const char *scope, const * 1) If an absolute path is given, use it directly. * 2) Search for the file directly under `include_dir`. * 3) Search for the file in the XDG configuration directories, under path - * /picom/<scope>/ + * /compfy/<scope>/ */ char *locate_auxiliary_file(const char *scope, const char *path, const char *include_dir) { if (!path || strlen(path) == 0) { @@ -615,9 +615,9 @@ char *locate_auxiliary_file(const char *scope, const char *path, const char *inc } // Fall back to searching in user config directory - scoped_charp picom_scope = mstrjoin("/picom/", scope); + scoped_charp compfy_scope = mstrjoin("/compfy/", scope); scoped_charp config_home = (char *)xdg_config_home(); - char *ret = locate_auxiliary_file_at(config_home, picom_scope, path); + char *ret = locate_auxiliary_file_at(config_home, compfy_scope, path); if (ret) { return ret; } @@ -625,7 +625,7 @@ char *locate_auxiliary_file(const char *scope, const char *path, const char *inc // Fall back to searching in system config directory auto config_dirs = xdg_config_dirs(); for (int i = 0; config_dirs[i]; i++) { - ret = locate_auxiliary_file_at(config_dirs[i], picom_scope, path); + ret = locate_auxiliary_file_at(config_dirs[i], compfy_scope, path); if (ret) { free(config_dirs); return ret; @@ -841,7 +841,7 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable, .no_fading_destroyed_argb = false, .fade_blacklist = NULL, - // Picom Allusive + // compfy Allusive .animations = true, .animation_for_open_window = OPEN_WINDOW_ANIMATION_ZOOM, diff --git a/src/config_libconfig.c b/src/config_libconfig.c index ac4eb96..7aeecc4 100644 --- a/src/config_libconfig.c +++ b/src/config_libconfig.c @@ -40,8 +40,8 @@ static inline int lcfg_lookup_bool(const config_t *config, const char *path, boo /// Search for config file under a base directory FILE *open_config_file_at(const char *base, char **out_path) { - static const char *config_paths[] = {"/picom.conf", "/picom/picom.conf", - "/compton.conf", "/compton/compton.conf"}; + static const char *config_paths[] = {"/compfy.conf", "/compfy/compfy.conf", + "/picom.conf", "/picom/picom.conf"}; for (size_t i = 0; i < ARR_SIZE(config_paths); i++) { char *path = mstrjoin(base, config_paths[i]); FILE *ret = fopen(path, "r"); @@ -51,11 +51,11 @@ FILE *open_config_file_at(const char *base, char **out_path) { free(path); } if (ret) { - if (strstr(config_paths[i], "compton")) { - log_warn("This compositor has been renamed to \"picom\", " + if (strstr(config_paths[i], "picom")) { + log_warn("This compositor has been renamed to \"compfy\", " "the old config file paths is deprecated. " - "Please replace the \"compton\"s in the path " - "with \"picom\""); + "Please replace the \"picom\"s in the path " + "with \"compfy\""); } return ret; } @@ -69,7 +69,7 @@ FILE *open_config_file_at(const char *base, char **out_path) { * Follows the XDG specification to search for the configuration file. */ FILE *open_config_file(const char *cpath, char **ppath) { - static const char config_filename_legacy[] = "/.compton.conf"; + static const char config_filename_legacy[] = "/.picom.conf"; if (cpath) { FILE *ret = fopen(cpath, "r"); @@ -1,13 +1,4 @@ // SPDX-License-Identifier: MIT -/* - * Compton - a compositor for X11 - * - * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard - * - * Copyright (c) 2011-2013, Christopher Jeffrey - * See LICENSE-mit for more information. - * - */ #include <X11/Xlib.h> #include <ctype.h> @@ -72,8 +63,8 @@ typedef uint32_t cdbus_enum_t; cdbus_reply_errm((ps), dbus_message_new_error_printf( \ (srcmsg), (err_name), (err_format), ##__VA_ARGS__)) -#define PICOM_WINDOW_INTERFACE "picom.Window" -#define PICOM_COMPOSITOR_INTERFACE "picom.Compositor" +#define COMPFY_WINDOW_INTERFACE "compfy.Window" +#define COMPFY_COMPOSITOR_INTERFACE "compfy.Compositor" static DBusHandlerResult cdbus_process(DBusConnection *conn, DBusMessage *m, void *); static DBusHandlerResult cdbus_process_windows(DBusConnection *c, DBusMessage *msg, void *ud); @@ -848,7 +839,7 @@ cdbus_process_window_property_get(session_t *ps, DBusMessage *msg, cdbus_window_ return false; } - if (strcmp(interface, PICOM_WINDOW_INTERFACE)) { + if (strcmp(interface, COMPFY_WINDOW_INTERFACE)) { return false; } @@ -1153,7 +1144,7 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) { // version if (!strcmp("version", target)) { - cdbus_reply_string(ps, msg, PICOM_VERSION); + cdbus_reply_string(ps, msg, COMPFY_VERSION); return true; } @@ -1388,7 +1379,7 @@ static bool cdbus_process_introspect(session_t *ps, DBusMessage *msg) { " <method name='reset' />\n" " <method name='repaint' />\n" " </interface>\n" - " <interface name='" PICOM_COMPOSITOR_INTERFACE "'>\n" + " <interface name='" COMPFY_COMPOSITOR_INTERFACE "'>\n" " <signal name='WinAdded'>\n" " <arg name='wid' type='" CDBUS_TYPE_WINDOW_STR "'/>\n" " </signal>\n" @@ -1479,7 +1470,7 @@ static bool cdbus_process_window_introspect(session_t *ps, DBusMessage *msg) { " <arg type='as' name='invalidated_properties'/>\n" " </signal>\n" " </interface>\n" - " <interface name='" PICOM_WINDOW_INTERFACE "'>\n" + " <interface name='" COMPFY_WINDOW_INTERFACE "'>\n" " <property type='" CDBUS_TYPE_WINDOW_STR "' name='Leader' access='read'/>\n" " <property type='" CDBUS_TYPE_WINDOW_STR "' name='ClientWin' access='read'/>\n" " <property type='" CDBUS_TYPE_WINDOW_STR "' name='Id' access='read'/>\n" @@ -1507,7 +1498,7 @@ cdbus_process(DBusConnection *c attr_unused, DBusMessage *msg, void *ud) { dbus_message_is_method_call(msg, CDBUS_INTERFACE_NAME, method) if (cdbus_m_ismethod("reset")) { - log_info("picom is resetting..."); + log_info("Compfy is resetting..."); ev_break(ps->loop, EVBREAK_ALL); if (!dbus_message_get_no_reply(msg)) cdbus_reply_bool(ps, msg, true); @@ -1656,7 +1647,7 @@ void cdbus_ev_win_added(session_t *ps, struct win *w) { struct cdbus_data *cd = ps->dbus_data; if (cd->dbus_conn) { cdbus_signal_wid(ps, CDBUS_INTERFACE_NAME, "win_added", w->id); - cdbus_signal_wid(ps, PICOM_COMPOSITOR_INTERFACE, "WinAdded", w->id); + cdbus_signal_wid(ps, COMPFY_COMPOSITOR_INTERFACE, "WinAdded", w->id); } } @@ -1664,7 +1655,7 @@ void cdbus_ev_win_destroyed(session_t *ps, struct win *w) { struct cdbus_data *cd = ps->dbus_data; if (cd->dbus_conn) { cdbus_signal_wid(ps, CDBUS_INTERFACE_NAME, "win_destroyed", w->id); - cdbus_signal_wid(ps, PICOM_COMPOSITOR_INTERFACE, "WinDestroyed", w->id); + cdbus_signal_wid(ps, COMPFY_COMPOSITOR_INTERFACE, "WinDestroyed", w->id); } } @@ -1672,7 +1663,7 @@ void cdbus_ev_win_mapped(session_t *ps, struct win *w) { struct cdbus_data *cd = ps->dbus_data; if (cd->dbus_conn) { cdbus_signal_wid(ps, CDBUS_INTERFACE_NAME, "win_mapped", w->id); - cdbus_signal_wid(ps, PICOM_COMPOSITOR_INTERFACE, "WinMapped", w->id); + cdbus_signal_wid(ps, COMPFY_COMPOSITOR_INTERFACE, "WinMapped", w->id); } } @@ -1680,7 +1671,7 @@ void cdbus_ev_win_unmapped(session_t *ps, struct win *w) { struct cdbus_data *cd = ps->dbus_data; if (cd->dbus_conn) { cdbus_signal_wid(ps, CDBUS_INTERFACE_NAME, "win_unmapped", w->id); - cdbus_signal_wid(ps, PICOM_COMPOSITOR_INTERFACE, "WinUnmapped", w->id); + cdbus_signal_wid(ps, COMPFY_COMPOSITOR_INTERFACE, "WinUnmapped", w->id); } } @@ -1,13 +1,4 @@ // SPDX-License-Identifier: MIT -/* - * Compton - a compositor for X11 - * - * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard - * - * Copyright (c) 2011-2013, Christopher Jeffrey - * See LICENSE-mit for more information. - * - */ #include <stdbool.h> diff --git a/src/diagnostic.c b/src/diagnostic.c index 2cb3c8f..85f5ecd 100644 --- a/src/diagnostic.c +++ b/src/diagnostic.c @@ -9,10 +9,10 @@ #include "common.h" #include "config.h" #include "diagnostic.h" -#include "picom.h" +#include "compfy.h" void print_diagnostics(session_t *ps, const char *config_file, bool compositor_running) { - printf("**Version:** " PICOM_VERSION "\n"); + printf("**Version:** " COMPFY_VERSION "\n"); //printf("**CFLAGS:** %s\n", "??"); printf("\n### Extensions:\n\n"); printf("* Shape: %s\n", ps->shape_exists ? "Yes" : "No"); diff --git a/src/event.c b/src/event.c index 62f35e2..acbc82d 100644 --- a/src/event.c +++ b/src/event.c @@ -14,7 +14,7 @@ #include "config.h" #include "event.h" #include "log.h" -#include "picom.h" +#include "compfy.h" #include "region.h" #include "utils.h" #include "win.h" diff --git a/src/meson.build b/src/meson.build index 09eb07b..48b212f 100644 --- a/src/meson.build +++ b/src/meson.build @@ -7,10 +7,10 @@ base_deps = [ libev ] -srcs = [ files('picom.c', 'win.c', 'c2.c', 'x.c', 'config.c', 'vsync.c', 'utils.c', +srcs = [ files('compfy.c', 'win.c', 'c2.c', 'x.c', 'config.c', 'vsync.c', 'utils.c', 'diagnostic.c', 'string_utils.c', 'render.c', 'kernel.c', 'log.c', 'options.c', 'event.c', 'cache.c', 'atom.c', 'file_watch.c') ] -picom_inc = include_directories('.') +compfy_inc = include_directories('.') cflags = [] @@ -85,10 +85,10 @@ endif subdir('backend') -picom = executable('picom', srcs, c_args: cflags, +compfy = executable('compfy', srcs, c_args: cflags, dependencies: [ base_deps, deps, test_h_dep ], - install: true, include_directories: picom_inc) + install: true, include_directories: compfy_inc) if get_option('unittest') - test('picom unittest', picom, args: [ '--unittest' ]) + test('compfy unittest', compfy, args: [ '--unittest' ]) endif diff --git a/src/opengl.c b/src/opengl.c index 5d2d66c..2c6dc83 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -1,13 +1,4 @@ // SPDX-License-Identifier: MIT -/* - * Compton - a compositor for X11 - * - * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard - * - * Copyright (c) 2011-2013, Christopher Jeffrey - * See LICENSE-mit for more information. - * - */ #include <stdio.h> #include <stdlib.h> diff --git a/src/opengl.h b/src/opengl.h index dcd8697..492451a 100644 --- a/src/opengl.h +++ b/src/opengl.h @@ -1,13 +1,4 @@ // SPDX-License-Identifier: MIT -/* - * Compton - a compositor for X11 - * - * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard - * - * Copyright (c) 2011-2013, Christopher Jeffrey - * See LICENSE-mit for more information. - * - */ #pragma once diff --git a/src/options.c b/src/options.c index c5f183c..098e25f 100644 --- a/src/options.c +++ b/src/options.c @@ -22,7 +22,7 @@ #pragma GCC diagnostic error "-Wunused-parameter" -struct picom_option { +struct compfy_option { const char *long_name; int has_arg; int val; @@ -32,7 +32,7 @@ struct picom_option { // clang-format off static const struct option *longopts = NULL; -static const struct picom_option picom_options[] = { +static const struct compfy_option compfy_options[] = { #ifdef CONFIG_LIBCONFIG {"config" , required_argument, 256, NULL , "Path to the configuration file."}, #endif @@ -172,7 +172,7 @@ static const struct picom_option picom_options[] = { {"monitor-repaint" , no_argument , 800, NULL , "Highlight the updated area of the screen. For debugging."}, {"diagnostics" , no_argument , 801, NULL , "Print diagnostic information"}, {"debug-mode" , no_argument , 802, NULL , "Render into a separate window, and don't take over the screen. Useful when " - "you want to attach a debugger to picom"}, + "you want to attach a debugger to compfy"}, {"no-ewmh-fullscreen" , no_argument , 803, NULL , "Do not use EWMH to detect fullscreen windows. Reverts to checking if a " "window is fullscreen based only on its size and coordinates."}, {"animations", no_argument, 804, NULL, "Toggles Animations"}, @@ -195,12 +195,12 @@ static const struct picom_option picom_options[] = { // clang-format on static void setup_longopts(void) { - auto opts = ccalloc(ARR_SIZE(picom_options) + 1, struct option); - for (size_t i = 0; i < ARR_SIZE(picom_options); i++) { - opts[i].name = picom_options[i].long_name; - opts[i].has_arg = picom_options[i].has_arg; + auto opts = ccalloc(ARR_SIZE(compfy_options) + 1, struct option); + for (size_t i = 0; i < ARR_SIZE(compfy_options); i++) { + opts[i].name = compfy_options[i].long_name; + opts[i].has_arg = compfy_options[i].has_arg; opts[i].flag = NULL; - opts[i].val = picom_options[i].val; + opts[i].val = compfy_options[i].val; } longopts = opts; } @@ -259,9 +259,9 @@ void print_help(const char *help, size_t indent, size_t curr_indent, size_t line */ static void usage(const char *argv0, int ret) { FILE *f = (ret ? stderr : stdout); - fprintf(f, "picom (%s)\n", PICOM_VERSION); + fprintf(f, "compfy (%s)\n", COMPFY_VERSION); fprintf(f, "Standalone X11 compositor\n"); - fprintf(f, "Please report bugs to https://github.com/yshui/picom\n\n"); + fprintf(f, "Please report bugs to https://github.com/allusive-dev/compfy\n\n"); fprintf(f, "Usage: %s [OPTION]...\n\n", argv0); fprintf(f, "OPTIONS:\n"); @@ -273,14 +273,14 @@ static void usage(const char *argv0, int ret) { } size_t help_indent = 0; - for (size_t i = 0; i < ARR_SIZE(picom_options); i++) { - if (picom_options[i].help == NULL) { + for (size_t i = 0; i < ARR_SIZE(compfy_options); i++) { + if (compfy_options[i].help == NULL) { // Hide options with no help message. continue; } - auto option_len = strlen(picom_options[i].long_name) + 2 + 4; - if (picom_options[i].arg_name) { - option_len += strlen(picom_options[i].arg_name) + 1; + auto option_len = strlen(compfy_options[i].long_name) + 2 + 4; + if (compfy_options[i].arg_name) { + option_len += strlen(compfy_options[i].arg_name) + 1; } if (option_len > help_indent && option_len < 30) { help_indent = option_len; @@ -288,27 +288,27 @@ static void usage(const char *argv0, int ret) { } help_indent += 6; - for (size_t i = 0; i < ARR_SIZE(picom_options); i++) { - if (picom_options[i].help == NULL) { + for (size_t i = 0; i < ARR_SIZE(compfy_options); i++) { + if (compfy_options[i].help == NULL) { continue; } size_t option_len = 8; fprintf(f, " "); - if ((picom_options[i].val > 'a' && picom_options[i].val < 'z') || - (picom_options[i].val > 'A' && picom_options[i].val < 'Z')) { - fprintf(f, "-%c, ", picom_options[i].val); + if ((compfy_options[i].val > 'a' && compfy_options[i].val < 'z') || + (compfy_options[i].val > 'A' && compfy_options[i].val < 'Z')) { + fprintf(f, "-%c, ", compfy_options[i].val); } else { fprintf(f, " "); } - fprintf(f, "--%s", picom_options[i].long_name); - option_len += strlen(picom_options[i].long_name) + 2; - if (picom_options[i].arg_name) { - fprintf(f, "=%s", picom_options[i].arg_name); - option_len += strlen(picom_options[i].arg_name) + 1; + fprintf(f, "--%s", compfy_options[i].long_name); + option_len += strlen(compfy_options[i].long_name) + 2; + if (compfy_options[i].arg_name) { + fprintf(f, "=%s", compfy_options[i].arg_name); + option_len += strlen(compfy_options[i].arg_name) + 1; } fprintf(f, " "); option_len += 2; - print_help(picom_options[i].help, help_indent, option_len, + print_help(compfy_options[i].help, help_indent, option_len, (size_t)line_wrap, f); } } @@ -342,7 +342,7 @@ bool get_early_config(int argc, char *const *argv, char **config_file, bool *all } else if (o == 314) { *all_xerrors = true; } else if (o == 318) { - printf("%s\n", PICOM_VERSION); + printf("%s\n", COMPFY_VERSION); return true; } else if (o == '?' || o == ':') { usage(argv[0], 1); @@ -353,7 +353,7 @@ bool get_early_config(int argc, char *const *argv, char **config_file, bool *all // Check for abundant positional arguments if (optind < argc) { // log is not initialized here yet - fprintf(stderr, "picom doesn't accept positional arguments.\n"); + fprintf(stderr, "Compfy doesn't accept positional arguments.\n"); goto err; } diff --git a/src/picom.modulemap b/src/picom.modulemap index 787c4ff..621ad81 100644 --- a/src/picom.modulemap +++ b/src/picom.modulemap @@ -20,8 +20,8 @@ module utils { module region { header "region.h" } -module picom { - header "picom.h" +module compfy { + header "compfy.h" } module types { header "types.h" @@ -25,7 +25,7 @@ #include "config.h" #include "list.h" #include "log.h" -#include "picom.h" +#include "compfy.h" #include "region.h" #include "render.h" #include "string_utils.h" @@ -3133,7 +3133,7 @@ struct managed_win *find_managed_window_or_parent(session_t *ps, xcb_window_t wi // Using find_win here because if we found a unmanaged window we know // about, we can stop early. while (wid && wid != ps->root && !(w = find_win(ps, wid))) { - // xcb_query_tree probably fails if you run picom when X is + // xcb_query_tree probably fails if you run compfy when X is // somehow initializing (like add it in .xinitrc). In this case // just leave it alone. auto reply = xcb_query_tree_reply(ps->c, xcb_query_tree(ps->c, wid), NULL); |