-- Base upon which modules are layered. --libraries local awful = require("awful") local beautiful = require("beautiful") local gears = require("gears") -- Global settings global = {} global.terminal = "xfce4-terminal" --Mod+Enter (spawn terminal) global.browser = "prime-run librewolf" --Mod+Shift+Enter (spawn browser) global.modkey = "Mod4" -- Default modifier key global.theme = "default" global.shell = "zsh" awful.util.shell = global.shell --error handling if awesome.startup_errors then print("Error during startup: "..awesome.startup_errors) end do local in_error = false awesome.connect_signal("debug::error",function(err) if in_error then return end in_error = true print("Error during runtime: "..tostring(err)) in_error = false end) end --screen setup awful.screen.connect_for_each_screen(function(s) gears.wallpaper.maximized(root_path.."/background.jpg") awful.tag({ "1" }, s, awful.layout.suit.floating) end) --theme initialization beautiful.init(root_path.."/themes/"..global.theme.."/theme.lua") --client mouse bindings clientbuttons = gears.table.join( awful.button({}, 1, function(c) c:emit_signal("request::activate", "mouse_click", {raise = true}) end) ) --client rules awful.rules.rules = { { --catch-all rules rule = {}, properties = { focus = awful.client.focus.filter, raise = true, keys = clientkeys, buttons = clientbuttons, screen = awful.screen.preferred, border_width = beautiful.border_width, border_color = beautiful.border_normal, placement = awful.placement.no_overlap+awful.placement.no_offscreen } } } --client signals client.connect_signal("manage", function(c) -- append the window at the end rather than at the top. -- if not awesome.startup then awful.client.setslave(c) end if awesome.startup --place client on available screens when screen count changes and not c.size_hints.user_position and not c.size_hints.program_position then awful.placement.no_offscreen(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) --screen setup awful.screen.connect_for_each_screen(function(s) awful.tag({ "1", "2", "3", "4" }, s, awful.layout.suit.floating) end)