0

This is more like a follow up of this thread here.

I'm using i3-tiling window manager and I'm trying to figure out if a Firefox instance is running IN A SPECIFIC WORKSPACE or not.

Now,

pgrep -x firefox works flawlessly it really only tells you that if a program is running and not much about where it is running, or in which workspace is it running?

Is there any way for me to do that?

1 Answers1

0

The second column of the command wmctrl -lx indicates the workspace the window is currently on. The -x switch also shows the window class. This provides you all information needed to determine whether one or more windows of a certain application are open in a specific workspace. Note that wmctrl starts counting from 0 to denote the first workspace.

vanadium
  • 88,010