diff --git a/awesome/src/theme/user_variables.lua b/awesome/src/theme/user_variables.lua index 24d7a56..5f4b264 100644 --- a/awesome/src/theme/user_variables.lua +++ b/awesome/src/theme/user_variables.lua @@ -32,7 +32,7 @@ user_vars = { -- Write the terminal command to start anything here autostart = { - "" + "picom --experimental-backends" }, -- Type 'ip a' and check your wlan and ethernet name diff --git a/awesome/src/widgets/gpu_info.lua b/awesome/src/widgets/gpu_info.lua index 69b88c9..7bb241a 100644 --- a/awesome/src/widgets/gpu_info.lua +++ b/awesome/src/widgets/gpu_info.lua @@ -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 ) @@ -116,21 +117,29 @@ return function(widget) local temp_color 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_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 - 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: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 )