Huge refractor and many fixes for dock, icons(again) etc

This commit is contained in:
Kievits Rene
2022-04-18 13:29:50 +02:00
parent adcc361891
commit b1a4b38024
123 changed files with 925 additions and 1019 deletions

View File

@@ -0,0 +1,64 @@
--------------------------------
-- This is the power widget --
--------------------------------
-- Awesome Libs
local awful = require("awful")
local color = require("src.theme.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local wibox = require("wibox")
require("src.core.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "src/assets/icons/power/"
return function()
local power_widget = wibox.widget {
{
{
{
{
{
id = "icon",
image = gears.color.recolor_image(icondir .. "power.svg", color["Grey900"]),
widget = wibox.widget.imagebox,
resize = false
},
id = "icon_layout",
widget = wibox.container.place
},
id = "icon_margin",
top = dpi(2),
widget = wibox.container.margin
},
id = "power_layout",
layout = wibox.layout.fixed.horizontal
},
id = "container",
left = dpi(8),
right = dpi(8),
widget = wibox.container.margin
},
bg = color["Red200"],
fg = color["Grey800"],
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end,
widget = wibox.container.background
}
-- Signals
Hover_signal(power_widget, color["Red200"])
power_widget:connect_signal(
"button::release",
function()
awesome.emit_signal("module::powermenu:show")
end
)
return power_widget
end