No border when single window

This commit is contained in:
Thomas Forgione 2024-06-22 10:01:20 +02:00
parent 9addb10e26
commit 3a1e45da46
1 changed files with 15 additions and 2 deletions

17
rc.lua
View File

@ -10,6 +10,7 @@ require("awful.autofocus")
local wibox = require("wibox") local wibox = require("wibox")
-- Theme handling library -- Theme handling library
local beautiful = require("beautiful") local beautiful = require("beautiful")
beautiful.gap_single_client = false
-- Notification library -- Notification library
local naughty = require("naughty") local naughty = require("naughty")
local menubar = require("menubar") local menubar = require("menubar")
@ -259,7 +260,7 @@ awful.screen.connect_for_each_screen(function(s)
-- Create the wibox -- Create the wibox
local wibar_width = s.geometry.width / 4 local wibar_width = s.geometry.width / 4
local wibar_height = 20 local wibar_height = 15
s.mywibox = wibox({ s.mywibox = wibox({
x = s.geometry.width - wibar_width, x = s.geometry.width - wibar_width,
y = s.geometry.height - wibar_height, y = s.geometry.height - wibar_height,
@ -791,7 +792,19 @@ end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus 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) client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
awful.screen.set_auto_dpi_enabled(true) -- No borders when rearranging only 1 non-floating or maximized client
screen.connect_signal("arrange", function (s)
local only_one = #s.tiled_clients == 1
for _, c in pairs(s.clients) do
if only_one and not c.floating or c.maximized then
c.border_width = 0
else
c.border_width = beautiful.border_width -- your border width
end
end
end)
-- awful.screen.set_auto_dpi_enabled(true)
-- load the widget code -- load the widget code