-- Reno Unity - Unity theme for Reno desktop
--[[
    Reno Unity - A theme for Reno desktop

    Written in 2022 by Yessiest (yessiest@memeware.net)

    To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.

    You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. 
--]]
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local gears = require("gears")
local themes_path = root_path.."/themes/"

local theme = {}

theme.font          = "Ubuntu 8"

theme.bg_normal     = "#19191D"
theme.bg_focus      = "#3E3E3E"
theme.bg_urgent     = "#2E2E2E"
theme.bg_minimize   = "#2E2E2E"
theme.bg_highlight  = "#45433D"
theme.bg_systray    = theme.bg_normal


theme.fg_normal     = "#e1dec7"
theme.fg_focus      = "#e1dec7"
theme.fg_urgent     = "#e1dec7"
theme.fg_minimize   = "#e1dec7"

theme.window_rounding = 5
theme.useless_gap   = dpi(0)
-- technically speaking these are irrelevant since they're not exactly smart
-- borders
theme.border_width  = dpi(0)
theme.border_normal = "#c0c0c0"
theme.border_focus  = "#c0c0c0"
theme.border_marked = "#c0c0c0"

local wibar_height = 26
local wibar_width = 56


theme.horizontal_button_bg_focus = {
    type = "linear",
    from = {0,0},
    to = {0,wibar_height},
    stops = {
      {0,"#32322C"},
      {1,"#4E4E46"}
    }
}

theme.horizontal_button_bg_normal = {
    type = "linear",
    from = {0,0},
    to = {0,wibar_height},
    stops = {
        {0,"#51514E"},
        {1,"#343431"}
    }
}

theme.horizontal_button_border_bg = "#51514E"

theme.button_bg_focus = {
    type = "radial",
    from = {wibar_width/2,-0.5*wibar_width,wibar_width/10},
    to = {wibar_width/2,-0.5*wibar_width,wibar_width*2},
    stops = {
        { 0 , "#FFFFFFBB"},
        { 0.45, "#DF744E99"},
        { 0.55, "#DF744E99"},
        { 1, "#FFFFFF44"}
    }
}

theme.button_bg_normal = {
    type = "radial",
    from = {wibar_width/2,-0.5*wibar_width,wibar_width/10},
    to = {wibar_width/2,-0.2*wibar_width,wibar_width*1.5},
    stops = {
        { 0 , "#FFFFFFFF"},
        { 0.5, "#33333333"},
        { 1, "#FFFFFF22"}
    }
}

theme.button_shape = function(cr,width,height)
    return require("gears").shape.rounded_rect(cr,width,height,2)
end


theme.bar_bg_focus = {
    type = "linear",
    from = { 0, 20 },
    to = { 0, 0 },
    stops = { { 0, "#3C3B37"} , { 1 , "#59574E"} }
}

theme.bar_bg_normal = {
    type = "linear",
    from = { 0, 20 },
    to = { 0, 0 },
    stops = { { 0, "#3C3B37"} , { 1 , "#41403D"} }
}

theme.bar_bg_inverted_normal = {
    type = "linear",
    from = { 0, 20 },
    to = { 0, 0 },
    stops = { { 0 , "#41403D"}, { 1, "#3C3B37"} }
}

theme.bar_bg_inverted_focus = {
    type = "linear",
    from = { 0, 20 },
    to = { 0, 0 },
    stops = { { 0 , "#59574E"}, { 1, "#3C3B37"} }
}

theme.bar_border_color = {
    type = "radial",
    from = {wibar_width/2,wibar_width/(-3),wibar_width/8},
    to = {wibar_width/2,wibar_width/(-5),wibar_width*1},
    stops = {
        { 0 , "#FFFFFF66"},
        { 1, "#43434366"},
    }
}

theme.titlebar_bg_focus = theme.bar_bg_focus
theme.titlebar_bg_normal = theme.bar_bg_normal

local taglist_square_size = dpi(4)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
    taglist_square_size, theme.fg_normal
)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
    taglist_square_size, theme.fg_normal
)
theme.menu_height = dpi(15)
theme.menu_width  = dpi(100)
theme.systray_icon_spacing = 2

-- Define the image to load

theme.titlebar_ontop_button_normal_inactive = themes_path.."unity_mate/titlebar/ontop_normal_inactive.png"
theme.titlebar_ontop_button_focus_inactive  = themes_path.."unity_mate/titlebar/ontop_focus_inactive.png"
theme.titlebar_ontop_button_normal_active = themes_path.."unity_mate/titlebar/ontop_normal_active.png"
theme.titlebar_ontop_button_focus_active  = themes_path.."unity_mate/titlebar/ontop_focus_active.png"

theme.titlebar_sticky_button_normal_inactive = themes_path.."unity_mate/titlebar/sticky_normal_inactive.png"
theme.titlebar_sticky_button_focus_inactive  = themes_path.."unity_mate/titlebar/sticky_focus_inactive.png"
theme.titlebar_sticky_button_normal_active = themes_path.."unity_mate/titlebar/sticky_normal_active.png"
theme.titlebar_sticky_button_focus_active  = themes_path.."unity_mate/titlebar/sticky_focus_active.png"

theme.titlebar_floating_button_normal_inactive = themes_path.."unity_mate/titlebar/floating_normal_inactive.png"
theme.titlebar_floating_button_focus_inactive  = themes_path.."unity_mate/titlebar/floating_focus_inactive.png"
theme.titlebar_floating_button_normal_active = themes_path.."unity_mate/titlebar/floating_normal_active.png"
theme.titlebar_floating_button_focus_active  = themes_path.."unity_mate/titlebar/floating_focus_active.png"

theme = theme_assets.recolor_titlebar(theme,theme.fg_normal,"normal")
theme = theme_assets.recolor_titlebar(theme,theme.fg_focus,"focus")

theme.titlebar_close_button_normal = themes_path.."unity_mate/titlebar/close_normal.png"
theme.titlebar_close_button_focus  = themes_path.."unity_mate/titlebar/close_focus.png"

theme.titlebar_minimize_button_normal = themes_path.."unity_mate/titlebar/minimize_normal.png"
theme.titlebar_minimize_button_focus  = themes_path.."unity_mate/titlebar/minimize_focus.png"

theme.titlebar_maximized_button_normal_inactive = themes_path.."unity_mate/titlebar/maximized_normal_inactive.png"
theme.titlebar_maximized_button_focus_inactive  = themes_path.."unity_mate/titlebar/maximized_focus_inactive.png"
theme.titlebar_maximized_button_normal_active = themes_path.."unity_mate/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_active  = themes_path.."unity_mate/titlebar/maximized_focus_active.png"

-- You can use your own layout icons like this:
theme.layout_fairh = themes_path.."unity_mate/layouts/fairhw.png"
theme.layout_fairv = themes_path.."unity_mate/layouts/fairvw.png"
theme.layout_floating  = themes_path.."unity_mate/layouts/floatingw.png"
theme.layout_magnifier = themes_path.."unity_mate/layouts/magnifierw.png"
theme.layout_max = themes_path.."unity_mate/layouts/maxw.png"
theme.layout_fullscreen = themes_path.."unity_mate/layouts/fullscreenw.png"
theme.layout_tilebottom = themes_path.."unity_mate/layouts/tilebottomw.png"
theme.layout_tileleft   = themes_path.."unity_mate/layouts/tileleftw.png"
theme.layout_tile = themes_path.."unity_mate/layouts/tilew.png"
theme.layout_tiletop = themes_path.."unity_mate/layouts/tiletopw.png"
theme.layout_spiral  = themes_path.."unity_mate/layouts/spiralw.png"
theme.layout_dwindle = themes_path.."unity_mate/layouts/dwindlew.png"
theme.layout_cornernw = themes_path.."unity_mate/layouts/cornernww.png"
theme.layout_cornerne = themes_path.."unity_mate/layouts/cornernew.png"
theme.layout_cornersw = themes_path.."unity_mate/layouts/cornersww.png"
theme.layout_cornerse = themes_path.."unity_mate/layouts/cornersew.png"

-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(
    theme.menu_height, theme.bg_focus, theme.fg_focus
)

theme.hotkeys_border_width = 3
theme.hotkeys_border_color = theme.bg_focus
theme.hotkeys_modifiers_fg = theme.fg_normal
theme.hotkeys_label_fg = theme.fg_normal

---theme.bgimage_outset
-- Define the icon theme for application icons. If not set then the icons
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
theme.icon_theme = "Humanity"

-- Icons
local icons = {
    "battery-caution-charging-symbolic",
    "battery-empty-charging-symbolic",
    "battery-full-charging-symbolic",
    "battery-good-charging-symbolic",
    "battery-low-charging-symbolic"
}
for _,v in pairs(icons) do
    theme[v] = themes_path.."unity_mate/icons/"..v..".png"
    theme[v:gsub("-charging","")] = themes_path.."unity_mate/icons/"..v:gsub("-charging","")..".png"
end
theme["battery-full-charged-symbolic"] = themes_path.."unity_mate/icons/battery-full-charged-symbolic.png"
theme["battery-missing-symbolic"] = themes_path.."unity_mate/icons/battery-missing-symbolic.png"
theme["ac-adapter-symbolic"] = themes_path.."unity_mate/icons/ac-adapter-symbolic.png"
theme["backlight-symbolic"] = themes_path.."unity_mate/icons/backlight-symbolic.png"
theme["notifications-area-symbolic"] = themes_path.."unity_mate/icons/notifications-area-symbolic.png"
theme["notifications-area-flagged-symbolic"] = themes_path.."unity_mate/icons/notifications-area-flagged-symbolic.png"

theme["mpc-previous-symbolic"] = themes_path.."unity_mate/icons/mpc-previous-symbolic.png"

theme["mpc-play-symbolic"] = themes_path.."unity_mate/icons/mpc-play-symbolic.png"
theme["mpc-pause-symbolic"] = themes_path.."unity_mate/icons/mpc-pause-symbolic.png"
theme["mpc-next-symbolic"] = themes_path.."unity_mate/icons/mpc-next-symbolic.png"

theme["action-poweroff-symbolic"] = themes_path.."unity_mate/icons/action-poweroff-symbolic.png"
theme["action-lock-screen-symbolic"] = themes_path.."unity_mate/icons/action-lock-screen-symbolic.png"
theme["action-suspend-symbolic"] = themes_path.."unity_mate/icons/action-suspend-symbolic.png"
theme["volume-high-symbolic"] = themes_path.."unity_mate/icons/volume-high-symbolic.png"
theme["volume-medium-symbolic"] = themes_path.."unity_mate/icons/volume-medium-symbolic.png"
theme["volume-low-symbolic"] = themes_path.."unity_mate/icons/volume-low-symbolic.png"
theme["volume-muted-symbolic"] = themes_path.."unity_mate/icons/volume-muted-symbolic.png"


theme.wallpaper = themes_path.."unity_mate/background.png"
theme.wallpapers_icon = themes_path.."unity_mate/icons/wallpapers.png"
-- Default icon for clients
-- This one has to be baked as a surface to avoid memory leaks
theme.icon_default = themes_path.."unity_mate/icons/unknown-app.png"

for _,v in pairs({
    "battery-caution-symbolic",
    "battery-empty-symbolic",
    "battery-full-symbolic",
    "battery-good-symbolic",
    "battery-low-symbolic",
    "battery-caution-charging-symbolic",
    "battery-empty-charging-symbolic",
    "battery-full-charging-symbolic",
    "battery-good-charging-symbolic",
    "battery-low-charging-symbolic",
    "battery-full-charged-symbolic",
    "battery-missing-symbolic",
    "ac-adapter-symbolic",
    "backlight-symbolic",
    "notifications-area-symbolic",
    "notifications-area-flagged-symbolic",
    "mpc-previous-symbolic",
    "mpc-play-symbolic",
    "mpc-pause-symbolic",
    "mpc-next-symbolic",
    "action-poweroff-symbolic",
    "action-lock-screen-symbolic",
    "action-suspend-symbolic",
    "wallpapers_icon",
    "icon_default",
    "volume-high-symbolic",
    "volume-medium-symbolic",
    "volume-low-symbolic",
    "volume-muted-symbolic"}) do
    if theme[v] and gears.filesystem.file_readable(theme[v]) then
        theme[v] = gears.color.recolor_image(theme[v],theme.fg_normal)
    end
end
-- Notification popups settings
theme.notification_width = 240
theme.notification_height = 60


theme.widgets = {
    -- {{{ Widget base
    default = {
        container = {
            shape = function(cr,width,height)
                return require("gears").shape.rounded_rect(cr,width,height,2)
            end,
            bgimage_highlight = theme.bgimage_inset
        },
        button = {
            shape = theme.button_shape,
            onpress = function(widget)
                widget:set_bg(theme.bg_focus)
            end,
            onrelease = function(widget)
                widget:set_bg(theme.bg_normal)
            end
        },
        popup = {
            shape = function(cr,width,height)
                return gears.shape.rounded_rect(cr,width,height,4)
            end,
            root_shape = function(cr,width,height)
                return gears.shape.rounded_rect(cr,width,height,6)
            end,
        },
        titlebar = {
            hidden_size = 2,
            root_shape = function(cr,width,height)
                    return gears.shape.partially_rounded_rect(cr,width,height,
                    true,true,false,false,6) end,
            root_bg_focus = theme.titlebar_bg_focus,
            root_bg_normal = theme.titlebar_bg_normal,
            top = 2,
            bottom = 2,
            left = 3,
            right = 3
        },
        wibar = {
            shape = function(cr,width,height)
                return gears.shape.rounded_rect(cr,width,height,0)
            end,
            height = wibar_height,
            width = wibar_width+6,
            margins = 3,
            stretch = true
        },
        slider = {
            shape = function(cr,width,height)
                return gears.shape.rounded_rect(cr,width,height,0)
            end,
            height = 20,
            width = 140,
            bg_focus = theme.bg_normal,
            bg_normal = theme.bg_focus,
            handle_width = 8,
            handle_border_color = theme.bg_normal,
            handle_border_width = 2,
            bar_height = 6,
            bar_border_color = theme.bg_focus,
            bar_border_width = 2
        },
        checkbox = {
            width = 15,
            height = 15,
            shape = gears.shape.circle,
            border_width = 3,
            border_color = theme.bg_normal,
            paddings = {2,2,2,2}
        },
        icon = {
            width = 25,
            height = 25
        }
    },
    -- }}}
    -- {{{ Menus
    generic_menu = {
        base = {
            spacing = 2,
            menu_slide = true
        },
        button = {
            bg_normal = theme.bg_highlight,
            onpress = function(widget)
                widget:set_bg(theme.bg_focus)
            end,
            onrelease = function(widget)
                widget:set_bg(theme.bg_highlight)
            end,
            forced_height = 20,
            forced_width = 160
        },
    },
    -- }}}
    -- {{{ Popup activating icons
    generic_iconified_widget = {
        button = {
            margins = 1,
            bg_normal = "#00000000",
            onpress = function(widget)
                widget:set_bg(theme.bg_normal)
            end,
            onrelease = function(widget)
                widget:set_bg("#00000000")
            end
        }
    },
    -- }}}
    -- {{{ Bars/Panels/Menu popups
    generic_composite_widget = {
        base = {
            spacing = 2
        }
    },
    -- }}}
    -- {{{ Status panel widgets
    generic_status_widget = {
        container = {
            margins = 2,
            bg_normal = "#00000000",
        },
        button = {
            margins = 1,
            bg_normal = "#00000000",
            onpress = function() end,
            onrelease = function() end,
        }
    },
    -- }}}
    -- {{{ Various button lists
    generic_button_list = {
        button = {
            bg_normal = theme.bg_highlight,
            onpress = function(widget)
                widget:set_bg(theme.bg_focus)
            end,
            onrelease = function(widget)
                widget:set_bg(theme.bg_highlight)
            end,
            forced_width = 20,
            forced_height = 20
        },
        base = {
            spacing = 2
        }
    },
    -- }}}
    -- {{{ All widgets that fit into a single line
    generic_oneline_widget = {
        container = {
            bgimage_normal = theme.bgimage_inset
        },
        button = {
            margins = 2,
            onpress = function(widget)
                widget:set_bg(theme.bg_normal)
            end,
            onrelease = function(widget)
                widget:set_bg("#00000000")
            end,
            bg_normal = "#00000000"
        }
    },
    -- }}}
    -- {{{ All kinds of widget popups
    generic_popup = {
        button = {
            width = 180,
            height = 40
        },
        article = {
            icon_size = 30
        },
        icon = {
            height = 60,
            width = 100
        }
    },
    -- }}}
    soundclown = {
        --[[ --Uncomment to leetify that MPC
        container = {
            bg_normal = "#0c0c0c",
            fg_normal = "#00FF00"
        },
        ]]
        base = {
            width = 140
        },
    },
    subpanel = {
        container = {
            bgimage_normal = theme.bgimage_inset,
            bg_normal = theme.bar_bg_inverted_normal,
            margins = 0,
            shape = function(cr,width,height)
                return gears.shape.rounded_rect(cr,width,height,8)
            end
        }
    },
    taglist = {
        base = {
            spacing = 2,
            layout = require("wibox").layout.flex.horizontal
        },
        button = {
            bgimage_focus = theme.bgimage_inset,
            bgimage_normal = theme.bgimage_outset,
        },
        container = {
            margins = 3
        }
    },
    tasklist = {
        icon = {
            margins = 2
        },
        button = {
            width = 160,
            height = wibar_width-4,
            margins = 4,
            shape_focus = theme.button_shape,
            shape_normal = theme.button_shape,
            shape_urgent = theme.button_shape,
            shape_minimize = theme.button_shape,
            shape_border_width_normal = dpi(1),
            shape_border_width_focus = dpi(1),
            shape_border_width_urgent = dpi(1),
            shape_border_width_minimize = dpi(1),
            bg_normal = theme.horizontal_button_bg_normal,
            bg_focus = theme.horizontal_button_bg_focus,
            bg_urgent = theme.bg_urgent,
            bg_minimize = theme.bg_minimize,
            shape_border_color_normal = theme.horizontal_button_border_bg,
            shape_border_color_focus = theme.horizontal_button_border_bg,
            shape_border_color_minimize = theme.horizontal_button_border_bg,
            shape_border_color_urgent = theme.horizontal_button_border_bg,
            vertical = {
                margins = 2,
                shape_border_width_normal = dpi(1),
                shape_border_width_focus = dpi(1),
                shape_border_width_urgent = dpi(1),
                shape_border_width_minimize = dpi(1),
                bg_normal = theme.button_bg_normal,
                bg_focus = theme.button_bg_focus,
                bg_urgent = theme.bg_urgent,
                bg_minimize = theme.bg_minimize,
                shape_border_color_normal = theme.bar_border_color,
                shape_border_color_focus = theme.bar_border_color,
                shape_border_color_urgent = theme.bar_border_color,
                shape_border_color_minimize = theme.bar_border_color
            }
        }
    },
    launcher = {
        icon = {
            width = wibar_width,
            height = wibar_width,
            margins = 2
        },
        button = {
            forced_height = wibar_width,
            forced_width = wibar_width,
            margins = 2,
            bg_normal = theme.horizontal_button_bg_normal,
            bg_focus = theme.horizontal_button_bg_focus,
            shape_border_width = dpi(1),
            shape_border_color = theme.horizontal_button_border_bg,
            vertical = {
                margins = 1,
                bg_normal = theme.button_bg_normal,
                bg_focus = theme.button_bg_focus,
                shape_border_width = dpi(1),
                shape_border_color = theme.bar_border_color,
                onpress = function(widget)
                    widget:set_bg(theme.button_bg_focus)
                end,
                onrelease = function(widget)
                    widget:set_bg(theme.button_bg_normal)
                end
            },
            onpress = function(widget)
                widget:set_bg(theme.horizontal_button_bg_focus)
            end,
            onrelease = function(widget)
                widget:set_bg(theme.horizontal_button_bg_normal)
            end
        }
    },
    lockscreen = {
        popup = {
            margins = 0
        },
        icon = {
            width = 150,
            height = 150
        }
    },
    lockbar = {
        base = {
            height = 22
        }
    },
    lockpanel = {
        base = {
            icon_height = 60,
            icon_width = 60,
            panel_height = 300,
            panel_width = 200,
            panel_bgimage = theme.bgimage_outset
        },
        container = {
            shape = function(cr,width,height)
                return gears.shape.rounded_rect(cr,width,height,8)
            end,
            shape_border_color = theme.bg_highlight,
            shape_border_width = dpi(2)
        }
    },
    systray = {
        container = {
            margins = 2,
            shape = function(cr,width,height)
                return gears.shape.rounded_rect(cr,width,height,4)
            end,
            shape_border_color = theme.bg_normal,
            shape_border_width = dpi(2)
        }
    },
    lock_clock = {
        textbox = {
            font = "Ubuntu Mono 20"
        }
    },
    titlebar = {
        titlebar_top = {
            onfocus = function(titlebar)
                local root = titlebar:get_children_by_id("titlebar_root")[1]
                root:set_bg(theme.titlebar_bg_focus)
                root:set_shape(function(cr,width,height)
                    return gears.shape.partially_rounded_rect(
                    cr,width,height,
                    true,true,false,false,6) end)
            end,
            onunfocus = function(titlebar)
                local root = titlebar:get_children_by_id("titlebar_root")[1]
                root:set_bg(theme.titlebar_bg_normal)
                root:set_shape(function(cr,width,height)
                    return gears.shape.partially_rounded_rect(
                    cr,width,height,
                    true,true,false,false,6) end)
            end,
            bg_focus = "#00000000",
            bg_normal = "#00000000",
            fg_focus = "#FAFAFA",
            fg_normal = theme.fg_normal,
            size = 22,
            spacing = 1
        },
        titlebar_left = {
            size = 2,
            bg_focus = "#3C3B37",
            bg_normal = "#3C3B37",
        },
        titlebar_right = {
            size = 2,
            bg_focus = "#3C3B37",
            bg_normal = "#3C3B37",
        },
        titlebar_bottom = {
            size = 2,
            bg_focus = "#3C3B37",
            bg_normal = "#3C3B37",
        }
    },
    wibar = {
        wibar_top = {
            bg_normal = theme.bar_bg_normal,
            fg_normal = theme.fg_normal,
            height = 28,
        },
        wibar_left = {
            bg_normal = "#0D0D0966",
            border_width = dpi(1),
            border_color = "#26262666"
        },
        wibar_bottom = {
            bg_normal = theme.bar_bg_normal,
            fg_normal = theme.fg_normal,
            height = 28,
            margins = 0
        },
        wibar_right = {
            bg_normal = "#0D0D0966",
            border_width = dpi(1),
            border_color = "#26262666"
        }
    }
}

local wibox = require("wibox")

theme.templates = {
    templates = {
        titlebar = function(style)
            return function(layout,options)
                local margins = style.titlebar.margins
                if (style.titlebar.left or
                    style.titlebar.right or
                    style.titlebar.bottom or
                    style.titlebar.top) then
                    margins = nil
                end
                return {
                    {
                        gears.table.join({
                            layout,
                            margins = margins,
                            layout = wibox.container.margin,
                            left = style.titlebar.left,
                            right = style.titlebar.right,
                            bottom = style.titlebar.bottom,
                            top = style.titlebar.top
                        },options or {}),
                        bgimage = style.titlebar.root_bgimage_normal,
                        bg = style.titlebar.root_bg_normal,
                        fg = style.titlebar.root_fg_normal,
                        shape = style.titlebar.root_shape,
                        shape_border_color = style.titlebar.root_shape_border_color,
                        shape_border_width = style.titlebar.root_shape_border_width,
                        widget = wibox.container.background,
                        id = "titlebar_root"
                    },
                    layout = wibox.container.margin,
                    left = style.titlebar.root_margin_left,
                    right = style.titlebar.root_margin_right,
                    top = style.titlebar.root_margin_top,
                    bottom = style.titlebar.root_margin_bottom
                }
            end
        end,
        popup = function(style)
            return function(widget,options)
                 return gears.table.join({
                    widget = {
                        {
                            widget,
                            margins = style.popup.margins,
                            layout = wibox.container.margin
                        },
                        bg = style.popup.bg_normal,
                        shape = style.popup.root_shape,
                        widget = wibox.container.background
                    },
                    bg = "#00000000",
                    shape = style.popup.shape,
                    visible = false,
                    ontop = true
                },options or {})
            end
        end,
    }
}

return theme

-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
