screenshots in Awesome WM

- awesome

Latest thing added to my Awesome: screenshot functionality.

Vanilla Awesome doesn't do anything when you press the print screen key. It's been one of those things that's been a minor annoyance, but fixing it got left by the wayside because obviously if I was taking a screenshot I was doing something much more interesting...

Once again Lua and Awesome make this fun to fix.

In rc.lua, I went to the section with my keys (searching for awful.key), and added the following line:

awful.key({ }, "Print", function () awful.util.spawn("gnome-screenshot") end),

I like gnome-screenshot but that can be replaced with your screenshotter of choice.

Note that the label for your Print Screen key - "Print" here - may be different. You can find out by running xev and pressing your Print Screen key and checking the output.