so I’m trying to setup binds for Hyprland so that I can resize windows w/o having to use my mouse. the default config comes with mouse resizing (which works). and as my config is based off the default, I copied it and adjusted accordingly to my binds and the wiki.
hl.bind(mainMod .. " + ALT + left",
hl.dsp.window.resize({20,0}))
but it does not work and instead gives me 2 error msgs.
Your config has errors:
=[C]:-1: hl.window.resize: 'x' and 'y' are required
hyprland.lua:327: hl.bind: dispatcher must be a dispatcher (e.g. hl.dsp.window.close()) or a lua function
under hl.dsp.window the wiki contains the resize({ x, y, relative?, window? }) “method”. I can’t figure out if I’m doing smth wrong or just this specific thing is broken.
I asked our benevolent AI mistress but it was too busy bickering and giving me pre 0.55 Hyprlang configs. after I informed the clanker that Hyprland stopped using Hyprlang, it confidentally gave me the wrong Lua config and again w confidence told me to use it. it did not work.
Runtime error in lua:
=[C]:-1: hl.window.resize: 'x' and 'y' are required
EDIT: thanks to @sparkle_matrix_x0x@lemmy.ml and @Maiq@piefed.social, finally figured it out because of them.
here’s my updated config
--Resize windows
hl.bind(altMod .. " + left", hl.dsp.window.resize({x = -20,y = 0, relative = 1}))
hl.bind(altMod .. "+ right", hl.dsp.window.resize({x = 20,y = 0, relative = 1}))
hl.bind(altMod .. "+ up", hl.dsp.window.resize({x = 0,y = -20, relative = 1}))
hl.bind(altMod .. "+ down", hl.dsp.window.resize({x = 0,y = 20, relative = 1}))
btw altMod is a variable I set up which’s basically SUPER+ALT
local altMod = mainMod .. " + ALT"
Does anyone know what was up with the removal of Super+J and Super+P to resize the windows? I guess I should have read the notes but every time updates break shit I never seem to have the patience to stop what I’m doing that day and check.
Try to use
hl.bind(mainMod .. " + ALT + left", hl.dsp.window.resize({x = 20, y = 0}))IIRC that is the correct syntax, but I haven’t checked.
Yeah, he needs to use named keys to make that work.
yep it is but I had to add
relative = 1for it to work. otherwise was getting a?:?: Invalid sizeerror.thanks
Here is what I use. shiftMod is a variable I set up which is just
mainMod + Shift-- Resize Window Horizontal hl.bind(shiftMod .. " + left", hl.dsp.window.resize({ x = -40, y = 0, relative = -1, window = activewindow })) hl.bind(shiftMod .. " + right", hl.dsp.window.resize({ x = 40, y = 0, relative = 1, window = activewindow })) -- Resize Window Vertaclly hl.bind(shiftMod .. " + up", hl.dsp.window.resize({ x = 0, y = -40, relative = -1, window = activewindow })) hl.bind(shiftMod .. " + down", hl.dsp.window.resize({ x = 0, y = 40, relative = 1, window = activewindow }))after reading your config I also set up variables for my most used modifier binds. however I omitted
windowfrom mine and it seems to work.thank you



