diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2012-06-19 02:57:00 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2012-06-19 02:57:00 +0200 |
commit | 1adab3e040363e2855d9b11972f2a1e11ec9b071 (patch) | |
tree | 8da209ccd59ca6133d46a072113942651f04f0c8 /scratch/pad.lua | |
parent | ac9c2f45592980138cb632c49f6c213c67a8fef9 (diff) | |
download | awesome-configs-1adab3e040363e2855d9b11972f2a1e11ec9b071.tar.xz |
scratch: port scratch module to lua 5.2
Diffstat (limited to 'scratch/pad.lua')
-rw-r--r-- | scratch/pad.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scratch/pad.lua b/scratch/pad.lua index a632f38..c6f06cd 100644 --- a/scratch/pad.lua +++ b/scratch/pad.lua @@ -33,7 +33,8 @@ local capi = { } -- Scratchpad: basic scratchpad manager for the awesome window manager -module("scratch.pad") +local pad = {} -- module scratch.pad + local scratchpad = {} @@ -48,7 +49,7 @@ end -- Scratch the focused client, or un-scratch and tile it. If another -- client is already scratched, replace it with the focused client. -function set(c, width, height, sticky, screen) +function pad.set(c, width, height, sticky, screen) width = width or 0.50 height = height or 0.50 sticky = sticky or false @@ -103,7 +104,7 @@ end -- Move the scratchpad to the current workspace, focus and raise it -- when it's hidden, or hide it when it's visible. -function toggle(screen) +function pad.toggle(screen) screen = screen or capi.mouse.screen -- Check if we have a client on storage, @@ -128,3 +129,5 @@ function toggle(screen) end end end + +return pad |