diff options
| author | delta <darkussdelta@gmail.com> | 2026-04-17 08:10:30 +0200 |
|---|---|---|
| committer | delta <darkussdelta@gmail.com> | 2026-04-17 08:10:30 +0200 |
| commit | a7c79cb5a04562be10347856642a80f0c4be89fc (patch) | |
| tree | 98fac95855d84f5037a1c6f44061cbe94b550600 /.config/awesome/ui/statusbar | |
| parent | 225eeafcea67d63a608f9c666faf2a2ef014be4a (diff) | |
Diffstat (limited to '.config/awesome/ui/statusbar')
| -rw-r--r-- | .config/awesome/ui/statusbar/init.lua | 31 | ||||
| -rw-r--r-- | .config/awesome/ui/statusbar/panel/widgets/mpris.lua | 158 |
2 files changed, 96 insertions, 93 deletions
diff --git a/.config/awesome/ui/statusbar/init.lua b/.config/awesome/ui/statusbar/init.lua index 0a1198a..baaf2fa 100644 --- a/.config/awesome/ui/statusbar/init.lua +++ b/.config/awesome/ui/statusbar/init.lua @@ -15,7 +15,7 @@ local keyboardlayout = require "ui.statusbar.widgets.keyboardlayout" local taglist = require "ui.statusbar.widgets.taglist_new" screen.connect_signal("request::desktop_decoration", function(s) - local bar = qui.popup { + local bar = qui.animateable_shape(qui.popup { placement = function(d) return awful.placement.left(d, { margins = beautiful.useless_gap * 2, @@ -59,13 +59,14 @@ screen.connect_signal("request::desktop_decoration", function(s) }, toggled = false, - } + }) - local bar_width = bar.width + qui.BORDER_WIDTH * 2 + local bar_width = bar.width - bar.shape = function(cr, _, h) - qui.shape(cr, bar_width, h) - end + bar.shape_width = bar_width + -- bar.shape = function(cr, _, h) + -- qui.shape(cr, bar_width, h) + -- end bar:struts { left = bar_width + beautiful.useless_gap * 4, @@ -73,20 +74,30 @@ screen.connect_signal("request::desktop_decoration", function(s) bar.widget.widget.third = panel + local idle = true + local timed = qanim:new { duration = qvars.anim_duration, pos = bar_width, easing = qvars.easing, subscribed = function(pos) - if pos ~= bar_width and bar.toggled then + if idle and pos ~= bar_width and bar.toggled then bar.ontop = true + -- panel.visible = true + idle = false elseif pos == bar_width and not bar.toggled then bar.ontop = false + -- panel.visible = false + idle = true + elseif pos == bar_width + M.EXPANDED_BAR_SIZE then + idle = true end - bar.shape = function(cr, _, h) - qui.shape(cr, pos, h) - end + bar.shape_width = pos + + -- bar.shape = function(cr, _, h) + -- + -- end end, } diff --git a/.config/awesome/ui/statusbar/panel/widgets/mpris.lua b/.config/awesome/ui/statusbar/panel/widgets/mpris.lua index 687bbb1..f462ea3 100644 --- a/.config/awesome/ui/statusbar/panel/widgets/mpris.lua +++ b/.config/awesome/ui/statusbar/panel/widgets/mpris.lua @@ -99,106 +99,98 @@ M.widget = wibox.widget(qui.styled { { widget = client_background, { - nil, - qui.padded_big { + nil, + qui.padded_big { + { + { + widget = wibox.widget.textbox, + text = DEFAULTS.progresstext.position .. " / " .. DEFAULTS.progresstext.length, -- position / length + id = "progresstext", + }, { + widget = wibox.container.place, { - widget = wibox.container.background, - bg = qcolor.palette.bg(), + widget = wibox.widget.progressbar, + value = DEFAULTS.position, + max_value = DEFAULTS.length, + background_color = qcolor.palette.bg.lowest, + color = qcolor.palette.yellow(), + forced_height = qui.BORDER_RADIUS, + border_width = 0, shape = qui.shape, - { - widget = wibox.widget.imagebox, - image = DEFAULTS.art, - forced_height = qui.CHAR_HEIGHT * 5, - forced_width = qui.CHAR_HEIGHT * 5, - valign = "center", - halign = "center", - stylesheet = qui.recolor(qcolor.palette.bg.highest), - id = "cover", - }, + -- - forced_width = qui.CHAR_HEIGHT, + id = "progressbar", }, + }, + layout = wibox.layout.fixed.horizontal, + spacing = qui.BIG_PADDING, + }, + -- { + -- widget = wibox.container.background, + -- bg = qcolor.palette.bg(), + -- shape = qui.shape, + { + widget = wibox.widget.imagebox, + image = DEFAULTS.art, + forced_height = qui.CHAR_HEIGHT * 8, + forced_width = qui.CHAR_HEIGHT * 8, + valign = "center", + halign = "center", + stylesheet = qui.recolor(qcolor.palette.bg.highest), + clip_shape = qui.shape, + id = "cover", + }, + -- }, + { + { + widget = wibox.container.constraint, + height = qui.CHAR_HEIGHT * 2.5, + strategy = "max", { - widget = wibox.container.margin, - left = qui.BIG_PADDING, - { - { - widget = wibox.container.constraint, - height = qui.CHAR_HEIGHT * 2.5, - strategy = "max", - { - widget = wibox.widget.textbox, - text = DEFAULTS.title, -- Song - id = "song", - valign = "top", - }, - }, - { - widget = wibox.container.constraint, - height = qui.CHAR_HEIGHT * 2.5, - strategy = "max", - { - widget = wibox.container.background, - fg = qcolor.palette.fg.low, - { - widget = wibox.widget.textbox, - text = DEFAULTS.artist_album, -- Artist - Album Name - id = "artist_album", - valign = "top", - }, - }, - }, - layout = wibox.layout.fixed.vertical, - }, + widget = wibox.widget.textbox, + text = DEFAULTS.title, -- Song + id = "song", + valign = "top", }, - layout = wibox.layout.fixed.horizontal, }, - nil, { - widget = wibox.container.margin, - top = qui.BIG_PADDING, + widget = wibox.container.constraint, + height = qui.CHAR_HEIGHT * 2.5, + strategy = "max", { + widget = wibox.container.background, + fg = qcolor.palette.fg.low, { widget = wibox.widget.textbox, - text = DEFAULTS.progresstext.position .. " / " .. DEFAULTS.progresstext.length, -- position / length - id = "progresstext", - }, - { - widget = wibox.container.place, - { - widget = wibox.widget.progressbar, - forced_height = qui.PADDING, - color = qcolor.palette.yellow(), - value = DEFAULTS.position, - max_value = DEFAULTS.length, - background_color = qcolor.palette.bg.lowest, - bar_shape = qui.shape, - shape = qui.shape, - id = "progressbar", - }, + text = DEFAULTS.artist_album, -- Artist - Album Name + id = "artist_album", + valign = "top", }, - layout = wibox.layout.fixed.horizontal, - spacing = qui.BIG_PADDING, }, }, - layout = wibox.layout.align.vertical, + layout = wibox.layout.fixed.vertical, + spacing = qui.PADDING + }, + layout = wibox.layout.fixed.vertical, + spacing = qui.BIG_PADDING, + }, + { + qui.separator { + size = qui.BORDER_WIDTH, + vertical = true }, { - qui.separator { - size = qui.BORDER_WIDTH, - vertical = true - }, - { - widget = wibox.container.background, - bg = qcolor.palette.bg.high, - qui.padded_big { - layout = wibox.layout.flex.vertical, - spacing = qui.BIG_PADDING, - id = "client_list", - } - }, - layout = wibox.layout.fixed.horizontal, + widget = wibox.container.background, + bg = qcolor.palette.bg.high, + qui.padded_big { + layout = wibox.layout.flex.vertical, + spacing = qui.BIG_PADDING, + id = "client_list", + } }, - layout = wibox.layout.align.horizontal, + layout = wibox.layout.fixed.horizontal, + }, + layout = wibox.layout.align.horizontal, }, }, }) |
