Page 2 of 2

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Mon Mar 18, 2019 10:53 am
by Mintymandy34
smurphos wrote:
Fri Mar 15, 2019 3:34 pm
I've just edited the first post with version 0.2 of the script. After experimenting with a few ways to match up related windows (dialogs to parents etc) I settled on a fairly simple but I think quite pleasing method of grouping windows by PID (Process ID's) so they can have a different opacity from unrelated unfocused windows.

As provided the focused window will be 95% opaque, other windows in it's group 90% and other unfocused windows 70%.
Sorry for the delay.
And thanks for the second version of the script.
I love the technique of grouping windows by PID.
I have set GROUP_OPACITY=100 so that when one opens a Preferences Window or anything similar the application is treated as Maximised focused window providing better visibility.
Thanks for this.
It's really great.
I'll post a comparison between this effect and the original ones, but I think your script has achieved everything it was originally created for.
Thanks. :D

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Tue Mar 19, 2019 3:48 am
by smurphos
No worries - there will probably be one more iteration in the next few days. I've noticed that the script creates quite a lot of spam in .xsession-errors. The errors are harmless, but I should be able to amend to script to 'mute' them.

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Tue Mar 19, 2019 11:54 pm
by smurphos
First post updated with v0.3 of the script. This is just to eliminate ~/.xsession-errors being spammed by xdotool / xprop error states when there isn't a focused window, when the focused window is a splash, and on focused window closure.

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Fri Mar 22, 2019 3:35 pm
by Mintymandy34
smurphos wrote:
Tue Mar 19, 2019 11:54 pm
First post updated with v0.3 of the script. This is just to eliminate ~/.xsession-errors being spammed by xdotool / xprop error states when there isn't a focused window, when the focused window is a splash, and on focused window closure.
Thanks smurphos, will test this. :)
Do you know if this effect can be temporarily disabled like for 30 minutes or 1 hour without rebooting the machine?
I was testing this with several applications and checking custom opacity values that are favourable for my case, if I could disable it temporarily, I could check the for the difference it makes in different applications and choose which ones to ignore and which ones to keep.

Thanks for this script, it's great. :D
I'm thinking of a way to configure custom values when starting this script, the idea came from your way of implementing zenity to choose different profiles for firejail.
I think this has a great potential. :)

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Sat Mar 23, 2019 2:15 am
by smurphos
You can kill the script running in the background with a terminal command. Assuming you had saved the script with the suggested filename...

Code: Select all

pkill opacify_windows.sh
That will leave all currently open windows in their last opacity state though.

So perhaps a little secondary script to toggle the main script on and off, including a quick run through all current windows to set the opacity to default if it's toggling off? The second script you could link to a panel or desktop launcher or just use from the terminal

Code: Select all

#!/bin/bash

# Requires wmctrl - apt install wmctrl

# If opacify_windows.sh is not running run it
if ! pgrep opacify_windows.sh; then
  exec opacify_windows.sh
  exit 1
# else kill it and set all windows to 100% opacity.
else
  pkill opacify_windows.sh
# get list of all window IDs in workspace
  WIDS=$(wmctrl -l | awk '{print$1}')
# run through list and update opacity
  for w in $WIDS; do
    xprop -id $w -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY 0xffffffff
  done
fi 
Mintymandy34 wrote:
Fri Mar 22, 2019 3:35 pm
Thanks for this script, it's great. :D
I'm thinking of a way to configure custom values when starting this script, the idea came from your way of implementing zenity to choose different profiles for firejail.
I think this has a great potential. :)
:thumbsup: :D

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Sat Mar 23, 2019 3:40 pm
by Mintymandy34
smurphos wrote:
Sat Mar 23, 2019 2:15 am
You can kill the script running in the background with a terminal command. Assuming you had saved the script with the suggested filename...

Code: Select all

pkill opacify_windows.sh
That will leave all currently open windows in their last opacity state though.

So perhaps a little secondary script to toggle the main script on and off, including a quick run through all current windows to set the opacity to default if it's toggling off? The second script you could link to a panel or desktop launcher or just use from the terminal

Code: Select all

#!/bin/bash

# Requires wmctrl - apt install wmctrl

# If opacify_windows.sh is not running run it
if ! pgrep opacify_windows.sh; then
  exec opacify_windows.sh
  exit 1
# else kill it and set all windows to 100% opacity.
else
  pkill opacify_windows.sh
# get list of all window IDs in workspace
  WIDS=$(wmctrl -l | awk '{print$1}')
# run through list and update opacity
  for w in $WIDS; do
    xprop -id $w -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY 0xffffffff
  done
fi 
Thanks smurphos.
I'm planning to make a full fledged UI for this, one that provides features like buttons to enable and disable this script, resetting to default settings, controlling opacity values, adding exceptions and saving custom presets.
I know this can be done in zenity but I've not seen any complex GUI created in zenity, when I search online, I only find simple and single elements implemented.
Do you know where I could find such complex GUI implementations in Zenity?
I've also tried Glade, but I couldn't find enough tutorials to get it going, I'm really bad at learning from man, I learn better with the help of visuals, if only there was man-gui version. :(
And I'm really on this, I would love to implement a GUI for this. :D
You've really done a great job with the script. I love it.

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Thu Mar 28, 2019 3:18 am
by smurphos
Mintymandy34 wrote:
Sat Mar 23, 2019 3:40 pm
I know this can be done in zenity but I've not seen any complex GUI created in zenity, when I search online, I only find simple and single elements implemented.
Do you know where I could find such complex GUI implementations in Zenity?
I've also tried Glade, but I couldn't find enough tutorials to get it going, I'm really bad at learning from man, I learn better with the help of visuals, if only there was man-gui version. :(
And I'm really on this, I would love to implement a GUI for this. :D
You've really done a great job with the script. I love it.
Sorry I'm not aware of any in depth tutorials for zenity. You might want to look into yad (yet another dialog) as-well - it's zenity on steroids so a little more complex, but also more flexible.

apt install yad

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Wed May 01, 2019 1:23 pm
by jlfh0816
Hello,
I have tested your script on Xubuntu 18.04 and it works perfectly!
I’m quite taken with the work you’ve done, so much so that I decided to give you some spotlight on the ubuntu.fr forum.
For my part, I have been desperately searching for a script that would make transparent my nemo window background (instead of the whole window).
Aside from nw.js and this script in python, I haven’t found anything that would work on nemo as is. Would you have any lead on that front?

Good job for the amazing script you’ve written,

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Thu May 02, 2019 1:42 am
by smurphos
jlfh0816 wrote:
Wed May 01, 2019 1:23 pm
Good job for the amazing script you’ve written,
Thank-you for the feedback, glad you like it and it works well outside of Cinnamon / Muffin. It principle it should be OK in any Xorg based desktop environment, but having not tested outside of Cinnamon/Muffin I wouldn't want to advertise that... :)

I'll have a think about making the pane transparent via a GTK override.

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Tue Sep 10, 2019 4:18 am
by vaca
Thanks !!!! excelent job Smurphos perfect opacity and workspace background switcher linux , mint forever :D :D :D

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Thu Jan 30, 2020 3:30 pm
by Voctor
This is great! I'm using it, :D

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Sun Feb 16, 2020 10:57 pm
by bn40400
Just what I was looking for....Great job on the script Smurphos! Thank you so much for the time and effort you put into this (never lone sharing it), I'm using it now and it works flawlessly. My desktop environment looks so amazing! :D

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Mon Feb 17, 2020 12:35 am
by smurphos
You are welcome - glad you like it. :)

Re: Opacified / Translucent / Transparent Windows in Cinnamon.

Posted: Sun May 17, 2020 7:33 pm
by pilotbob42
A bit late to the game, but just found this. Exactly what I was looking for! Great job!