diff options
Diffstat (limited to 'awesome/.config/awesome/rc.lua')
-rw-r--r-- | awesome/.config/awesome/rc.lua | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index 5dd0c1a..392dbae 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -1,5 +1,6 @@ -- Standard library local io = {open = io.open} +local math = {floor = math.floor, pi = math.pi} local pi = math.pi -- Awesome library @@ -173,7 +174,7 @@ end -- Menubar configuration -- Set geometry so it would overlay the wibox -menubar.geometry = {y = 0, height = 28} +menubar.geometry = {y = 0, height = beautiful.menu_height} -- Set the terminal for applications that require it menubar.utils.terminal = terminal -- }}} @@ -335,14 +336,16 @@ local function restore() end local function arrow(fg, bg) - local img = cairo.ImageSurface.create(cairo.Format.ARGB32, 14, 28) + local height = beautiful.menu_height + local width = height / 2 + local img = cairo.ImageSurface.create(cairo.Format.ARGB32, width, height) local cr = cairo.Context(img) cr:set_source(gears.color(bg)) - cr:rectangle(0, 0, 14, 28) + cr:rectangle(0, 0, width, height) cr:fill() cr:set_source(gears.color(fg)) local trigon = shape.transform(shape.isosceles_triangle) - trigon:translate(0, 14):rotate_at(14, 14, pi/2)(cr, 28, 14) + trigon:translate(0, width):rotate_at(width, width, pi/2)(cr, height, width) cr:fill() return img end @@ -354,13 +357,10 @@ awful.screen.connect_for_each_screen(function (s) set_wallpaper(s) -- Each screen has its own tag table. -- Wallpaper - if s.geometry.width > s.geometry.height then - awful.tag({"1", "2", "3", "4", "5", "6", "7", "8", "9"}, - s, awful.layout.suit.fair) - else - awful.tag({"1", "2", "3", "4", "5", "6", "7", "8", "9"}, - s, awful.layout.suit.tile) - for _, t in ipairs(s.tags) do t.master_count = 0 end + awful.tag({"1", "2", "3", "4", "5", "6", "7", "8", "9"}, + s, awful.layout.suit.tile.bottom) + for _, t in ipairs(s.tags) do + t.master_count = math.floor(s.geometry.width / 800) end -- Create a promptbox for each screen @@ -388,7 +388,9 @@ awful.screen.connect_for_each_screen(function (s) -- ) -- Create the wibox - s.mywibox = awful.wibar{position = "top", height = "28", screen = s} + s.mywibox = awful.wibar{position = "top", + height = beautiful.menu_height, + screen = s} -- Virtual keyboard --s.vkb = boardary(s) @@ -818,7 +820,7 @@ client.connect_signal( end) ) - awful.titlebar(c, {size=28}):setup{ + awful.titlebar(c, {size=beautiful.menu_height}):setup{ {-- Left awful.titlebar.widget.closebutton(c), awful.titlebar.widget.ontopbutton(c), |