Update && Fix
This commit is contained in:
parent
4f850f7173
commit
6f8acf2168
28 changed files with 443 additions and 353 deletions
|
@ -23,8 +23,6 @@ mylauncher = wibox.container.margin(mylauncher, dpi(0), dpi(0), dpi(6), dpi(6))
|
|||
|
||||
-- # Widgets :
|
||||
-- ~~~~~~~~~~~
|
||||
-- # Sidebar button :
|
||||
local sidebar_button = require('ui.widgets.sidebar_button')
|
||||
-- # Systray :
|
||||
local systray = require('ui.widgets.systray')
|
||||
-- # Clock :
|
||||
|
@ -40,7 +38,6 @@ local temprature_widget = require('ui.widgets.temprature')
|
|||
-- # Launcher :
|
||||
local launcher = require('ui.widgets.launcher')
|
||||
|
||||
|
||||
-- # Status widgets :
|
||||
local status_widgets = wibox.widget {
|
||||
{
|
||||
|
@ -55,14 +52,15 @@ local status_widgets = wibox.widget {
|
|||
-- # Keybord :
|
||||
keyboard_widget,
|
||||
-- # Clock :
|
||||
clock_widget,
|
||||
spacing = dpi(20),
|
||||
clock_widget,
|
||||
spacing = dpi(15),
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
margins = {top = dpi(4), bottom = dpi(4)},
|
||||
widget = wibox.container.margin,
|
||||
}
|
||||
|
||||
|
||||
-- Bar :
|
||||
local function get_bar(s)
|
||||
-- Create the wibox
|
||||
|
@ -74,58 +72,52 @@ local function get_bar(s)
|
|||
visible = true,
|
||||
height = dpi(42),
|
||||
width = s.geometry.width,
|
||||
--width = s.geometry.width - dpi(120),
|
||||
--width = s.geometry.width - dpi(20),
|
||||
screen = s,
|
||||
bg = colors.black,
|
||||
--bg = colors.main_transparent,
|
||||
--bg = colors.transparent,
|
||||
--opacity = 0.85,
|
||||
})
|
||||
|
||||
--awful.placement.bottom(s.mywibar, { margins = theme.useless_gap * 1 })
|
||||
--s.mywibar:struts { bottom = dpi(45), top = dpi(0), left = dpi(0), right = dpi(0) }
|
||||
|
||||
--awful.placement.bottom(s.mywibar, { margins = theme.useless_gap * 2 })
|
||||
--s.mywibar:struts { bottom = dpi(50), top = dpi(5)}
|
||||
|
||||
-- Bar setup :
|
||||
s.mywibar:setup {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
launcher,
|
||||
taglist(s),
|
||||
--tasklist(s),
|
||||
spacing = dpi(10),
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
--nil,
|
||||
-- # Tasks in middel :
|
||||
{
|
||||
tasklist(s),
|
||||
--clock_widget,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
{
|
||||
status_widgets,
|
||||
systray,
|
||||
sidebar_button,
|
||||
layoutbox(s),
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
spacing = dpi(10)
|
||||
},
|
||||
layout = wibox.layout.align.horizontal,
|
||||
expand = "none"
|
||||
launcher,
|
||||
taglist(s),
|
||||
--tasklist(s),
|
||||
spacing = dpi(10),
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
widget = wibox.container.margin,
|
||||
margins = {left = dpi(15), right = dpi(15), top = dpi(2), bottom = dpi(2)}
|
||||
--nil,
|
||||
-- # Tasks in middel :
|
||||
{
|
||||
tasklist(s),
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
{
|
||||
status_widgets,
|
||||
systray,
|
||||
layoutbox(s),
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
spacing = dpi(10)
|
||||
},
|
||||
layout = wibox.layout.align.horizontal,
|
||||
expand = "none"
|
||||
},
|
||||
widget = wibox.container.background,
|
||||
bg = colors.bg_color,
|
||||
forced_height = s.mywibar.height
|
||||
widget = wibox.container.margin,
|
||||
margins = {left = dpi(15), right = dpi(15), top = dpi(0), bottom = dpi(0)}
|
||||
},
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
spacing = dpi(10)
|
||||
}
|
||||
|
||||
|
||||
-- function to remove the bar in maxmized/fullscreen apps
|
||||
local function remove_wibar(c)
|
||||
if c.fullscreen or c.maximized then
|
||||
|
|
|
@ -21,6 +21,6 @@ return function(s)
|
|||
awful.button({ }, 5, function () awful.layout.inc( 1) end),
|
||||
}
|
||||
}
|
||||
layoutbox = wibox.container.margin(layoutbox, dpi(4), dpi(4), dpi(10), dpi(10))
|
||||
layoutbox = wibox.container.margin(layoutbox, dpi(2), dpi(2), dpi(11), dpi(11))
|
||||
return layoutbox
|
||||
end
|
||||
|
|
|
@ -24,15 +24,27 @@ screen.connect_signal("request::desktop_decoration", function(s)
|
|||
awful.tag(awful.util.tagnames, s, awful.layout.layouts[1])
|
||||
end)
|
||||
|
||||
--local function update_tag(item, tag, index)
|
||||
-- if tag.selected then
|
||||
-- item.markup = helpers.colorize_text(" ", colors.main_scheme)
|
||||
-- elseif tag.urgent then
|
||||
-- item.markup = helpers.colorize_text(" ", colors.red)
|
||||
-- elseif #tag:clients() > 0 then
|
||||
-- item.markup = helpers.colorize_text(" ", colors.white)
|
||||
-- else
|
||||
-- item.markup = helpers.colorize_text(" ", colors.white)
|
||||
-- end
|
||||
--end
|
||||
|
||||
local function update_tag(item, tag, index)
|
||||
if tag.selected then
|
||||
item.markup = helpers.colorize_text(" ", colors.main_scheme)
|
||||
elseif tag.urgent then
|
||||
item.markup = helpers.colorize_text(" ", colors.red)
|
||||
elseif #tag:clients() > 0 then
|
||||
item.markup = helpers.colorize_text(" ", colors.white)
|
||||
else
|
||||
item.markup = helpers.colorize_text(" ", colors.white)
|
||||
item.markup = helpers.colorize_text(" ", colors.main_scheme)
|
||||
elseif tag.urgent then
|
||||
item.markup = helpers.colorize_text(" ", colors.red)
|
||||
elseif #tag:clients() > 0 then
|
||||
item.markup = helpers.colorize_text(" ", colors.white)
|
||||
else
|
||||
item.markup = helpers.colorize_text(" ", colors.white)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -69,11 +81,11 @@ return function(s)
|
|||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
style = {
|
||||
spacing = dpi(-4),
|
||||
spacing = dpi(-2),
|
||||
},
|
||||
widget_template = {
|
||||
id = "tag",
|
||||
font = theme.ui_font,
|
||||
font = theme.taglist_font,
|
||||
widget = wibox.widget.textbox,
|
||||
|
||||
create_callback = function(self, c3, index, object)
|
||||
|
@ -92,16 +104,16 @@ return function(s)
|
|||
taglist,
|
||||
top = dpi(0),
|
||||
bottom = dpi(0),
|
||||
left = dpi(8),
|
||||
right = dpi(8),
|
||||
left = dpi(0),
|
||||
right = dpi(4),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
bg = colors.container,
|
||||
shape = helpers.rrect(theme.rounded - 4),
|
||||
bg = colors.black,
|
||||
shape = helpers.rrect(theme.rounded),
|
||||
widget = wibox.container.background
|
||||
},
|
||||
top = dpi(4),
|
||||
bottom = dpi(4),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
left = dpi(0),
|
||||
right = dpi(0),
|
||||
widget = wibox.container.margin
|
||||
|
|
|
@ -80,10 +80,7 @@ return function(s)
|
|||
id = "background_role",
|
||||
widget = wibox.container.background,
|
||||
},
|
||||
top = dpi(4),
|
||||
bottom = dpi(4),
|
||||
left = dpi(2),
|
||||
right = dpi(2),
|
||||
margins = dpi(4),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue