Merge pull request #208 from floli/improve-fs-widget

Improve fs widget
This commit is contained in:
streetturtle 2020-11-10 16:30:56 -05:00 committed by GitHub
commit 3756d3af4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -35,7 +35,7 @@ local function worker(args)
layout = wibox.layout.fixed.vertical, layout = wibox.layout.fixed.vertical,
} }
local disk_header = { local disk_header = wibox.widget{
{ {
markup = '<b>Mount</b>', markup = '<b>Mount</b>',
forced_width = 150, forced_width = 150,
@ -47,8 +47,9 @@ local function worker(args)
align = 'left', align = 'left',
widget = wibox.widget.textbox, widget = wibox.widget.textbox,
}, },
layout = wibox.layout.align.horizontal layout = wibox.layout.ratio.horizontal
} }
disk_header:ajust_ratio(1, 0, 0.3, 0.7)
local popup = awful.popup{ local popup = awful.popup{
ontop = true, ontop = true,
@ -56,7 +57,6 @@ local function worker(args)
shape = gears.shape.rounded_rect, shape = gears.shape.rounded_rect,
border_width = 1, border_width = 1,
border_color = beautiful.bg_normal, border_color = beautiful.bg_normal,
bg = beautiful.bg_focus,
maximum_width = 400, maximum_width = 400,
offset = { y = 5 }, offset = { y = 5 },
widget = {} widget = {}
@ -131,8 +131,9 @@ local function worker(args)
.. math.floor(disks[v].perc) .. '%)', .. math.floor(disks[v].perc) .. '%)',
widget = wibox.widget.textbox widget = wibox.widget.textbox
}, },
layout = wibox.layout.align.horizontal layout = wibox.layout.ratio.horizontal
} }
row:ajust_ratio(2, 0.3, 0.3, 0.4)
disk_rows[k] = row disk_rows[k] = row
end end