Created
May 29, 2019 09:47
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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