Compare commits

...

2 Commits

Author SHA1 Message Date
a39a14c61b that'll teach me not to test v2 2022-08-25 15:16:28 +10:00
ae04bc4375 that'll teach me not to test 2022-08-25 15:15:00 +10:00

View File

@ -8,7 +8,7 @@ local longpress = require("awesome-longpress")
local navbar = { local navbar = {
iconSize = 96, iconSize = 96,
iconPath = gears.filesystem.get_configuration_dir() .. "/awesome-navbar/", iconPath = gears.filesystem.get_configuration_dir() .. "/awesome-navbar/",
navbar.launcher = "xfce4-appfinder" launcher = "xfce4-appfinder"
} }
function navbar.new(s) function navbar.new(s)
@ -40,19 +40,19 @@ function navbar.new(s)
awful.spawn(navbar.launcher) awful.spawn(navbar.launcher)
end) end)
local navbar = awful.wibar({ local rnavbar = awful.wibar({
ontop = true, ontop = true,
screen = s screen = s
}) })
function navbar.reflow() function rnavbar.reflow()
position = landscape and "left" or "bottom", rnavbar.position = landscape and "left" or "bottom"
height = (portrait and navbar.iconSize) or nil, rnavbar.height = (portrait and navbar.iconSize) or nil
width = (landscape and navbar.iconSize) or nil, rnavbar.width = (landscape and navbar.iconSize) or nil
navbar:setup({ rnavbar:setup({
layout = landscape and wibox.layout.ratio.vertical or wibox.layout.ratio.horizontal, launcher_button, switcher_button, kb_button layout = landscape and wibox.layout.ratio.vertical or wibox.layout.ratio.horizontal, launcher_button, switcher_button, kb_button
}) })
end end
navbar.reflow() rnavbar.reflow()
s.keyboard = awful.wibar({ s.keyboard = awful.wibar({
height = s.geometry.height * 0.25, height = s.geometry.height * 0.25,
@ -68,5 +68,5 @@ function navbar.new(s)
layout = wibox.layout.ratio.horizontal, layout = wibox.layout.ratio.horizontal,
vkbd vkbd
}) })
return navbar return rnavbar
end end