X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/5584f209717d743d8ca054bda83e67819366383a..1bd178f68757099e6c9ccde1992ca5d519ccb8e5:/util/quake.lua diff --git a/util/quake.lua b/util/quake.lua index be9258c..e54b664 100644 --- a/util/quake.lua +++ b/util/quake.lua @@ -10,7 +10,8 @@ local awful = require("awful") local capi = { client = client, mouse = mouse, screen = screen, - timer = timer } + timer = timer or require("gears.timer") } +local math = { floor = math.floor } local string = string local pairs = pairs @@ -52,8 +53,9 @@ function quake:display() if not client then -- The client does not exist, we spawn it - awful.util.spawn(self.app .. " " .. string.format(self.argname, self.name) .. - " " .. self.extra, false, self.screen) + awful.util.spawn(string.format("%s %s %s", self.app, + string.format(self.argname, self.name), self.extra), + false, self.screen) self.notexist = true return end @@ -112,8 +114,8 @@ function quake:new(config) -- Compute size local geom = capi.screen[conf.screen].workarea - if width <= 1 then width = geom.width * width end - if height <= 1 then height = geom.height * height end + if width <= 1 then width = math.floor(geom.width * width) end + if height <= 1 then height = math.floor(geom.height * height) end local x, y if horiz == "left" then x = geom.x elseif horiz == "right" then x = geom.width + geom.x - width