added automatic menubar height on show
This commit is contained in:
parent
cbd3023ff2
commit
5c469b1ca7
@ -113,6 +113,10 @@ menubar.geometry = { width = nil,
|
|||||||
x = nil,
|
x = nil,
|
||||||
y = nil }
|
y = nil }
|
||||||
|
|
||||||
|
menubar.geometry_override = { width = nil,
|
||||||
|
height = nil,
|
||||||
|
x = nil,
|
||||||
|
y = nil }
|
||||||
--- Width of blank space left in the right side.
|
--- Width of blank space left in the right side.
|
||||||
-- @tfield number right_margin
|
-- @tfield number right_margin
|
||||||
menubar.right_margin = theme.xresources.apply_dpi(8)
|
menubar.right_margin = theme.xresources.apply_dpi(8)
|
||||||
@ -538,6 +542,7 @@ function menubar.show(scr)
|
|||||||
|
|
||||||
-- Set position and size
|
-- Set position and size
|
||||||
local scrgeom = scr.workarea
|
local scrgeom = scr.workarea
|
||||||
|
menubar.geometry = { height = menubar.geometry_override.height or awful.screen.focused().geometry.height, width = menubar.geometry_override.width or 200, x = (menubar.geometry_override.x or 0) + awful.screen.focused().geometry.x , y = menubar.geometry_override.y}
|
||||||
local geometry = menubar.geometry
|
local geometry = menubar.geometry
|
||||||
instance.geometry = {x = geometry.x or scrgeom.x,
|
instance.geometry = {x = geometry.x or scrgeom.x,
|
||||||
y = geometry.y or scrgeom.y,
|
y = geometry.y or scrgeom.y,
|
||||||
|
5
rc.lua
5
rc.lua
@ -14,10 +14,7 @@ local beautiful = require("beautiful")
|
|||||||
-- Notification library
|
-- Notification library
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
local menubar = require("menubar")
|
local menubar = require("menubar")
|
||||||
local menu_width = 200
|
menubar.geometry_override = { width = 200, x = 20 }
|
||||||
local tmp_screen = { 1080, 1920 }
|
|
||||||
menubar.geometry = { height = tmp_screen[1], width = menu_width, x = 20 }
|
|
||||||
|
|
||||||
|
|
||||||
--local hotkeys_popup = require("awful.hotkeys_popup")
|
--local hotkeys_popup = require("awful.hotkeys_popup")
|
||||||
local hotkeys = require("awful.hotkeys_popup");
|
local hotkeys = require("awful.hotkeys_popup");
|
||||||
|
Loading…
Reference in New Issue
Block a user