---
name: "compton-trans"
section: "1"
platform: "linux"
package: "compton"
version: "1-3+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/compton-trans"
---

# compton-trans(1)

an opacity setter tool

## NAME

compton-trans - an opacity setter tool

## SYNOPSIS

**compton-trans** \[-w *WINDOW\_ID*\] \[-n *WINDOW\_NAME*\] \[-c\] \[-s\] *OPACITY*

## DESCRIPTION

**compton-trans** is a bash script that sets *\_NET\_WM\_WINDOW\_OPACITY* attribute of a window using standard X11 command-line utilities, including [**xprop**(1)](/xprop/1.md) and [**xwininfo**(1)](/xwininfo/1.md). It is similar to [**transset**(1)](/transset/1.md) or [**transset-df**(1)](/transset-df/1.md).

## OPTIONS

- **-w** *WINDOW\_ID*

  Specify the window id of the target window.

- **-n** *WINDOW\_NAME*

  Specify and try to match a window name.

- **-c**

  Specify the currently active window as target. Only works if EWMH *\_NET\_ACTIVE\_WINDOW* property exists on root window.

- **-s**

  Select target window with mouse cursor. This is the default if no window has been specified.

- **-o** *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.

## EXAMPLES

• Set the opacity of the window with specific window ID to 75%:

```
compton-trans -w "$WINDOWID" 75
```

• Set the opacity of the window with the name "urxvt" to 75%:

```
compton-trans -n "urxvt" 75
```

• Set current window to opacity of 75%:

```
compton-trans -c 75
```

• Select target window and set opacity to 75%:

```
compton-trans -s 75
```

• Increment opacity of current active window by 5%:

```
compton-trans -c +5
```

• Decrement opacity of current active window by 5%:

```
compton-trans -c -- -5
```

## BUGS

Please report any bugs you find to https://github.com/chjj/compton .

## AUTHORS

Christopher Jeffrey (https://github.com/chjj).

## SEE ALSO

[**compton**(1)](/compton/1.md), [**xprop**(1)](/xprop/1.md), [**xwininfo**(1)](/xwininfo/1.md)
