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

  • Alt-F4 closes most applications
  • Ctrl-F4 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:

  • Ctrl-q closes most applications
  • Ctrl-w 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:

  • Alt-F4 closes Chromium
  • Ctrl-Shift-q closes GNOME Shell
  • Alt-f x closes IDEA

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

  • Esc
  • Ctrl-F4
  • Ctrl-w

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?

  • What's wrong with the little X on the title bar? That should be SIGTERM, meaning it will be no worse than any other external method; applications should catch this and shutdown just as they would via "quit" or whatever. In short: just close the main window and that should close the application.
    – goldilocks
    Feb 11, 2013 at 10:44
  • 2
    @goldilocks That doesn't work in many WMs (like Awesome), and it's less efficient for someone used to keyboard navigation.
    – l0b0
    Feb 11, 2013 at 11:51
  • Doesn't sound very "awesome" to me, lol. I would strongly refute the assertion that "it doesn't work in many WMs" -- it certainly does work in virtually all of them, or they are plain and simple not serving their intended purpose. The most basic and fundamental thing: you provide a window with a titlebar and a close button. I agree point and click is less efficient than the keyboard, but que sera -- you are using a GUI -- and any decent WM will provide you with keybinding options to do stuff like this. Ie, you need to figure out how to create your own shortcuts.
    – goldilocks
    Feb 11, 2013 at 12:09
  • 1
    Stack Exchange doesn't generally allow list questions, they're not a good fit for the way the site works (it's expected that you have a particular problem, somebody posts a solution and you accept it). If you find yourself saying "One ______ per answer", that's usually a bad sign Feb 11, 2013 at 15:16
  • 5
    @goldilocks: I think you misunderstand the purpose of awesome and tilling window managers in general. You should use them without touching the mouse at all. Most of them will not decorate windows at all which is a good thing(TM). Apr 16, 2013 at 13:43

2 Answers 2


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.

  • 2
    Are you sure you don't have it backwards? Mod4-Shift-c should kill the current client. Closing a sub-window is application-dependent, the WM doesn't have anything to do with that Feb 11, 2013 at 17:51
  • Well, it works. For example, if you go into the Firefox preferences window and press it, it closes the preferences and not the application. Same with the search box in jEdit. So I think "Kill focused client" as it says in man awesome is misleading.
    – l0b0
    Feb 12, 2013 at 6:45
  • 2
    Mod4-Shift-c will close the currently focused window. If that is the last window of the application, it will close the application. The man page is correct. Apr 16, 2013 at 13:39
  • @Sardathrion If you equate "client" with "window", yes. I guess that's WM developer parlance.
    – l0b0
    Apr 16, 2013 at 18:17
  • I took the liberty to edit the answer to clarify the concepts.
    – phunehehe
    May 28, 2013 at 15:08

I've added the following to my clientbuttons table:

awful.button({ }, 2, function (c) c:kill() end)

Now my scroll wheel click closes the window.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .