Bluetooth hotfix
This commit is contained in:
@@ -28,16 +28,12 @@ return function()
|
|||||||
interface = "org.freedesktop.DBus.Properties",
|
interface = "org.freedesktop.DBus.Properties",
|
||||||
path = object_path
|
path = object_path
|
||||||
}
|
}
|
||||||
|
awesome.emit_signal("bluetooth::scan")
|
||||||
if device.Name ~= "" and device.Name ~= nil then
|
if device.Name ~= nil or device.Alias ~= nil then
|
||||||
device_properties:connect_signal(function()
|
device_properties:connect_signal(function()
|
||||||
naughty.notification {
|
awesome.emit_signal("bluetooth::device_changed", device, battery)
|
||||||
title = "Bluetooth Device Connected",
|
|
||||||
message = device.Name,
|
|
||||||
icon = require("awful").util.getdir("config") .. "src/assets/icons/bluetooth/bluetooth.svg"
|
|
||||||
}
|
|
||||||
awesome.emit_signal("device_added", object_path, device, battery)
|
|
||||||
end, "PropertiesChanged")
|
end, "PropertiesChanged")
|
||||||
|
awesome.emit_signal("bluetooth::device_changed", device, battery)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -91,10 +87,16 @@ return function()
|
|||||||
"PropertiesChanged"
|
"PropertiesChanged"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
awesome.connect_signal(
|
||||||
|
"bluetooth::scan",
|
||||||
|
function()
|
||||||
|
Adapter:StartDiscovery()
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
AdapterProperties:connect_signal(
|
AdapterProperties:connect_signal(
|
||||||
function(data)
|
function(data)
|
||||||
if data.Powered ~= nil then
|
if data.Powered ~= nil then
|
||||||
awesome.emit_signal("state", data.Powered)
|
|
||||||
if data.Powered then
|
if data.Powered then
|
||||||
Adapter:StartDiscovery()
|
Adapter:StartDiscovery()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ awful.screen.connect_for_each_screen(
|
|||||||
require("src.modules.powermenu")(s)
|
require("src.modules.powermenu")(s)
|
||||||
require("src.modules.volume_osd")(s)
|
require("src.modules.volume_osd")(s)
|
||||||
require("src.modules.brightness_osd")(s)
|
require("src.modules.brightness_osd")(s)
|
||||||
|
require("src.modules.bluetooth_controller")(s)
|
||||||
require("src.modules.titlebar")
|
require("src.modules.titlebar")
|
||||||
require("src.modules.volume_controller")(s)
|
require("src.modules.volume_controller")(s)
|
||||||
require("src.modules.crylia_bar.init")(s)
|
require("src.modules.crylia_bar.init")(s)
|
||||||
|
|||||||
Reference in New Issue
Block a user