inf(desktop_decoration) Modularize desktop bar

This commit is contained in:
Aire-One 2021-07-04 17:39:03 +02:00
parent baeb76de22
commit 4c411d1af0
5 changed files with 17 additions and 2 deletions

View File

@ -16,12 +16,14 @@ local systray = require 'wibox.widget.systray'
local textclock = require 'wibox.widget.textclock'
local widget = require 'wibox.widget'
local mybattery = require 'rc.ui.desktop_decoration.widgets.battery'
local mycommands = require 'rc.configuration.prompt_commands'
local mymainmenu = require 'rc.ui.menu.mymainmenu'
local myprompt = require 'rc.ui.desktop_decoration.widgets.prompt'
local mytaglist = require 'MyTagListWidget'
local bar_widgets = require 'rc.ui.desktop_decoration.bar.widgets'
local mybattery = bar_widgets.battery
local myprompt = bar_widgets.prompt
local capi = {
screen = _G.screen
}
@ -82,6 +84,8 @@ end
local bar = { _private = { instances = {} }, mt = {} }
bar.widgets = bar_widgets
--- Get the bar instance for a given screen.
-- If no instance was found, we build a new one.
-- @tparam screen screen|integer The bar's screen.

View File

@ -0,0 +1,6 @@
local bar_widgets = {}
bar_widgets.battery = require 'rc.ui.desktop_decoration.bar.widgets.battery'
bar_widgets.prompt = require 'rc.ui.desktop_decoration.bar.widgets.prompt'
return bar_widgets

View File

@ -0,0 +1,5 @@
local desktop_decoration = {}
desktop_decoration.bar = require 'rc.ui.desktop_decoration.bar'
return desktop_decoration