aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/ui/statusbar/init.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/awesome/ui/statusbar/init.lua')
-rw-r--r--.config/awesome/ui/statusbar/init.lua31
1 files changed, 21 insertions, 10 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,
}