rewrote a lot of stuff especially the bluetooth module. fixed some errors
This commit is contained in:
@@ -4,15 +4,19 @@
|
||||
-- Awesome Libs
|
||||
local naughty = require("naughty")
|
||||
|
||||
if awesome.startup_errors then
|
||||
local capi = {
|
||||
awesome = awesome,
|
||||
}
|
||||
|
||||
if capi.awesome.startup_errors then
|
||||
naughty.notify({ preset = naughty.config.presets.critical,
|
||||
title = "Oops, there were errors during startup!",
|
||||
text = awesome.startup_errors })
|
||||
text = capi.awesome.startup_errors })
|
||||
end
|
||||
|
||||
do
|
||||
local in_error = false
|
||||
awesome.connect_signal(
|
||||
capi.awesome.connect_signal(
|
||||
"debug::error",
|
||||
function(err)
|
||||
if in_error then
|
||||
|
||||
@@ -11,6 +11,11 @@ local wibox = require("wibox")
|
||||
|
||||
local rubato = require("src.lib.rubato")
|
||||
|
||||
local capi = {
|
||||
client = client,
|
||||
screen = screen,
|
||||
}
|
||||
|
||||
local icondir = awful.util.getdir("config") .. "src/assets/icons/notifications/"
|
||||
|
||||
naughty.config.defaults.ontop = true
|
||||
@@ -389,7 +394,7 @@ naughty.connect_signal(
|
||||
end
|
||||
-- Raise the client on click
|
||||
if key == 1 then
|
||||
for _, client in ipairs(client.get()) do
|
||||
for _, client in ipairs(capi.client.get()) do
|
||||
if client.name:match(n.app_name) then
|
||||
if not client:isvisible() and client.first_tag then
|
||||
client.first_tag:view_only()
|
||||
@@ -406,7 +411,7 @@ naughty.connect_signal(
|
||||
notification = n,
|
||||
timeout = 5,
|
||||
type = "notification",
|
||||
screen = screen.primary,
|
||||
screen = capi.screen.primary,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 10)
|
||||
end,
|
||||
|
||||
@@ -6,24 +6,32 @@ local gears = require("gears")
|
||||
local color = require("src.lib.color")
|
||||
local rubato = require("src.lib.rubato")
|
||||
|
||||
screen.connect_signal(
|
||||
local capi = {
|
||||
awesome = awesome,
|
||||
mouse = mouse,
|
||||
screen = screen,
|
||||
client = client,
|
||||
tag = tag
|
||||
}
|
||||
|
||||
capi.screen.connect_signal(
|
||||
"added",
|
||||
function()
|
||||
awesome.restart()
|
||||
capi.awesome.restart()
|
||||
end
|
||||
)
|
||||
|
||||
screen.connect_signal(
|
||||
capi.screen.connect_signal(
|
||||
"removed",
|
||||
function()
|
||||
awesome.restart()
|
||||
capi.awesome.restart()
|
||||
end
|
||||
)
|
||||
|
||||
client.connect_signal(
|
||||
capi.client.connect_signal(
|
||||
"manage",
|
||||
function(c)
|
||||
if awesome.startup and not c.size_hints.user_porition and not c.size_hints.program_position then
|
||||
if capi.awesome.startup and not c.size_hints.user_porition and not c.size_hints.program_position then
|
||||
awful.placement.no_offscreen(c)
|
||||
end
|
||||
c.shape = function(cr, width, height)
|
||||
@@ -42,7 +50,7 @@ client.connect_signal(
|
||||
end
|
||||
)
|
||||
|
||||
client.connect_signal(
|
||||
capi.client.connect_signal(
|
||||
'unmanage',
|
||||
function(c)
|
||||
if #awful.screen.focused().clients > 0 then
|
||||
@@ -57,7 +65,7 @@ client.connect_signal(
|
||||
end
|
||||
)
|
||||
|
||||
tag.connect_signal(
|
||||
capi.tag.connect_signal(
|
||||
'property::selected',
|
||||
function(c)
|
||||
if #awful.screen.focused().clients > 0 then
|
||||
@@ -257,7 +265,7 @@ function Hover_signal(widget, bg_override, fg_override, border_override, icon_ov
|
||||
if icon and widget.icon and icon_override and icon_override_hover then
|
||||
widget.icon.image = gears.color.recolor_image(icon, icon_override_hover)
|
||||
end
|
||||
local w = mouse.current_wibox
|
||||
local w = capi.mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
|
||||
Reference in New Issue
Block a user