You are not logged in.
Pages: 1
Hi all,
I would like to remove/hide the window decoration bar of the Workrave window below.
Any ideas how I can achieve this?
Thank you! ??
Offline
Manual way:
Save the following contents to a file and make it executable:
#! /usr/bin/python2
import gtk.gdk
w = gtk.gdk.window_foreign_new( gtk.gdk.get_default_root_window().property_get("_NET_ACTIVE_WINDOW")[2][0] )
w.set_decorations( (w.get_decorations()+1)%2 ) # toggle between 0 and 1
gtk.gdk.window_process_all_updates()
gtk.gdk.flush()
...and assign it to a keyboard shortcut. With that window focused, press the hotkey combination.
*Note: there might be something off with that script. I need to press the hotkey twice for every new window (then once afterwards). The script might need to be tweaked but it works.
Automated method:
You can use devilspie. To do so, run devilspie in debug mode:
devilspie -d
...and post back the snippet that is displayed when that window is opened. You can then write a .ds file that will automatically undecorate it. This requires that devilspie is running as a daemon.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks ToZ! ⭐
I went with the following solution:
[orschiro@x230 ~]$ cat .config/devilspie2/workrave.lua
if (get_window_name() == "Workrave") then
undecorate_window();
end
Last edited by orschiro (2019-03-22 18:03:02)
Offline
@Toz I liked your python solution but it doesn't seem to work out of the box since Debian 10.
I get:
ImportError: No module named gtk.gdk
Am I missing a package?
Last edited by ChameleonScales (2019-12-31 09:10:31)
Offline
Yes. I believe it is python-gtk2.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
This app works:
https://gist.github.com/muktupavels/d03 … 4c87df975d
Just need to pass the Xwindow ID to it.
Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c
Offline
Looks like python-gtk2 is gone from Ubuntu 20. Any chance you could update your python script to GTK3 (and preferably python3)?
Offline
Looks like python-gtk2 is gone from Ubuntu 20. Any chance you could update your python script to GTK3 (and preferably python3)?
Have a read through this post. It shows you how to compile a small c program to do the same.
Once compiled, make sure xdotool is installed, then bind the following to a shortcut key:
bash -c "/path/to/toggle-decorations $(xdotool getactivewindow)"
Edit: changed shortcut command to work.
Last edited by ToZ (2020-09-12 19:50:28)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Works like a charm, thanks!
Offline
Actually it doesn't work on Gnome applications (e.g. gthumb). Is there a solution to that?
Offline
Actually it doesn't work on Gnome applications (e.g. gthumb). Is there a solution to that?
Because it uses CSD - the only way to manipulate those windows is for the application to support it. The above solution works only with SSD windows.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
An easy and customizable solution if you can write just a little code, using devilspie2.
Instructions here: https://unix.stackexchange.com/question … ram#712774
Tested on Debian 11 XFCE.
Hope this helps
Last edited by ssq (2022-08-07 20:59:15)
Offline
Pages: 1
[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 561.95 KiB (Peak: 578.79 KiB) ]