How to close any window in Awesome WM

awesomekeyboard shortcutswindow-managementwindow-manager

Desktop application developers are free to choose which keyboard shortcuts they want to support. On Windows the convention is pretty strong:

  • AltF4 closes most applications
  • CtrlF4 closes most major sub-windows
  • Esc dismisses most dialogue boxes.

On Linux there hasn't been quite so much convergence, but the following are common:

  • Ctrlq closes most applications
  • Ctrlw closes most major sub-windows
  • Esc dismisses most dialogue boxes.

Unfortunately many applications have chosen to go their own way, either by using the Windows convention or by just doing their own thing:

  • AltF4 closes Chromium
  • CtrlShiftq closes GNOME Shell
  • Altf x closes IDEA

To close sub-windows and dialogue boxes all bets are off. I've seen all of these in use:

  • Esc
  • CtrlF4
  • Ctrlw

Some applications don't even have shortcuts for closing some windows (or at least none that I have been able to find).

Window managers have the power to override any of these, and can therefore be very helpful for keyboard users. Awesome WM is very keyboard-friendly, but are there global shortcuts to close any window and/or application in Awesome WM, and if not, how do I set them up?

Best Answer

From man awesome there doesn't seem to be a default key binding to close all windows of an application. It might be possible to manually add such a binding.

There is, however, a default key binding to close the one focused window*: Mod4-Shift-c. This will leave other windows (if any) of the application intact. It does not work for sub-windows ("logical" windows like tabs which are part of a single application window).

* Or "client" as it is known from the perspective of X as opposed to the user.

Related Question