aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/ui/statusbar/init.lua
diff options
context:
space:
mode:
authordelta <darkussdelta@gmail.com>2023-04-12 00:21:03 +0200
committerdelta <darkussdelta@gmail.com>2023-04-12 00:21:03 +0200
commit98676ca1d7ab9a9abb4c01d0cdf67b83f7cdce49 (patch)
tree2c8499e59cd346c8f59688d8c5dda231c178941a /.config/awesome/ui/statusbar/init.lua
parentf7116d268aff3fae88d8de408e8c807295618a5c (diff)
idk what i'm doing
Diffstat (limited to '.config/awesome/ui/statusbar/init.lua')
-rw-r--r--.config/awesome/ui/statusbar/init.lua100
1 files changed, 25 insertions, 75 deletions
diff --git a/.config/awesome/ui/statusbar/init.lua b/.config/awesome/ui/statusbar/init.lua
index 01d6498..2851b73 100644
--- a/.config/awesome/ui/statusbar/init.lua
+++ b/.config/awesome/ui/statusbar/init.lua
@@ -4,11 +4,10 @@ local qvars = require "quarrel.vars"
local wibox = require "wibox"
local qui = require "quarrel.ui"
local gcolor = require "gears.color"
-local gdebug = require "gears.debug"
local phosphor = require "assets.phosphor"
local qbind = require "quarrel.bind"
-local q = require "quarrel"
local rubato = require "lib.rubato"
+local panel = require "ui.statusbar.panel"
local taglist = require "ui.statusbar.widgets.taglist"
local clock = require "ui.statusbar.widgets.clock"
@@ -41,36 +40,31 @@ screen.connect_signal("request::desktop_decoration", function(s)
minimum_height = s.geometry.height - (beautiful.useless_gap * 4 + qvars.border_width * 2),
widget = {
{
+ {
+ expand_button,
+ taglist,
+ layout = wibox.layout.fixed.vertical,
+ spacing = qvars.padding * 2,
+ },
nil,
{
+ widget = wibox.container.place,
+ valign = "bottom",
{
- expand_button,
- taglist,
- layout = wibox.layout.fixed.vertical,
- spacing = qvars.padding * 2,
- },
- nil,
- {
- widget = wibox.container.place,
- valign = "bottom",
{
- brightness,
- battery,
- wifi,
- {
- widget = wibox.container.place,
- keyboardlayout
- },
- clock,
- layout = wibox.layout.fixed.vertical,
- spacing = qvars.padding * 2
+ widget = wibox.container.place,
+ keyboardlayout
},
+ clock,
+ wifi,
+ brightness,
+ battery,
+ layout = wibox.layout.fixed.vertical,
+ spacing = qvars.padding * 2
},
- layout = wibox.layout.align.vertical,
- expand = "outside",
},
- nil,
- layout = wibox.layout.align.horizontal
+ layout = wibox.layout.align.vertical,
+ expand = "outside",
},
nil,
nil,
@@ -78,12 +72,10 @@ screen.connect_signal("request::desktop_decoration", function(s)
}
}
- local bar_width = bar.width
+ local bar_width = bar.width + qvars.border_width * 2
bar:struts {
- -- left = qvars.bar_size + qvars.big_padding * 2 + beautiful.useless_gap * 4
- -- left = qvars.bar_size + qvars.border_width * 2 + beautiful.useless_gap * 4
- left = bar_width + qvars.border_width * 2 + beautiful.useless_gap * 4
+ left = bar_width + beautiful.useless_gap * 4
}
local timed = rubato.timed {
@@ -92,58 +84,16 @@ screen.connect_signal("request::desktop_decoration", function(s)
pos = bar_width,
subscribed = function(pos)
if pos ~= bar_width and expand_button._expanded then
- bar.widget.widget.third = wibox.widget {
- {
- widget = wibox.container.margin,
- margins = {
- left = qvars.big_padding
- }
- },
- {
- widget = wibox.container.constraint,
- width = qvars.bar_size * 6,
- strategy = "min",
- {
- {
- {
- widget = wibox.container.background,
- bg = qvars.colors.black,
- {
- widget = wibox.widget.textbox,
- text = "1"
- }
- },
- {
- widget = wibox.container.background,
- bg = qvars.colors.black,
- {
- widget = wibox.widget.textbox,
- text = "2"
- }
- },
- {
- widget = wibox.container.background,
- bg = qvars.colors.black,
- {
- widget = wibox.widget.textbox,
- text = "3"
- }
- },
- spacing = qvars.padding,
- layout = wibox.layout.flex.horizontal
- },
- layout = wibox.layout.fixed.vertical
- }
- },
- layout = wibox.layout.fixed.horizontal
- }
+ bar.widget.widget.third = panel
bar.ontop = true
elseif pos == bar_width and not expand_button._expanded then
bar.widget.widget.third = nil
bar.ontop = false
end
- bar.maximum_width = pos
+ bar.shape = function(cr, _, h)
+ qvars.shape(cr, pos, h)
+ end
end
}