Add new notification-center module with various widgets, add rubato animations and other fixes and improvements
This commit is contained in:
@@ -79,6 +79,7 @@ return function(s)
|
||||
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(
|
||||
gears.color.recolor_image(icon .. ".svg", color["Grey900"]))
|
||||
awesome.emit_signal("get::volume", volume)
|
||||
awesome.emit_signal("update::volume_widget", volume, icon .. ".svg")
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
@@ -163,7 +163,7 @@ return function()
|
||||
|
||||
battery_widget.container.battery_layout.icon_margin.icon_layout.icon:set_image(gears.surface.load_uncached(
|
||||
gears.color.recolor_image(icondir .. icon .. '.svg', "#212121")))
|
||||
|
||||
awesome.emit_signal("update::battery_widget", battery_percentage, icondir .. icon .. ".svg")
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
@@ -155,6 +155,7 @@ return function(widget, clock_mode)
|
||||
local diff_usage = (1000 * (diff_total - diff_idle) / diff_total + 5) / 10
|
||||
|
||||
cpu_usage_widget.container.cpu_layout.label.text = tostring(math.floor(diff_usage)) .. "%"
|
||||
awesome.emit_signal("update::cpu_usage_widget", math.floor(diff_usage + 0.5))
|
||||
|
||||
total_prev = total
|
||||
idle_prev = idle
|
||||
@@ -185,6 +186,7 @@ return function(widget, clock_mode)
|
||||
cpu_temp.container.cpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
|
||||
cpu_temp:set_bg(temp_color)
|
||||
cpu_temp.container.cpu_layout.label.text = math.floor(temp_num) .. "°C"
|
||||
awesome.emit_signal("update::cpu_temp_widget", temp_num, temp_icon)
|
||||
end
|
||||
)
|
||||
|
||||
@@ -205,9 +207,9 @@ return function(widget, clock_mode)
|
||||
average = average + cpu_freq[i]
|
||||
end
|
||||
average = math.floor(average / #cpu_freq)
|
||||
cpu_clock.container.cpu_layout.label.text = tonumber(average) .. "Mhz"
|
||||
cpu_clock.container.cpu_layout.label.text = average .. "Mhz"
|
||||
elseif clock_mode then
|
||||
cpu_clock.container.cpu_layout.label.text = tonumber(cpu_freq[clock_mode]) .. "Mhz"
|
||||
cpu_clock.container.cpu_layout.label.text = cpu_freq[clock_mode] .. "Mhz"
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
@@ -103,6 +103,7 @@ return function(widget)
|
||||
3,
|
||||
function(_, stdout)
|
||||
gpu_usage_widget.container.gpu_layout.label.text = stdout:gsub("\n", "") .. "%"
|
||||
awesome.emit_signal("update::gpu_usage_widget", tonumber(stdout))
|
||||
end
|
||||
)
|
||||
|
||||
@@ -131,6 +132,7 @@ return function(widget)
|
||||
gpu_temp_widget.container.gpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
|
||||
gpu_temp_widget:set_bg(temp_color)
|
||||
gpu_temp_widget.container.gpu_layout.label.text = tostring(temp_num) .. "°C"
|
||||
awesome.emit_signal("update::gpu_temp_widget", temp_num, temp_icon)
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
@@ -64,7 +64,10 @@ return function()
|
||||
|
||||
local MemTotal, MemFree, MemAvailable = stdout:match("(%d+)\n(%d+)\n(%d+)\n")
|
||||
|
||||
ram_widget.container.ram_layout.label.text = tostring(string.format("%.1f", ((MemTotal - MemAvailable) / 1024 / 1024)) .. "/" .. string.format("%.1f", (MemTotal / 1024 / 1024)) .. "GB"):gsub(",", ".")
|
||||
local ram_string = tostring(string.format("%.1f", ((MemTotal - MemAvailable) / 1024 / 1024)) .. "/" .. string.format("%.1f", (MemTotal / 1024 / 1024)) .. "GB"):gsub(",", ".")
|
||||
|
||||
ram_widget.container.ram_layout.label.text = ram_string
|
||||
awesome.emit_signal("update::ram_widget", math.floor(((MemTotal - MemAvailable) / MemTotal * 100) + 0.5))
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ return function(s)
|
||||
id = 'st'
|
||||
},
|
||||
strategy = "exact",
|
||||
layout = wibox.container.constraint,
|
||||
widget = wibox.container.constraint,
|
||||
id = "container"
|
||||
},
|
||||
widget = wibox.container.background,
|
||||
|
||||
Reference in New Issue
Block a user