Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bdc58986d |
@@ -13,8 +13,8 @@ M.curves = {
|
|||||||
curve = {
|
curve = {
|
||||||
type = "spring",
|
type = "spring",
|
||||||
mass = 1,
|
mass = 1,
|
||||||
stiffness = 500,
|
stiffness = 50,
|
||||||
dampening = 20,
|
dampening = 8,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ local pieces = {
|
|||||||
"window",
|
"window",
|
||||||
"workspace",
|
"workspace",
|
||||||
"passthrough",
|
"passthrough",
|
||||||
|
"screenshot",
|
||||||
}
|
}
|
||||||
|
|
||||||
M.binds = {}
|
M.binds = {}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function screenshot_fullscreen()
|
||||||
|
local home = os.getenv("HOME")
|
||||||
|
local dir = home .. "/Pictures/screenshots/"
|
||||||
|
local name = "screenshot_" .. os.date("%Y%d%m_%H%M%S") .. ".png"
|
||||||
|
local file = dir .. name
|
||||||
|
|
||||||
|
local monitor = hl.get_active_monitor()
|
||||||
|
if monitor == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
hl.exec_cmd(
|
||||||
|
string.format(
|
||||||
|
"grim -o %q %q && " .. "wl-copy --type image/png < %q && " .. "notify-send %q %q && " .. "swappy -f %q",
|
||||||
|
monitor.name,
|
||||||
|
file,
|
||||||
|
file,
|
||||||
|
"Screenshot created and copied to clipboard",
|
||||||
|
"Mode: Fullscreen",
|
||||||
|
file
|
||||||
|
)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
M.binds = {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("SHIFT + Print"),
|
||||||
|
dispatcher = screenshot_fullscreen,
|
||||||
|
desc = "Make fullscreen screenshot",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
Reference in New Issue
Block a user