# setwmc: companion for yad and plank

setwmc tries to solve the problem one encounters installing a script,
together with with a desktop file for use in for example the
excellent dock [plank](https://github.com/ricotz/plank)
using for example [yad](https://github.com/v1cont/yad).

The problem is, that, in order plank to function correctly, 
the script needs to show a window with a class mentioned in
the .desktop file, such as:

     StartupWMClass=check-website

Plank will than recognize the window and take actions to show it in
the dock etcetera.

This is where ``setwmc`` comes into play: you can use it as a wrapper around
for example ``yad``. ``Setwmc`` will create a small window with the desired 
name and class and start ``yad``. Example:

     setwmc check-website check-website yad --info

``Plank`` will see the window with class ``check-website`` and take appropriate
actions. Care is taken that ``setwmc`` exits when ``yad`` exits, and that 
``yad`` exits when the small window is destroyed, for example by clicking
'Close' in the icon in the dock.

An example of the usage of ``setwmc`` is available in [check-website](../check_website).

The software is available [here](YYYdZZZ/setwmc/setwmc.tar.gz).

