Skip to content

Instantly share code, notes, and snippets.

@Dalrik
Last active August 29, 2015 14:06
Show Gist options
  • Save Dalrik/98051268fa72a56ac0c0 to your computer and use it in GitHub Desktop.
Save Dalrik/98051268fa72a56ac0c0 to your computer and use it in GitHub Desktop.
Proper fullscreen flash in awesome
------------PUT THIS SOMEWHERE BEFORE YOUR awful.rules.rules TABLE-------------
-- Callback which restricts window properties to certain values
-- Use with caution, some programs could get stuck in an infinite loop
local function restrict(props)
return function(c)
for property, value in pairs(props) do
c:connect_signal("property::" .. property, function(c, state)
if state ~= value then
c[property] = value
end
end)
end
end
end
------------INSIDE awful.rules.rules----------
{ rule = { class = "Plugin-container" },
callback = restrict({ fullscreen = true })},
{ rule = { class = "hl2_linux" },
callback = restrict({ minimized = false, fullscreen = true })},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment