Awesome Window Manager

XFCE Tools from AwesomeWM

Many XFCE tools work well even if XFCE DE is not running.

Screenshots with XFCE

Create screenshot.lua file in your .config/awesome configuration directory:

local awful = require("awful")
local naughty = require("naughty")

function scrot_full()
    scrot("xfce4-screenshooter --fullscreen", scrot_callback, "Took screen screenshot")
end

function scrot_selection()
    scrot("xfce4-screenshooter --region", "Took selection screenshot")
end

function scrot_window()
    scrot("xfce4-screenshooter --window", scrot_callback, "Took window screenshot")    
end

function scrot(cmd, msg)
    awful.spawn.easy_async_with_shell(cmd, function(cmdout, cmderr)
        -- uncomment to debug
        --     naughty.notify({
        --         text = msg .. cmdout .. cmderr,
        --         timeout = 0,
        --     })
    end)
end

Then add the following lines to main rc.lua file.

At the begining of the file:

-- load local screenshot support
local screenshot = require("screenshot")

Inside globalkeys = gears.table.join( section of rc.lua file:

  -- configure screenshots
  awful.key({ }, "Print", scrot_full,
  {description = "Take a screenshot of entire screen", group = "screenshot"}),
awful.key({ "Shift" }, "Print", scrot_selection,
  {description = "Take a screenshot of selection", group = "screenshot"}),
awful.key({ modkey, }, "Print", scrot_window,
  {description = "Take a screenshot of focused window", group = "screenshot"}),
awful.key({ "Ctrl" }, "Print", scrot_delay,
  {description = "Take a screenshot of delay", group = "screenshot"})