LinuxCommandLibrary

picom-trans

Change window transparency using picom

TLDR

Set the currently focused window opacity to a specific percentage

$ picom-trans --current --opacity [90]
copy

Set the opacity of a window with a specific name
$ picom-trans --name [Firefox] --opacity [90]
copy

Set the opacity of a specific window selected via mouse cursor
$ picom-trans --select --opacity [90]
copy

Toggle the opacity of a specific window
$ picom-trans --name [Firefox] --toggle
copy

SYNOPSIS

picom-trans [-f|-c CLASS|-n NAME|-p PID|-i ID] [VALUE]
picom-trans [-t|-F|-I VALUE|-D VALUE|-u] [ID]
picom-trans [-v|-h]

PARAMETERS

<ID>
    Target a window by its hexadecimal X window ID. This is the default action if no other targeting option is specified.

-f, --focus
    Operate on the currently focused window.

-c <CLASS>, --class <CLASS>
    Target windows matching the specified X window class name.

-n <NAME>, --name <NAME>
    Target windows matching the specified X window name (title).

-s <VALUE>, --set <VALUE>
    Set the target window's opacity to VALUE (0-100, where 100 is fully opaque).

-t, --toggle
    Toggle the target window's opacity between its current state and a default opaque state.

-I <VALUE>, --increment <VALUE>
    Increase the target window's current opacity by VALUE.

-D <VALUE>, --decrement <VALUE>
    Decrease the target window's current opacity by VALUE.

-u, --unfade
    Restore the target window to its default opaque state, overriding any previous transparency.

-h, --help
    Display a help message and exit.

-v, --version
    Display version information and exit.

DESCRIPTION

picom-trans is a dedicated command-line utility for interacting with the picom X compositor, specifically designed to control the transparency (opacity) of windows. It offers a powerful and flexible way to dynamically modify window visibility, allowing users to set an exact opacity value, toggle between opaque and transparent states, or gradually increase/decrease transparency. Windows can be targeted using various identifiers, including their numerical window ID, their application class name (e.g., "Terminator"), their window title/name, or the process ID that owns the window. A particularly useful feature is the ability to target the currently focused window without needing its specific identifier. This utility is invaluable for desktop customization, enabling users to create keyboard shortcuts for on-the-fly opacity adjustments, integrate opacity changes into shell scripts, or simply fine-tune the look and feel of their workspace. By leveraging picom's capabilities, picom-trans provides seamless control over window appearance, making it a crucial tool for those seeking to enhance their visual desktop environment.

CAVEATS

picom-trans requires an X compositor, specifically picom or a compatible alternative, to be running for its functionality to have any effect. The effectiveness and precise behavior may depend on the compositor's configuration and the type of window being manipulated. Window IDs are typically hexadecimal values and can be obtained using tools like xwininfo.

INTERACTION MECHANISM

picom-trans communicates with the picom compositor (or compatible alternatives) primarily by setting specific X window properties, such as _NET_WM_WINDOW_OPACITY. These properties are then interpreted and rendered by the running compositor to achieve the desired visual effect. Some versions or configurations might also leverage D-Bus for more direct communication with the compositor's running instance.

HISTORY

picom-trans emerged as a companion utility alongside the development of X compositors like compton (a fork of xcompmgr) and later picom (a fork of compton). Its purpose has always been to provide a command-line interface for dynamically manipulating window opacity, a key feature offered by these compositors. Its evolution has mirrored the progress of its parent projects, focusing on offering robust and flexible control over window appearance within X11 desktop environments.

SEE ALSO

picom(1), xwininfo(1), xprop(1)

Copied to clipboard