Skip to content

Draft: compositor: supports color inversion

Yifan Zhu requested to merge fanzhuyifan/xfwm4:invert into master

See 747

color inversion is now controlled by the x property XFWM4_COLOR_INVERT

feedback is welcome! I still need to figure out how to support the GUI though, and add the inversion code for zoomed screens and eproxy stuff.

Also, currently this is quite slow. I think it would have to be significantly faster to be useful.

Here is a script I use for toggling the color inversion status:


WIN_ID=$(xdotool getactivewindow)

status=$(xprop -id $WIN_ID $XPROPNAME | awk -F= '{print $2}')

echo $status
# set status to 1 if not set
if [ "$status" = "" ]; then
    xprop -id $WIN_ID -f $XPROPNAME 32c -set $XPROPNAME 1

# toggle the status
if [ "$status" -eq 0 ]; then
    xprop -id $WIN_ID -f $XPROPNAME 32c -set $XPROPNAME 1
    xprop -id $WIN_ID -f $XPROPNAME 32c -set $XPROPNAME 0
Edited by Yifan Zhu

Merge request reports