Skip to content

Commit 85ed924

Browse files
author
copycat-killer
committed
quake: set default geometry only on first spawn
1 parent d747e16 commit 85ed924

File tree

7 files changed

+33
-30
lines changed

7 files changed

+33
-30
lines changed

util/quake.lua

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,22 @@ function quake:display()
5151
if not client and not self.visible then return end
5252

5353
if not client then
54-
-- The client does not exist, we spawn it
55-
awful.util.spawn(self.app .. " " .. string.format(self.argname, self.name),
56-
false, self.screen)
57-
return
54+
-- The client does not exist, we spawn it
55+
awful.util.spawn(self.app .. " " .. string.format(self.argname, self.name),
56+
false, self.screen)
57+
self.exist = true
58+
return
5859
end
5960

6061
-- Resize
6162
awful.client.floating.set(client, true)
6263
client.border_width = 0
6364
client.size_hints_honor = false
64-
client:geometry(self.geometry)
65+
if self.notexist then
66+
-- set default geometry only on first spawn
67+
client:geometry(self.geometry)
68+
self.notexist = false
69+
end
6570

6671
-- Not sticky and on top
6772
client.ontop = true

widgets/contrib/redshift.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ local setmetatable = setmetatable
1616
-- lain.widgets.contrib.redshift
1717
local redshift = {}
1818

19-
local attached = false -- true if attached to a widget
20-
local active = false -- true if redshift is active
21-
local running = false -- true if redshift was initialized
22-
local update_fnct = function() end -- Function that is run each time redshift is toggled. See redshift:attach().
23-
19+
local attached = false -- true if attached to a widget
20+
local active = false -- true if redshift is active
21+
local running = false -- true if redshift was initialized
22+
local update_fnct = function() end -- Function that is run each time redshift is toggled. See redshift:attach().
2423

2524
local function init()
2625
-- As there is no way to determine if redshift was previously

widgets/contrib/tpbat/smapi.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ local tonumber = tonumber
1616
local setmetatable = setmetatable
1717

1818
local smapi = {}
19-
2019
local apipath = "/sys/devices/platform/smapi"
2120

2221
-- Most are readable values, but some can be written to (not implemented, yet?)

widgets/mem.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
88
--]]
99

10-
local newtimer = require("lain.helpers").newtimer
10+
local newtimer = require("lain.helpers").newtimer
1111

12-
local wibox = require("wibox")
12+
local wibox = require("wibox")
1313

14-
local io = { lines = io.lines }
15-
local math = { floor = math.floor }
16-
local string = { gmatch = string.gmatch }
14+
local io = { lines = io.lines }
15+
local math = { floor = math.floor }
16+
local string = { gmatch = string.gmatch }
1717

18-
local setmetatable = setmetatable
18+
local setmetatable = setmetatable
1919

2020
-- Memory usage (ignoring caches)
2121
-- lain.widgets.mem

widgets/mpd.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ local escape_f = require("awful.util").escape
1414
local naughty = require("naughty")
1515
local wibox = require("wibox")
1616

17-
local os = { execute = os.execute,
18-
getenv = os.getenv }
19-
local math = { floor = math.floor }
17+
local os = { execute = os.execute,
18+
getenv = os.getenv }
19+
local math = { floor = math.floor }
2020
local mouse = mouse
21-
local string = { format = string.format,
22-
match = string.match,
23-
gmatch = string.gmatch }
21+
local string = { format = string.format,
22+
match = string.match,
23+
gmatch = string.gmatch }
2424

2525
local setmetatable = setmetatable
2626

widgets/pulseaudio.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
77
--]]
88

9-
local read_pipe = require("lain.helpers").read_pipe
10-
local newtimer = require("lain.helpers").newtimer
11-
local wibox = require("wibox")
9+
local read_pipe = require("lain.helpers").read_pipe
10+
local newtimer = require("lain.helpers").newtimer
11+
local wibox = require("wibox")
1212

13-
local string = { match = string.match,
14-
format = string.format }
13+
local string = { match = string.match,
14+
format = string.format }
1515

16-
local setmetatable = setmetatable
16+
local setmetatable = setmetatable
1717

1818
-- PulseAudio volume
1919
-- lain.widgets.pulseaudio

wiki

Submodule wiki updated from 7689c02 to 1a72051

0 commit comments

Comments
 (0)