Is there a way to set some transparency (it would be awesome activate this feature by shortcut-toggle) to a specific window (for example only on chromium-browser
)?
1 Answer
Adding a transparent theme:
The first thing we need is to copy a GTK theme (i.e. elemantary default theme) and modify it to display transparent windows. This can be a tough task, editing and testing CSS combinations, until we find the right levels.
A more simple way to check the operation of this trick, you can install a transparent theme designed to elementary OS, executing in terminal:
sudo add-apt-repository ppa:yunnxx/elementary
sudo apt-get update
sudo apt-get install elementary-transparent-theme
Once it's installed, you can test its performance with the command:
env GTK_THEME=transparent pantheon-files
Creating a shortcut:
The easiest way to make a shortcut to launch your application with transparent theme is creating a new .desktop file.
Make a copy of your target application launcher. With pantheon-files, open a terminal and execute:
sudo cp /usr/share/applications/pantheon-files.desktop /usr/share/applications/trans-pantheonfiles.desktop
Edit the new launcher:
sudo scratch-text-editor /usr/share/applications/trans-pantheonfiles.desktop
Go to line no. 2 and change
Name=Files
with something likeName=TransFiles
Go to line no. 6 and change the Exec variable with:
Exec=env GTK_THEME=transparent pantheon-files %U
Save changes.
Now you can see a new launcher in slingshot called "TransFiles". You can also add it to Plank.
The chromium problem:
Chromium browser don't follow the gtk guidelines, like others applications. To make transparent window, I suggest you to use a theme from Chrome Web Store
Sources:
The great answer at AskUbuntu.com by Cassidy James (member of elementary team)