Readded picom to autostart, fix #23

This commit is contained in:
Kievits Rene
2022-06-02 02:24:10 +02:00
parent 904870ee28
commit 688885be92
2 changed files with 18 additions and 9 deletions

View File

@@ -32,7 +32,7 @@ user_vars = {
-- Write the terminal command to start anything here -- Write the terminal command to start anything here
autostart = { autostart = {
"" "picom --experimental-backends"
}, },
-- Type 'ip a' and check your wlan and ethernet name -- Type 'ip a' and check your wlan and ethernet name

View File

@@ -103,6 +103,7 @@ return function(widget)
3, 3,
function(_, stdout) function(_, stdout)
gpu_usage_widget.container.gpu_layout.label.text = stdout:gsub("\n", "") .. "%" gpu_usage_widget.container.gpu_layout.label.text = stdout:gsub("\n", "") .. "%"
awesome.emit_signal("update::gpu_usage_widget", tonumber(stdout))
end end
) )
@@ -116,21 +117,29 @@ return function(widget)
local temp_color local temp_color
local temp_num = tonumber(stdout) local temp_num = tonumber(stdout)
if temp_num < 50 then if temp_num then
if temp_num < 50 then
temp_color = color["Green200"]
temp_icon = icon_dir .. "thermometer-low.svg"
elseif temp_num >= 50 and temp_num < 80 then
temp_color = color["Orange200"]
temp_icon = icon_dir .. "thermometer.svg"
elseif temp_num >= 80 then
temp_color = color["Red200"]
temp_icon = icon_dir .. "thermometer-high.svg"
end
else
temp_num = "NaN"
temp_color = color["Green200"] temp_color = color["Green200"]
temp_icon = icon_dir .. "thermometer-low.svg" temp_icon = icon_dir .. "thermometer-low.svg"
elseif temp_num >= 50 and temp_num < 80 then
temp_color = color["Orange200"]
temp_icon = icon_dir .. "thermometer.svg"
elseif temp_num >= 80 then
temp_color = color["Red200"]
temp_icon = icon_dir .. "thermometer-high.svg"
end end
Hover_signal(gpu_temp_widget, temp_color, color["Grey900"]) Hover_signal(gpu_temp_widget, temp_color, color["Grey900"])
gpu_temp_widget.container.gpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon) 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:set_bg(temp_color)
gpu_temp_widget.container.gpu_layout.label.text = tostring(temp_num) .. "°C" gpu_temp_widget.container.gpu_layout.label.text = tostring(temp_num) .. "°C"
awesome.emit_signal("update::gpu_temp_widget", temp_num, temp_icon)
end end
) )