remove title bar of another program
Wmctrl
This is kind of related but you could change the text in the title bar of this mystery application using the command wmctrl
.
Example
Say I ran the application gvim
. It shows up as follows when I list the open windows.
$ wmctrl -l
0x04402eed -1 grinchy N/A
0x00c00003 -1 grinchy Bottom Expanded Edge Panel
0x00c00028 -1 grinchy Top Expanded Edge Panel
0x0120001e 0 grinchy x-nautilus-desktop
0x02a00004 0 grinchy saml@grinchy:~
0x06800003 0 grinchy [No Name] - GVIM
So the gvim
window has the title "[No Name] - GVIM", we can change its name like so, again using wmctrl
:
$ wmctrl -r "[No Name] - GVIM" -N "new name"
Running the -l
switch again we can see the new name:
$ wmctrl -l
0x04402eed -1 grinchy N/A
0x00c00003 -1 grinchy Bottom Expanded Edge Panel
0x00c00028 -1 grinchy Top Expanded Edge Panel
0x0120001e 0 grinchy x-nautilus-desktop
0x02a00004 0 grinchy saml@grinchy:~
0x06800003 0 grinchy new name
All decorations
There is this method discussed in this AskUbuntu Q&A titled: Can I hide the title bar of MPlayer in gnome?.
There was this gist of Python - window-toggle-decorations.py that looked to do kind of what you wanted. It might be modifiable to suit your needs.
window-toggle-decorations.py
#! /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()
# now bind this to super-r or something
There is a simple C program that works, originally developed by Muktupavels.
I use it and it works very well. It's here
https://gist.github.com/cat-in-136/96ee8e96e81e0cc763d085ed697fe193
It lets you toggle the title bar on and off for any given application.
To use it, simply make sure you have the libx11-dev
library installed
sudo apt-get install -y libx11-dev
then compile the code using this command
gcc toggle-decorations.c -Wall -o toggle-decorations `pkg-config --cflags --libs x11`
and run it with this command
./toggle-decorations $(wmctrl -lx | grep -E "name_of_your_application_here" | grep -oE "[0-9a-z]{10}")
where $(...)
captures the --id
of your application using wmctrl.
I did not do this great work and take no credit for it.
It was done by muktupavels.