actually works now, maybe

This commit is contained in:
Izaya 2022-08-25 16:25:43 +10:00
parent d60d254ab4
commit a9e8f53b5b

View File

@ -4,6 +4,7 @@ local wibox = require("wibox")
local switcherpopup = require("awesome-switcherpopup") local switcherpopup = require("awesome-switcherpopup")
local launcherpopup = require("awesome-launcherpopup") local launcherpopup = require("awesome-launcherpopup")
local longpress = require("awesome-longpress") local longpress = require("awesome-longpress")
local vkbd = require("vkbd")
local navbar = { local navbar = {
iconSize = 96, iconSize = 96,
@ -41,18 +42,15 @@ function navbar.new(s)
end) end)
local rnavbar = awful.wibar({ local rnavbar = awful.wibar({
position = landscape and "left" or "bottom",
height = (portrait and 96) or nil,
width = (landscape and 96) or nil,
ontop = true, ontop = true,
screen = s screen = s
}) })
function rnavbar.reflow()
rnavbar.position = landscape and "left" or "bottom"
rnavbar.height = (portrait and navbar.iconSize) or nil
rnavbar.width = (landscape and navbar.iconSize) or nil
rnavbar: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
rnavbar.reflow()
s.keyboard = awful.wibar({ s.keyboard = awful.wibar({
height = s.geometry.height * 0.25, height = s.geometry.height * 0.25,
@ -64,6 +62,7 @@ function navbar.new(s)
}) })
vkbd.spacing = 1 vkbd.spacing = 1
vkbd.init("ansi")
s.keyboard:setup ({ s.keyboard:setup ({
layout = wibox.layout.ratio.horizontal, layout = wibox.layout.ratio.horizontal,
vkbd vkbd