lsd: List Desktops lsd(1) lists one line per desktop (in the order they are sorted). Each line contains the desktop state (whether it is the current one, or the urgent one), the number of windows in this desktop, and the name of the desktop. Here's a sample output: $ lsd 2:Work -2:Web *1:Chat 0:Games 0:Other Each line indicates a desktop, from 0 to the number of desktops minus 1 (in this example we have 5 desktops). The current desktop is indicated by an asterisk, the desktop with an urgent window is indicated by an hyphen. The number indicates the number of windows exclusively in this desktop (windows that belongs to more than one desktop are ignored). After the colon is the name of the desktop. With an argument (such as -w), lsd watches for changes in the desktop structure. In this case, instead of being separated by lines, each desktop info is separated by a tab, and each time new information is queried a new information line is printed. Why? Because I need those information (current desk, windows per desk, etc) for my bar script. I once wrote a script that used xprop(1) to output those information, but it took a whole second to run! Now rewritten in C, it takes less than a tenth of a second. This software is in public domain and is provided AS IS, with NO WARRANTY.