# Get a list of windows controlled by your window manager
wmctrl -l
# Close a specific window by the title, or a substring of the title
# Useful to close windows on non-visible workspaces
wmctrl -c "firefox"
# The default behaviour of -c may be ambiguous in the case of multiple browser
# instances, for example
wmctrl -F -c "Facebook - Mozilla Firefox"