2

There is the function awful.client.moveresize but this simply increments or decrement current values. How to move and resize a window to absolute values ?

ChiseledAbs
  • 2,243
  • You should expand your question with a description of your window manager, etc etc, to make it easier for searches to find the question. Assume each question you write is "standalone" and no one remembers your previous question and setup :-) – Stephen Harris Aug 03 '16 at 00:59
  • @StephenHarris awesomeWM, everytime I put that in the title they want to edit it out so I keep it in the tag – ChiseledAbs Aug 03 '16 at 01:06
  • Tags are for searching across topics, titles are for finding questions. From your title I'll argue that you're looking for networking help. You're not following rule 2 of being precise about a problem. I can guess that it is about awesomeWM because I use it and know awful.client but that is not the case for most people. – grochmal Aug 03 '16 at 02:27

1 Answers1

0

To position a window with absolute coordinates you can use awful.placement.top_left, which places the window in the top left corner ((0,0)), passing the extra argument "offset" that specifies how to move and resize the client with respect to the placement function.

Basically move it to zero and then relative shift.

local c = client.focus --grab focused window
local t = {
    ["x"]  = x, --absolute x coordinate
    ["y"]  = y, --absolute y coordinate
    ["width"]  = 0, -- maintain size
    ["height"]  = 0, -- maintain size
}
awful.placement.top_left(c, {offset=t})
Maldus
  • 199
  • 1
  • 2
  • 12