Fix tag preview closing + Update autorun, default layouts, tag-preview theme

This commit is contained in:
Hydroxycarbamide 2023-03-20 13:43:31 +01:00
parent 2401cfcee2
commit 8d0abe603d
6 changed files with 55 additions and 47 deletions

View file

@ -53,17 +53,17 @@ return function(s)
if client.focus then
client.focus:toggle_tag(t)
end
end)
end),
--awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
--awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end)
)
-- Create a taglist widget
local taglist = awful.widget.taglist {
screen = s,
--filter = awful.widget.taglist.filter.all,
filter = function(t) return t.selected or #t:clients() > 0 end, -- Show only used Tags
filter = awful.widget.taglist.filter.all,
--filter = function(t) return t.selected or #t:clients() > 0 end, -- Show only used Tags
buttons = taglist_buttons,
layout = {
spacing = dpi(8),
@ -80,13 +80,10 @@ return function(s)
update_tag(self, c3, index)
self:connect_signal('mouse::enter', function()
-- BLING: Only show widget when there are clients in the tag
if #c3:clients() > 0 then
-- BLING: Update the widget with the new tag
awesome.emit_signal("bling::tag_preview::update", c3)
-- BLING: Show the widget
awesome.emit_signal("bling::tag_preview::visibility", s, true)
end
-- BLING: Update the widget with the new tag
awesome.emit_signal("bling::tag_preview::update", c3)
-- BLING: Show the widget
awesome.emit_signal("bling::tag_preview::visibility", s, true)
if self.bg ~= '#ff0000' then
self.backup = self.bg
@ -96,7 +93,7 @@ return function(s)
end)
self:connect_signal('mouse::leave', function()
-- BLING: Turn the widget off
awesome.emit_signal("bling::tag_preview::visibility", s, false)
--awesome.emit_signal("bling::tag_preview::visibility", s, false)
if self.has_backup then self.bg = self.backup end
end)
@ -128,6 +125,11 @@ return function(s)
widget = wibox.container.margin
}
tags:connect_signal('mouse::leave', function()
-- BLING: Turn the widget off
awesome.emit_signal("bling::tag_preview::visibility", s, false)
end)
--return taglist
return tags
end