Skip to content

Commit

Permalink
Correct erroneous rubato curves
Browse files Browse the repository at this point in the history
  • Loading branch information
demostanis committed Dec 9, 2024
1 parent 958a8e8 commit 56eaed9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions airootfs/etc/skel/.config/awesome/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,22 @@ local function first_window()
end

local function set_global_x(new)
local ended = false
rubato.timed{
pos = global_x,
duration = 0.3,
subscribed = function(w)
-- rubato sometimes generates weird curves that go
-- past the target value... so correct it...
if new > global_x and w > new then
w = new
elseif new < global_x and w < new then
w = new
end
if ended then return end
if w == new then
ended = true
end
global_x = w
awful.layout.arrange(mouse.screen)
end
Expand Down

0 comments on commit 56eaed9

Please sign in to comment.