make stuff more accessible for other libs maybe
This commit is contained in:
parent
a9e8f53b5b
commit
53c7b207f6
14
init.lua
14
init.lua
@ -9,20 +9,20 @@ local vkbd = require("vkbd")
|
|||||||
local navbar = {
|
local navbar = {
|
||||||
iconSize = 96,
|
iconSize = 96,
|
||||||
iconPath = gears.filesystem.get_configuration_dir() .. "/awesome-navbar/",
|
iconPath = gears.filesystem.get_configuration_dir() .. "/awesome-navbar/",
|
||||||
launcher = "xfce4-appfinder"
|
launcher = launcher or "xfce4-appfinder"
|
||||||
}
|
}
|
||||||
|
|
||||||
function navbar.new(s)
|
function navbar.new(s)
|
||||||
local landscape = s.geometry.width > s.geometry.height
|
local landscape = s.geometry.width > s.geometry.height
|
||||||
local portrait = not landscape
|
local portrait = not landscape
|
||||||
local tasklist = switcherpopup.new(s)
|
s.tasklist = switcherpopup.new(s)
|
||||||
local launcher = launcherpopup.new(s)
|
s.launcher = launcherpopup.new(s)
|
||||||
local switcher_button = wibox.container.place(awful.widget.button({image = navbar.iconPath .. "/switcher.svg"}), "center", "center")
|
local switcher_button = wibox.container.place(awful.widget.button({image = navbar.iconPath .. "/switcher.svg"}), "center", "center")
|
||||||
switcher_button:buttons(gears.table.join(
|
switcher_button:buttons(gears.table.join(
|
||||||
switcher_button:buttons(),
|
switcher_button:buttons(),
|
||||||
awful.button({}, 1, nil, function()
|
awful.button({}, 1, nil, function()
|
||||||
launcher:hide()
|
s.launcher:hide()
|
||||||
tasklist:toggle()
|
s.tasklist:toggle()
|
||||||
end)
|
end)
|
||||||
))
|
))
|
||||||
local kb_button = wibox.container.place(awful.widget.button({image = navbar.iconPath .. "/keyboard.svg"}), "center", "center")
|
local kb_button = wibox.container.place(awful.widget.button({image = navbar.iconPath .. "/keyboard.svg"}), "center", "center")
|
||||||
@ -34,8 +34,8 @@ function navbar.new(s)
|
|||||||
))
|
))
|
||||||
local launcher_button = wibox.container.place(awful.widget.button({image = navbar.iconPath .. "/launcher.svg"}), "center", "center")
|
local launcher_button = wibox.container.place(awful.widget.button({image = navbar.iconPath .. "/launcher.svg"}), "center", "center")
|
||||||
longpress.add(launcher_button,function()
|
longpress.add(launcher_button,function()
|
||||||
tasklist:hide()
|
s.tasklist:hide()
|
||||||
launcher:toggle()
|
s.launcher:toggle()
|
||||||
end,
|
end,
|
||||||
function()
|
function()
|
||||||
awful.spawn(navbar.launcher)
|
awful.spawn(navbar.launcher)
|
||||||
|
Loading…
Reference in New Issue
Block a user