I'm using latexmk -pdf -pvc to keep compiling my LaTeX files to PDFs while they are displayed in evince. I'm doing that a lot with different files and I keep needing to zoom the PDF content, resize the window and enable "always on top". I like to be able to do this automatically using the command line.
Using -geometry doesn't work with evince ("Unknown option") and the command line help doesn't say anything about it as well. I tried the preview -w option which gives me a nice sized window, but the automatic update feature I need seems to be disabled in this mode.

I'm using Ubuntu 11.10 with the classic desktop and the default window manager.
Is there a possibility to set both the size and position as well as "always on top" from the command line for evince (or similar PDF viewer with auto-update)? I think there might be some window manager control tool which can resize and configure windows from the command line.

I'm aware of an evince feature request to add size and position arguments, which would be half the job already, but I don't think it will be implemented soon.

1 Answer
1

Since evince lacks options to explicitly control its own window management (as do most applications), the next approach is to control evince externally from the window manager itself. Assuming GNOME with metacity as the window manager, you'll have to use devilspie to get the window matching features.

Install devilspie from your official Ubuntu repositories.

Configure latexmk to use evince --name LaTeX_evince (instead of the default which is evince). This distinguishes your LaTeX evince windows from other evince windows.

Configure devilspie by adding the following to ~/.devilspie/latex_evince.ds