Big changes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
local beautiful = require("beautiful")
|
||||
local awful = require("awful")
|
||||
local shapes = require("extras.nice.shapes")
|
||||
|
||||
@@ -8,12 +9,77 @@ function update_titlebars(c, init)
|
||||
-- Rounded Corners
|
||||
if not c.fullscreen and not c.maximized then
|
||||
c.shape = shapes.rounded_rect {
|
||||
tl = 9,
|
||||
tr = 9,
|
||||
bl = 9,
|
||||
br = 9
|
||||
tl = beautiful.corner_radius,
|
||||
tr = beautiful.corner_radius,
|
||||
bl = beautiful.corner_radius,
|
||||
br = beautiful.corner_radius
|
||||
}
|
||||
else
|
||||
c.shape = nil
|
||||
end
|
||||
end
|
||||
|
||||
function toggle_window_buffers(s)
|
||||
if not s.top then
|
||||
s.left = awful.wibar({
|
||||
screen = s,
|
||||
position = "left",
|
||||
opacity = 0.0,
|
||||
input_passthrough = true,
|
||||
})
|
||||
|
||||
s.right = awful.wibar({
|
||||
screen = s,
|
||||
position = "right",
|
||||
opacity = 0.0,
|
||||
input_passthrough = true,
|
||||
})
|
||||
|
||||
s.top = awful.wibar({
|
||||
screen = s,
|
||||
position = "top",
|
||||
opacity = 0.0,
|
||||
input_passthrough = true,
|
||||
})
|
||||
|
||||
s.bottom = awful.wibar({
|
||||
screen = s,
|
||||
position = "bottom",
|
||||
opacity = 0.0,
|
||||
input_passthrough = true,
|
||||
})
|
||||
end
|
||||
|
||||
-- Three states: off, small borders, large borders
|
||||
s.buffer_state = s.buffer_state or "off"
|
||||
|
||||
if s.buffer_state == "off" then
|
||||
s.buffer_state = "small"
|
||||
s.left.visible = true
|
||||
s.right.visible = true
|
||||
s.top.visible = true
|
||||
s.bottom.visible = true
|
||||
s.left.width = 50
|
||||
s.right.width = 50
|
||||
s.top.height = 50
|
||||
s.bottom.height = 50
|
||||
elseif s.buffer_state == "small" then
|
||||
s.buffer_state = "large"
|
||||
s.left.visible = true
|
||||
s.right.visible = true
|
||||
s.top.visible = true
|
||||
s.bottom.visible = true
|
||||
s.left.width = 200
|
||||
s.right.width = 200
|
||||
s.top.height = 50
|
||||
s.bottom.height = 350
|
||||
elseif s.buffer_state == "large" then
|
||||
s.buffer_state = "off"
|
||||
s.left.visible = false
|
||||
s.right.visible = false
|
||||
s.top.visible = false
|
||||
s.bottom.visible = false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user