Skip to content

Instantly share code, notes, and snippets.

@mgedmin
Created April 2, 2014 17:37
Show Gist options
  • Save mgedmin/9939066 to your computer and use it in GitHub Desktop.
Save mgedmin/9939066 to your computer and use it in GitHub Desktop.
Fake transset that works in GNOME
#!/bin/bash
echo "Using ~/bin/transset instead of the broken /usr/bin/transset"
echo "See https://bugs.freedesktop.org/show_bug.cgi?id=76958"
opacity=${1:-0.75}
scaled=$(echo "$opacity*4294967295"|bc)
hex=$(printf "0x%x" ${scaled%.*})
echo "Setting opacity to $opacity"
xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $hex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment