rewrote a lot of stuff especially the bluetooth module. fixed some errors

This commit is contained in:
Rene Kievits
2022-09-21 21:10:17 +02:00
parent 3d8b240ef0
commit b5c6dc31f7
59 changed files with 1138 additions and 334 deletions

View File

@@ -1,25 +1,32 @@
local awful = require("awful")
local capi = {
awesome = awesome,
}
BACKLIGHT_MAX_BRIGHTNESS = 0
BACKLIGHT_SEPS = 0
awful.spawn.easy_async_with_shell(
"pkexec xfpm-power-backlight-helper --get-max-brightness",
function(stdout)
BACKLIGHT_MAX_BRIGHTNESS = tonumber(stdout)
BACKLIGHT_SEPS = BACKLIGHT_MAX_BRIGHTNESS / 100
BACKLIGHT_SEPS = BACKLIGHT_MAX_BRIGHTNESS / 100 * 2
BACKLIGHT_SEPS = math.floor(BACKLIGHT_SEPS)
end
)
awesome.connect_signal(
capi.awesome.connect_signal(
"brightness::update",
function()
awful.spawn.easy_async_with_shell(
"pkexec xfpm-power-backlight-helper --get-brightness",
function(value)
awesome.emit_signal("brightness::get", math.floor((tonumber(value) - 1) / (BACKLIGHT_MAX_BRIGHTNESS - 1) * 100))
awesome.emit_signal("brightness::rerun")
capi.awesome.emit_signal("brightness::get",
math.floor((tonumber(value) - 1) / (BACKLIGHT_MAX_BRIGHTNESS - 1) * 100))
capi.awesome.emit_signal("brightness::rerun")
end
)
end
)
capi.awesome.emit_signal("brightness::update")