I've been working on MyFirstTheme, which has resulted in me changing xfce themes frequently as iteratively I discover what I did wrong.
Every few theme-changes, all my Terminal windows (regardless of workspace) will lose a column and a row. I've seen the windows go from 80x64 down to 40ishx20ish after playing with theme ideas for an evening.
Any ideas why this might be happening, or ideas on how to stop it from happening?
- - -
Also, I'm blanking on how to generate a message to resize a window. (This is what happens when I don't use X as a primary platform for 10 years.) Is there a way to tell the app (or the window manager) to resize the window to an arbitrary geometry? Creating an accel to do that would be a good-enough solution.
- - -
Fedora 18, Xfce 4.10, Terminal 0.4.8 . Although I experienced the same behaviour on Xfce 4.2.1 on CentOS 6.4 (I'm not sure which Terminal version that was; I blew the system away when I switched to Fedora).
I’ve noticed the same behaviour in the past. wmctrl has an option to resize windows.
I'm currently in the midst of writing a wrapper script to go around wmctrl to resize windows back; the problem is that it will have to be a hack.
As far as I can tell, there is no way to tell a window to do a resize based on character size (i.e. resize to n rows and m columns). wmctrl only works on pixels (and is broken in a number of annoying ways; like gravity is documented to take a string, but only takes an integer and what it does with it, I've not been able to tell.)
My script is very, very hackish and brittle. In order to calculate window size, I'm comparing the WN_CLASS (from xprop) with a list of known terminal programs (xterm, aterm, Terminal, etc.), attempt to grep a font from ~/.config/<app name>/*, finding the font file with fc-match, using perl Font to query width-per-character, doing Math, adding in the frame size from xwininfo, and viola.
Which is great when it works, and spectacular when it doesn't.