1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2026-03-23 05:55:12 +00:00

better battery and volume toolbar and removed some dyn tagging

This commit is contained in:
Toma Adrian Ionut 2022-11-10 19:17:18 +02:00
parent 97d6309b3a
commit 1e6be2b88e
2 changed files with 30 additions and 25 deletions

View file

@ -421,17 +421,19 @@ end, {
-- group = "tag" -- group = "tag"
-- }), -- }),
-- Dynamic tagging -- Dynamic tagging
awful.key({modkey, "Shift"}, "n", function() -- awful.key({modkey, "Shift"}, "n", function()
lain.util.add_tag() -- lain.util.add_tag()
end, { -- end, {
description = "add new tag", -- description = "add new tag",
group = "tag" -- group = "tag"
}), awful.key({modkey, "Shift"}, "r", function() -- }),
lain.util.rename_tag() -- awful.key({modkey, "Shift"}, "r", function()
end, { -- lain.util.rename_tag()
description = "rename tag", -- end, {
group = "tag" -- description = "rename tag",
}), awful.key({modkey, "Shift"}, "Left", function() -- group = "tag"
-- }),
awful.key({modkey, "Shift"}, "Left", function()
lain.util.move_tag(-1) lain.util.move_tag(-1)
end, { end, {
description = "move tag to the left", description = "move tag to the left",
@ -441,12 +443,13 @@ end, {
end, { end, {
description = "move tag to the right", description = "move tag to the right",
group = "tag" group = "tag"
}), awful.key({modkey, "Shift"}, "d", function() }), -- awful.key({modkey, "Shift"}, "d", function()
lain.util.delete_tag() -- lain.util.delete_tag()
end, { -- end, {
description = "delete tag", -- description = "delete tag",
group = "tag" -- group = "tag"
}), -- Standard program -- }),
-- Standard program
awful.key({modkey}, "Return", function() awful.key({modkey}, "Return", function()
awful.spawn(terminal) awful.spawn(terminal)
end, { end, {

View file

@ -123,7 +123,7 @@ theme.cal = lain.widget.cal({
fg = "#FFFFFF", fg = "#FFFFFF",
bg = theme.bg_normal, bg = theme.bg_normal,
position = "top_middle", position = "top_middle",
font = "JetBrainsMono Nerd Font Bold 12" font = theme.font
} }
}) })
@ -132,14 +132,15 @@ local baticon = wibox.widget.imagebox(theme.bat000)
local battooltip = awful.tooltip({ local battooltip = awful.tooltip({
objects = {baticon}, objects = {baticon},
margin_leftright = dpi(15), margin_leftright = dpi(15),
margin_topbottom = dpi(12) margin_topbottom = dpi(4)
}) })
battooltip.wibox.fg = "#fcfbf7" battooltip.wibox.fg = "#fcfbf7"
battooltip.wibox.widget.bg = "#404040" battooltip.wibox.widget.bg = "#404040"
battooltip.textbox.font = theme.font battooltip.textbox.font = theme.font
battooltip.timeout = 0 battooltip.timeout = 0
battooltip:set_shape(function(cr, width, height) battooltip:set_shape(function(cr, width, height)
gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, 8) gears.shape.rounded_bar(cr, width, height)
end) end)
local bat = lain.widget.bat({ local bat = lain.widget.bat({
settings = function() settings = function()
@ -164,7 +165,7 @@ local bat = lain.widget.bat({
end end
baticon:set_image(theme[index]) baticon:set_image(theme[index])
battooltip:set_markup(string.format("\n%s%%, %s", perc, bat_now.time)) battooltip:set_markup(string.format("%s%%, %s", perc, bat_now.time))
end end
}) })
@ -192,19 +193,20 @@ local volicon = wibox.widget.imagebox()
local battooltip = awful.tooltip({ local battooltip = awful.tooltip({
objects = {volicon}, objects = {volicon},
margin_leftright = dpi(15), margin_leftright = dpi(15),
margin_topbottom = dpi(12) margin_topbottom = dpi(4)
}) })
battooltip.wibox.fg = "#fcfbf7" battooltip.wibox.fg = "#fcfbf7"
battooltip.wibox.widget.bg = "#404040" battooltip.wibox.widget.bg = "#404040"
battooltip.textbox.font = theme.font battooltip.textbox.font = theme.font
battooltip.timeout = 0 battooltip.timeout = 0
battooltip:set_shape(function(cr, width, height) battooltip:set_shape(function(cr, width, height)
gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, 4) gears.shape.rounded_bar(cr, width, height)
end) end)
theme.volume = lain.widget.alsabar({ theme.volume = lain.widget.alsabar({
-- togglechannel = "IEC958,3", -- togglechannel = "IEC958,3",
notification_preset = { notification_preset = {
font = "Monospace 12", font = theme.font,
fg = theme.fg_normal fg = theme.fg_normal
}, },
settings = function() settings = function()
@ -225,7 +227,7 @@ theme.volume = lain.widget.alsabar({
end end
volicon:set_image(theme[index]) volicon:set_image(theme[index])
battooltip:set_markup(string.format("\n%s%%", perc)) battooltip:set_markup(string.format("%s%%", perc))
end end
}) })
volicon:buttons(my_table.join(awful.button({}, 1, function() volicon:buttons(my_table.join(awful.button({}, 1, function()