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)
This commit is contained in:
parent
457f474a2c
commit
a43b908350
10 changed files with 549 additions and 633 deletions
89
signals.lua
89
signals.lua
|
@ -1,69 +1,38 @@
|
|||
local awful = awful
|
||||
local awful = require("awful")
|
||||
local beautiful = beautiful
|
||||
|
||||
client.connect_signal("manage", function (c, startup)
|
||||
-- Enable sloppy focus
|
||||
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)
|
||||
|
||||
if not startup then
|
||||
-- Set the windows at the slave,
|
||||
-- i.e. put it at the end of others instead of setting it master.
|
||||
awful.client.setslave(c)
|
||||
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)
|
||||
|
||||
-- Put windows in a smart way, only if they does not set an initial position.
|
||||
if not c.size_hints.user_position and not c.size_hints.program_position then
|
||||
awful.placement.no_overlap(c)
|
||||
awful.placement.no_offscreen(c)
|
||||
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)
|
||||
|
||||
local titlebars_enabled = false
|
||||
if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
|
||||
-- Widgets that are aligned to the left
|
||||
local left_layout = wibox.layout.fixed.horizontal()
|
||||
left_layout:add(awful.titlebar.widget.iconwidget(c))
|
||||
|
||||
-- Widgets that are aligned to the right
|
||||
local right_layout = wibox.layout.fixed.horizontal()
|
||||
right_layout:add(awful.titlebar.widget.floatingbutton(c))
|
||||
right_layout:add(awful.titlebar.widget.maximizedbutton(c))
|
||||
right_layout:add(awful.titlebar.widget.stickybutton(c))
|
||||
right_layout:add(awful.titlebar.widget.ontopbutton(c))
|
||||
right_layout:add(awful.titlebar.widget.closebutton(c))
|
||||
|
||||
-- The title goes in the middle
|
||||
local title = awful.titlebar.widget.titlewidget(c)
|
||||
title:buttons(awful.util.table.join(
|
||||
awful.button({ }, 1, function()
|
||||
client.focus = c
|
||||
c:raise()
|
||||
awful.mouse.client.move(c)
|
||||
end),
|
||||
awful.button({ }, 3, function()
|
||||
client.focus = c
|
||||
c:raise()
|
||||
awful.mouse.client.resize(c)
|
||||
end)
|
||||
))
|
||||
|
||||
-- Now bring it all together
|
||||
local layout = wibox.layout.align.horizontal()
|
||||
layout:set_left(left_layout)
|
||||
layout:set_right(right_layout)
|
||||
layout:set_middle(title)
|
||||
|
||||
awful.titlebar(c):set_widget(layout)
|
||||
-- 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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue