Skip to content

Instantly share code, notes, and snippets.

@Elv13
Created May 29, 2019 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elv13/b958cec48df200a2e2daaf484e72dd70 to your computer and use it in GitHub Desktop.
Save Elv13/b958cec48df200a2e2daaf484e72dd70 to your computer and use it in GitHub Desktop.
Crude and untested (written directly in GitHub editor) attempt to fix the mouse property::screen
-- Instructions:
-- 1) Put this into a file called fix_mouse_screen.lua in ~/.config/awesome
-- 2) add require("fix_mouse_screen") to rc.lua
local placement = require("awful.placement")
local wibox = require("wibox")
local cur = mouse.screen
client.connect_signal("focus", function(c)
if cur ~= c.screen then
cur = c.screen
mouse.emit_signal("property::screen", cur)
end
end)
awful.screen.connect_for_each_screen(function(s)
local w = wibox {
visible = true,
below = true,
type = "desktop"
x = s.geometry.x,
y = s.geometry.y,
--TODO set the shape to `function() end`
--TODO set the input shape to `gears.shape.rectangle`
}
placement.maximize(w)
w:connect_signal("mouse::enter", function()
if w.screen ~= cur then
cur = w.screen
mouse.emit_signal("property::screen", cur)
end
end)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment