From 06e87cca1f908efa330d2f6f6b52fdeac3e28d12 Mon Sep 17 00:00:00 2001 From: Yessiest Date: Mon, 4 Jul 2022 18:00:56 +0400 Subject: [PATCH] null config --- rc.lua | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 rc.lua diff --git a/rc.lua b/rc.lua new file mode 100644 index 0000000..e02f13b --- /dev/null +++ b/rc.lua @@ -0,0 +1,61 @@ +--libraries +local awful = require("awful") +local beautiful = require("beautiful") +local gears = require("gears") + +--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 + +--theme +beautiful.init(gears.filesystem.get_themes_dir().."default/theme.lua") + +--screen setup +awful.screen.connect_for_each_screen(function(s) + awful.tag({ "1" }, s, awful.layout.suit.floating) +end) + + +--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, + 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)