mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-01-26 01:57:14 +08:00
evil daemon system, dependency list update, README improvements.
Former-commit-id: db310f8e49
Former-commit-id: 4f25f9200c3ac9f9385daca5a68378249ff0329e
Former-commit-id: 69fa3954e5738446a59b409b7e326233e7c3ef55
Former-commit-id: 673176f7857e39f3455f4ccb426eef2789c0e891
32 lines
922 B
Lua
32 lines
922 B
Lua
local gears = require("gears")
|
|
local wibox = require("wibox")
|
|
local beautiful = require("beautiful")
|
|
|
|
-- Set colors
|
|
local active_color = beautiful.ram_bar_active_color or "#5AA3CC"
|
|
local background_color = beautiful.ram_bar_background_color or "#222222"
|
|
|
|
local ram_bar = wibox.widget{
|
|
max_value = 100,
|
|
value = 50,
|
|
forced_height = dpi(10),
|
|
margins = {
|
|
top = dpi(8),
|
|
bottom = dpi(8),
|
|
},
|
|
forced_width = dpi(200),
|
|
shape = gears.shape.rounded_bar,
|
|
bar_shape = gears.shape.rounded_bar,
|
|
color = active_color,
|
|
background_color = background_color,
|
|
border_width = 0,
|
|
border_color = beautiful.border_color,
|
|
widget = wibox.widget.progressbar,
|
|
}
|
|
|
|
awesome.connect_signal("evil::ram", function(used, total)
|
|
local used_ram_percentage = (used / total) * 100
|
|
ram_bar.value = used_ram_percentage
|
|
end)
|
|
|
|
return ram_bar
|