#! /bin/zsh # # this file: # https://dataswamp.org/~incal/conf/.zsh/transparency # # command from: # https://unix.stackexchange.com/a/494289 set-transparency () { local trans=$1 local win=${2:-$(win-id)} xprop -id $win \ -format _NET_WM_WINDOW_OPACITY 32c \ -set _NET_WM_WINDOW_OPACITY $trans } transparent () { local trans=${1:-0xaaffffff} set-transparency $trans } alias trans=transparent opaque () { set-transparency 0xffffffff # 0% } alias opa=opaque