initial commit
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
local hyper = "MOD3 + "
|
||||
|
||||
hl.bind("SUPER + SPACE", function()
|
||||
hl.dispatch(
|
||||
hl.dsp.exec_cmd("noctalia msg panel-toggle launcher")
|
||||
)
|
||||
end, {
|
||||
description = "Toggle Noctalia launcher",
|
||||
})
|
||||
|
||||
|
||||
hl.bind("SUPER + W", hl.dsp.window.close())
|
||||
|
||||
for i = 1, 9 do
|
||||
hl.bind(
|
||||
"MOD3 + " .. i,
|
||||
hl.dsp.focus({ workspace = i }),
|
||||
{ description = "Switch to workspace " .. i }
|
||||
)
|
||||
|
||||
hl.bind(
|
||||
"MOD3 + CTRL + " .. i,
|
||||
hl.dsp.window.move({ workspace = i }),
|
||||
{ description = "Send focused window to " .. i }
|
||||
)
|
||||
end
|
||||
|
||||
local monitor_dirs = {
|
||||
W = "u",
|
||||
A = "l",
|
||||
S = "d",
|
||||
D = "r",
|
||||
}
|
||||
|
||||
for key, dir in pairs(monitor_dirs) do
|
||||
hl.bind(
|
||||
hyper .. " + SUPER + " .. key,
|
||||
hl.dsp.workspace.move({ monitor = dir }),
|
||||
{ description = "Move workspace " .. dir }
|
||||
)
|
||||
end
|
||||
|
||||
--- Hyprspace
|
||||
|
||||
hl.bind(hyper .. "SPACE", function() hl.plugin.hyprtasking.toggle("all") end)
|
||||
|
||||
--- floating focus
|
||||
hl.bind(hyper .. " F", function()
|
||||
local win = hl.get_active_window()
|
||||
local mon = hl.get_active_monitor()
|
||||
|
||||
if not win or not mon then
|
||||
return
|
||||
end
|
||||
|
||||
local was_tiled = not win.floating
|
||||
|
||||
hl.dispatch(hl.dsp.window.float({
|
||||
action = "toggle",
|
||||
}))
|
||||
|
||||
-- Only resize when entering floating focus mode.
|
||||
-- When leaving it, let the tiling layout restore the window.
|
||||
if was_tiled then
|
||||
hl.dispatch(hl.dsp.window.resize({
|
||||
x = math.floor(mon.width * 0.80),
|
||||
y = math.floor(mon.height * 0.80),
|
||||
relative = false,
|
||||
}))
|
||||
|
||||
hl.dispatch(hl.dsp.window.center())
|
||||
|
||||
hl.dispatch(hl.dsp.window.alter_zorder({
|
||||
mode = "top",
|
||||
}))
|
||||
end
|
||||
end, {
|
||||
description = "Toggle focused floating window", })
|
||||
|
||||
hl.bind("SUPER + SHIFT + S", hl.plugin.hyprcapture.open, { description = "HyprCapture window capture" })
|
||||
Reference in New Issue
Block a user