this script was taken from askubuntu and official manjaro forum.
This is great to close all windows opened but at the same time all you dont..
first check all windows you dont intend to be closed doing this in terminal
if you dont have wmctrl installed you can pick up on pkgs.org
edit the script and change cinnamon-panel by your desktop panel name
add either the intended window to not be closed as for example of mine ... Docky
you can put on panel as command launcher