From 1adab3e040363e2855d9b11972f2a1e11ec9b071 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Tue, 19 Jun 2012 02:57:00 +0200 Subject: scratch: port scratch module to lua 5.2 --- scratch/pad.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scratch/pad.lua') 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 -- cgit v1.2.3