added more widgets, rewritten folder structure
This commit is contained in:
43
awesome/crylia_bar/center_bar.lua
Normal file
43
awesome/crylia_bar/center_bar.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local colors = require ("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
return function (s, widget)
|
||||
|
||||
local top_center = awful.popup{
|
||||
widget = wibox.container.background,
|
||||
ontop = false,
|
||||
bg = colors.color["Grey900"],
|
||||
visible = true,
|
||||
maximum_width = dpi(500),
|
||||
placement = function (c) awful.placement.top(c, {margins = dpi(10)}) end,
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 10)
|
||||
end
|
||||
}
|
||||
|
||||
top_center:setup{
|
||||
nil,
|
||||
{
|
||||
widget,
|
||||
margins = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
nil,
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
awesome.connect_signal(
|
||||
"hide_centerbar",
|
||||
function (hide)
|
||||
top_center.visible = hide
|
||||
end
|
||||
)
|
||||
end
|
||||
35
awesome/crylia_bar/init.lua
Normal file
35
awesome/crylia_bar/init.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
|
||||
awful.screen.connect_for_each_screen(
|
||||
function (s)
|
||||
-- Modules
|
||||
require("theme.crylia.modules.powermenu")(s)
|
||||
require("theme.crylia.modules.calendar_osd")(s)
|
||||
require("theme.crylia.modules.volume_osd")(s)
|
||||
require("theme.crylia.modules.brightness_osd")(s)
|
||||
require("theme.crylia.modules.titlebar")
|
||||
|
||||
-- Widgets
|
||||
s.battery = require("theme.crylia.widgets.battery")()
|
||||
s.network = require("theme.crylia.widgets.network")()
|
||||
s.audio = require("theme.crylia.widgets.audio")()
|
||||
s.date = require("theme.crylia.widgets.date")()
|
||||
s.clock = require("theme.crylia.widgets.clock")()
|
||||
s.bluetooth = require("theme.crylia.widgets.bluetooth")()
|
||||
s.layoutlist = require("theme.crylia.widgets.layout_list")()
|
||||
s.powerbutton = require("theme.crylia.widgets.power")()
|
||||
s.kblayout = require("theme.crylia.widgets.kblayout")()
|
||||
s.taglist = require("theme.crylia.widgets.taglist")(s)
|
||||
s.tasklist = require("theme.crylia.widgets.tasklist")(s)
|
||||
s.systray = require("theme.crylia.widgets.systray")(s)
|
||||
|
||||
-- Bars
|
||||
require("crylia_bar.left_bar")(s, {s.layoutlist, s.systray, s.taglist})
|
||||
require("crylia_bar.center_bar")(s, s.tasklist)
|
||||
require("crylia_bar.right_bar")(s, {s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock,s.powerbutton})
|
||||
end
|
||||
)
|
||||
53
awesome/crylia_bar/left_bar.lua
Normal file
53
awesome/crylia_bar/left_bar.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local colors = require ("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
return function (s, widgets)
|
||||
|
||||
local top_left = awful.popup{
|
||||
widget = wibox.container.background,
|
||||
ontop = false,
|
||||
bg = colors.color["Grey900"],
|
||||
visible = true,
|
||||
maximum_width = dpi(650),
|
||||
placement = function(c) awful.placement.top_left(c, {margins = dpi(10)}) end,
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end
|
||||
}
|
||||
|
||||
top_left:struts{
|
||||
top = 55
|
||||
}
|
||||
|
||||
top_left:setup {
|
||||
{
|
||||
{
|
||||
widgets[1],
|
||||
margins = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[2],
|
||||
margins = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[3],
|
||||
margins = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
nil,
|
||||
nil,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
}
|
||||
end
|
||||
98
awesome/crylia_bar/right_bar.lua
Normal file
98
awesome/crylia_bar/right_bar.lua
Normal file
@@ -0,0 +1,98 @@
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local colors = require ("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
return function (s, widgets)
|
||||
|
||||
local top_right = awful.popup{
|
||||
widget = wibox.container.background,
|
||||
ontop = false,
|
||||
bg = colors.color["Grey900"],
|
||||
visible = true,
|
||||
screen = s,
|
||||
placement = function (c) awful.placement.top_right(c, {margins = dpi(10)}) end,
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end
|
||||
}
|
||||
|
||||
top_right:setup {
|
||||
nil,
|
||||
nil,
|
||||
{
|
||||
{
|
||||
widgets[1],
|
||||
left = dpi(6),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[2],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[3],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[4],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[5],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[6],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[7],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[8],
|
||||
left = dpi(3),
|
||||
right = dpi(6),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
end
|
||||
Reference in New Issue
Block a user