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

View file

@ -4,13 +4,13 @@ local beautiful = require "beautiful"
local bling = require "libs.bling"
bling.widget.tag_preview.enable {
show_client_content = true, -- Whether or not to show the client content
x = 10, -- The x-coord of the popup
y = 10, -- The y-coord of the popup
scale = 0.25, -- The scale of the previews compared to the screen
honor_padding = true, -- Honor padding when creating widget size
honor_workarea = true, -- Honor work area when creating widget size
placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y)
show_client_content = true, -- Whether or not to show the client content
x = 10, -- The x-coord of the popup
y = 10, -- The y-coord of the popup
scale = 0.25, -- The scale of the previews compared to the screen
honor_padding = true, -- Honor padding when creating widget size
honor_workarea = true, -- Honor work area when creating widget size
placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y)
awful.placement.bottom_left(c, {
margins = {
bottom = 45,
@ -19,10 +19,11 @@ bling.widget.tag_preview.enable {
parent = awful.screen.focused()
})
end,
background_widget = wibox.widget { -- Set a background image (like a wallpaper) for the widget
image = beautiful.wallpaper,
background_widget = wibox.widget { -- Set a background image (like a wallpaper) for the widget
image = "/home/eric/Pictures/wallpapers/96300930_p0_x4_esrgan.jpg",
horizontal_fit_policy = "fit",
vertical_fit_policy = "fit",
widget = wibox.widget.imagebox
widget = wibox.widget.imagebox
}
}
}