Add new window switcher on super+tab and smaller fixes

This commit is contained in:
Crylia
2022-06-16 00:30:56 +02:00
parent 454c80336c
commit fb22b50a97
13 changed files with 358 additions and 68 deletions

View File

@@ -0,0 +1,26 @@
local awful = require("awful")
local watch = awful.widget.watch
watch(
[[ bash -c "cat /proc/cpuinfo | grep "MHz" | awk '{print int($4)}'" ]],
3,
function(_, stdout)
local cpu_freq = {}
for value in stdout:gmatch("%d+") do
table.insert(cpu_freq, value)
end
local average = 0
if User_config.clock_mode == "average" then
for i = 1, #cpu_freq do
average = average + cpu_freq[i]
end
average = math.floor(average / #cpu_freq)
awesome.emit_signal("update::cpu_freq_average", average)
elseif User_config.clock_mode then
awesome.emit_signal("update::cpu_freq_core", cpu_freq[User_config.clock_mode])
end
end
)