From: copycat-killer Date: Wed, 3 Aug 2016 15:38:51 +0000 (+0200) Subject: quake: set default geometry only on first spawn X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/85ed92417dfca8fbdcfc89b7efb5308edd4d1193 quake: set default geometry only on first spawn --- diff --git a/util/quake.lua b/util/quake.lua index ab412ac..5a55200 100644 --- a/util/quake.lua +++ b/util/quake.lua @@ -51,17 +51,22 @@ function quake:display() if not client and not self.visible then return end if not client then - -- The client does not exist, we spawn it - awful.util.spawn(self.app .. " " .. string.format(self.argname, self.name), - false, self.screen) - return + -- The client does not exist, we spawn it + awful.util.spawn(self.app .. " " .. string.format(self.argname, self.name), + false, self.screen) + self.exist = true + return end -- Resize awful.client.floating.set(client, true) client.border_width = 0 client.size_hints_honor = false - client:geometry(self.geometry) + if self.notexist then + -- set default geometry only on first spawn + client:geometry(self.geometry) + self.notexist = false + end -- Not sticky and on top client.ontop = true diff --git a/widgets/contrib/redshift.lua b/widgets/contrib/redshift.lua index 5ed9300..69247ee 100644 --- a/widgets/contrib/redshift.lua +++ b/widgets/contrib/redshift.lua @@ -16,11 +16,10 @@ local setmetatable = setmetatable -- lain.widgets.contrib.redshift local redshift = {} -local attached = false -- true if attached to a widget -local active = false -- true if redshift is active -local running = false -- true if redshift was initialized -local update_fnct = function() end -- Function that is run each time redshift is toggled. See redshift:attach(). - +local attached = false -- true if attached to a widget +local active = false -- true if redshift is active +local running = false -- true if redshift was initialized +local update_fnct = function() end -- Function that is run each time redshift is toggled. See redshift:attach(). local function init() -- As there is no way to determine if redshift was previously diff --git a/widgets/contrib/tpbat/smapi.lua b/widgets/contrib/tpbat/smapi.lua index c7f093e..271d9c2 100644 --- a/widgets/contrib/tpbat/smapi.lua +++ b/widgets/contrib/tpbat/smapi.lua @@ -16,7 +16,6 @@ local tonumber = tonumber local setmetatable = setmetatable local smapi = {} - local apipath = "/sys/devices/platform/smapi" -- Most are readable values, but some can be written to (not implemented, yet?) diff --git a/widgets/mem.lua b/widgets/mem.lua index 99d91c7..aede803 100644 --- a/widgets/mem.lua +++ b/widgets/mem.lua @@ -7,15 +7,15 @@ --]] -local newtimer = require("lain.helpers").newtimer +local newtimer = require("lain.helpers").newtimer -local wibox = require("wibox") +local wibox = require("wibox") -local io = { lines = io.lines } -local math = { floor = math.floor } -local string = { gmatch = string.gmatch } +local io = { lines = io.lines } +local math = { floor = math.floor } +local string = { gmatch = string.gmatch } -local setmetatable = setmetatable +local setmetatable = setmetatable -- Memory usage (ignoring caches) -- lain.widgets.mem diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 6a327b0..8568764 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -14,13 +14,13 @@ local escape_f = require("awful.util").escape local naughty = require("naughty") local wibox = require("wibox") -local os = { execute = os.execute, - getenv = os.getenv } -local math = { floor = math.floor } +local os = { execute = os.execute, + getenv = os.getenv } +local math = { floor = math.floor } local mouse = mouse -local string = { format = string.format, - match = string.match, - gmatch = string.gmatch } +local string = { format = string.format, + match = string.match, + gmatch = string.gmatch } local setmetatable = setmetatable diff --git a/widgets/pulseaudio.lua b/widgets/pulseaudio.lua index 17fdb9c..c2686d8 100644 --- a/widgets/pulseaudio.lua +++ b/widgets/pulseaudio.lua @@ -6,14 +6,14 @@ --]] -local read_pipe = require("lain.helpers").read_pipe -local newtimer = require("lain.helpers").newtimer -local wibox = require("wibox") +local read_pipe = require("lain.helpers").read_pipe +local newtimer = require("lain.helpers").newtimer +local wibox = require("wibox") -local string = { match = string.match, - format = string.format } +local string = { match = string.match, + format = string.format } -local setmetatable = setmetatable +local setmetatable = setmetatable -- PulseAudio volume -- lain.widgets.pulseaudio diff --git a/wiki b/wiki index 7689c02..1a72051 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 7689c026b9b2a1a7d2582c48700aace3983b8711 +Subproject commit 1a72051053b009e74f7a50e5cff784829eda370c