mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-25 03:08:34 +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 brightness = loadrc("brightness", "vbe/brightness")
|
||||||
local keydoc = loadrc("keydoc", "vbe/keydoc")
|
local keydoc = loadrc("keydoc", "vbe/keydoc")
|
||||||
|
|
||||||
-- Alternative: flameshot
|
local function screenshot()
|
||||||
local function screenshot(client)
|
awful.util.spawn_with_shell("flameshot gui -r | xclip -selection clipboard -t image/png",
|
||||||
if client == "root" then
|
false)
|
||||||
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)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -241,9 +232,7 @@ config.keys.global = awful.util.table.join(
|
||||||
"Spawn a terminal"),
|
"Spawn a terminal"),
|
||||||
|
|
||||||
-- Screenshot
|
-- Screenshot
|
||||||
awful.key({}, "Print", function() screenshot("root") end),
|
awful.key({}, "Print", screenshot),
|
||||||
awful.key({ modkey, "Shift" }, "Print", screenshot),
|
|
||||||
|
|
||||||
-- Restart awesome
|
-- Restart awesome
|
||||||
awful.key({ modkey, "Control" }, "r", awesome.restart),
|
awful.key({ modkey, "Control" }, "r", awesome.restart),
|
||||||
|
|
||||||
|
|
|
@ -19,3 +19,4 @@ alsa-utils
|
||||||
pavucontrol
|
pavucontrol
|
||||||
pulseaudio
|
pulseaudio
|
||||||
playerctl
|
playerctl
|
||||||
|
flameshot
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue