wiki updated

This commit is contained in:
copycat-killer 2017-01-06 13:43:56 +01:00
parent 716595550f
commit d49431160a
2 changed files with 116 additions and 118 deletions

View File

@ -3,6 +3,7 @@
Licensed under GNU General Public License v2
* (c) 2016, Luke Bonham
* (c) 2015, unknown
--]]
@ -18,7 +19,6 @@ local setmetatable = setmetatable
local tostring = tostring
-- Quake-like Dropdown application spawn
-- Original version: https://awesomewm.org/wiki/Drop-down_terminal#Another_solution
local quake = {}
-- If you have a rule like "awful.client.setslave" for your terminals,
@ -26,6 +26,8 @@ local quake = {}
-- run into problems with focus.
function quake:display()
if self.followtag then self.screen = awful.screen.focused() end
-- First, we locate the client
local client = nil
local i = 0
@ -97,7 +99,7 @@ end
function quake:compute_size()
local geom = screen[self.screen].workarea
local width, height
if self.width <= 1 then width = math.floor(geom.width * self.width) end
if self.width <= 1 then width = math.floor(geom.width * self.width) - 2 * self.border end
if self.height <= 1 then height = math.floor(geom.height * self.height) end
local x, y
if self.horiz == "left" then x = geom.x
@ -125,7 +127,7 @@ function quake:new(config)
conf.height = conf.height or 0.25 -- height
conf.width = conf.width or 1 -- width
conf.vert = conf.vert or "top" -- top, bottom or center
conf.horiz = conf.horiz or "center" -- left, right or center
conf.horiz = conf.horiz or "left" -- left, right or center
local console = setmetatable(conf, { __index = quake })
capi.client.connect_signal("manage", function(c)
@ -142,9 +144,7 @@ function quake:new(config)
-- "Reattach" currently running quake application. This is in case awesome is restarted.
local reattach = capi.timer { timeout = 0 }
reattach:connect_signal("timeout", function()
if self.followtag then
self.screen = awful.screen.focused()
end
if self.followtag then self.screen = awful.screen.focused() end
reattach:stop()
console:display()
end)
@ -154,9 +154,7 @@ function quake:new(config)
end
function quake:toggle()
if self.followtag then
self.screen = awful.screen.focused()
end
if self.followtag then self.screen = awful.screen.focused() end
local current_tag = awful.tag.selected(self.screen)
if self.last_tag ~= current_tag and self.visible then
awful.client.movetotag(current_tag, self:display())

2
wiki

@ -1 +1 @@
Subproject commit 6e439e9a28174909c4ab0dd23eaf93785cc170e7
Subproject commit 855d23635ea54a66b246df2134b81b3961ea7d44