13
submitted 2 days ago* (last edited 2 days ago) by sinextitan@lemmy.world to c/linux@lemmy.ml

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"

you are viewing a single comment's thread
view the rest of the comments
[-] sinextitan@lemmy.world 2 points 2 days ago

after reading your config I also set up variables for my most used modifier binds. however I omitted window from mine and it seems to work.

thank you

this post was submitted on 29 Jun 2026
13 points (100.0% liked)

Linux

66096 readers
305 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS