Search code examples
awesome-wm

How to screenshot all tags and windows in AwesomeWM


I want to create an overview of all tags.
My first step is trying to screenshot all of the tags and (or) clients currently opened.

I've tried using imagemagick import utility to screenshot clients but it only works when the client is in the same tag I use the command.

import -window WINDOW_ID myImage.jpg

Error when in different tag:

import: unable to read X window image 'WINDOW_ID': Resource temporarily unavailable @ error/xwindow.c/XImportImage/5041.
import:  `myImage.jpg' @ error/import.c/ImportImageCommand/1288.

Any advice?

EDIT:
Realized I could screenshot each client or tag after the unfocus signal.
But I'm still curious why you can't screenshot clients in other tags. If anyone could answer I'd be grateful.

P.S. There's a client property called content that gives you the needed picture


Solution

  • But I'm still curious why you can't screenshot clients in other tags. If anyone could answer I'd be grateful.

    X11 doesn't keep more than the currently visible screen contents around. Even when a window is only partially visible (because some other window covers part of it, or because part of the window is off-screen), it becomes likely that you won't be able to get a screenshot of the currently not visible parts.

    There are some ways that might still work in these cases, but for windows on another tag, the only way to get their content is to make these windows visible and wait for them to re-draw themselves. A screenshot utility cannot do that.

    This is just how X11 works.