Reworked a whole lot. New config file and theme config file for easier changes. Did #19. And much more

This commit is contained in:
Kievits Rene
2022-06-14 06:33:33 +02:00
parent fd74ab9fb4
commit 521d392769
60 changed files with 2216 additions and 1450 deletions

View File

@@ -4,10 +4,8 @@
-- 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")
-- Icon directory path
@@ -20,8 +18,10 @@ return function(s)
{
{
id = "icon",
image = gears.color.recolor_image(icondir .. "bluetooth-off.svg"),
image = gears.color.recolor_image(icondir .. "bluetooth-off.svg", Theme_config.bluetooth.fg),
widget = wibox.widget.imagebox,
valign = "center",
halign = "center",
resize = false
},
id = "icon_layout",
@@ -32,27 +32,29 @@ return function(s)
right = dpi(8),
widget = wibox.container.margin
},
bg = color["Blue200"],
fg = color["Grey900"],
bg = Theme_config.bluetooth.bg,
fg = Theme_config.bluetooth.fg,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
gears.shape.rounded_rect(cr, width, height, dpi(6))
end,
widget = wibox.container.background
}
-- Hover signal to change color when mouse is over
Hover_signal(bluetooth_widget, color["Blue200"], color["Grey900"])
Hover_signal(bluetooth_widget, Theme_config.bluetooth.bg, Theme_config.bluetooth.fg)
awesome.connect_signal("state", function(state)
if state then
bluetooth_widget:get_children_by_id("icon")[1]:set_image(gears.color.recolor_image(icondir .. "bluetooth-on.svg", color["Grey900"]))
bluetooth_widget:get_children_by_id("icon")[1]:set_image(gears.color.recolor_image(icondir .. "bluetooth-on.svg",
Theme_config.bluetooth.fg))
else
bluetooth_widget:get_children_by_id("icon")[1]:set_image(gears.color.recolor_image(icondir .. "bluetooth-off.svg", color["Grey900"]))
bluetooth_widget:get_children_by_id("icon")[1]:set_image(gears.color.recolor_image(icondir .. "bluetooth-off.svg",
Theme_config.bluetooth.fg))
end
end)
bluetooth_widget:connect_signal(
"button::press",
function(c, d, e, key)
function(_, _, _, key)
if key == 1 then
awesome.emit_signal("bluetooth_controller::toggle", s)
else