awesomewm/signals.lua
crater2150 a43b908350 Update to Awesome 4.0
Configuration works mostly identical to previous state. Some exceptions:
- Minor changes in tag names (removed unicode symbols), as they are now
  referenced by name in the rules.
- Calendar module is not yet ported and not loaded.
- Scratch terminal on F12 key currently moves to bottom of the screen after
  first opening. Probably will be reimplemented using the new extended
  awful.spawn API.
- awsetbg util writes different wallpaperrc (preexisting wallpaperrc is ignored,
  as the filename now includes .lua)
2017-01-10 17:45:32 +01:00

41 lines
1.4 KiB
Lua

local awful = require("awful")
local beautiful = beautiful
client.connect_signal("manage", function (c)
--c:connect_signal("mouse::enter", function(c)
-- if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
-- and awful.client.focus.filter(c)
-- and not(
-- client.focus ~= nil
-- and client.focus.class == "jetbrains-idea"
-- and c.class == "jetbrains-idea"
-- and client.focus.type == "dialog"
-- ) then
-- client.focus = c
-- end
--end)
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- if not awesome.startup then awful.client.setslave(c) end
if awesome.startup and
not c.size_hints.user_position
and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
end)
-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c)
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
and awful.client.focus.filter(c) then
client.focus = c
end
end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)