mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-24 18:58:33 +02:00
bindings: use flameshot for screenshots
This commit is contained in:
parent
33927c6a7d
commit
554b34c019
2 changed files with 5 additions and 15 deletions
|
@ -4,18 +4,9 @@ local volume = loadrc("volume", "vbe/volume")
|
|||
local brightness = loadrc("brightness", "vbe/brightness")
|
||||
local keydoc = loadrc("keydoc", "vbe/keydoc")
|
||||
|
||||
-- Alternative: flameshot
|
||||
local function screenshot(client)
|
||||
if client == "root" then
|
||||
client = "-window root"
|
||||
elseif client then
|
||||
client = "-window " .. client.window
|
||||
else
|
||||
client = ""
|
||||
end
|
||||
local path = awful.util.getdir("config") .. "/screenshots/" ..
|
||||
"screenshot-" .. os.date("%Y-%m-%d--%H:%M:%S") .. ".jpg"
|
||||
awful.util.spawn("import -quality 95 " .. client .. " " .. path, false)
|
||||
local function screenshot()
|
||||
awful.util.spawn_with_shell("flameshot gui -r | xclip -selection clipboard -t image/png",
|
||||
false)
|
||||
end
|
||||
|
||||
|
||||
|
@ -241,9 +232,7 @@ config.keys.global = awful.util.table.join(
|
|||
"Spawn a terminal"),
|
||||
|
||||
-- Screenshot
|
||||
awful.key({}, "Print", function() screenshot("root") end),
|
||||
awful.key({ modkey, "Shift" }, "Print", screenshot),
|
||||
|
||||
awful.key({}, "Print", screenshot),
|
||||
-- Restart awesome
|
||||
awful.key({ modkey, "Control" }, "r", awesome.restart),
|
||||
|
||||
|
|
|
@ -19,3 +19,4 @@ alsa-utils
|
|||
pavucontrol
|
||||
pulseaudio
|
||||
playerctl
|
||||
flameshot
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue