summaryrefslogtreecommitdiff
path: root/scratch
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2012-06-19 00:57:00 (GMT)
committerAdrian C. (anrxc) <anrxc@sysphere.org>2012-06-19 00:57:00 (GMT)
commit1adab3e040363e2855d9b11972f2a1e11ec9b071 (patch)
tree8da209ccd59ca6133d46a072113942651f04f0c8 /scratch
parentac9c2f45592980138cb632c49f6c213c67a8fef9 (diff)
downloadawesome-configs-1adab3e040363e2855d9b11972f2a1e11ec9b071.tar.xz
scratch: port scratch module to lua 5.2
Diffstat (limited to 'scratch')
-rw-r--r--scratch/drop.lua5
-rw-r--r--scratch/init.lua8
-rw-r--r--scratch/pad.lua9
3 files changed, 14 insertions, 8 deletions
diff --git a/scratch/drop.lua b/scratch/drop.lua
index 3f7e4cd..2c7e214 100644
--- a/scratch/drop.lua
+++ b/scratch/drop.lua
@@ -34,7 +34,8 @@ local capi = {
}
-- Scratchdrop: drop-down applications manager for the awesome window manager
-module("scratch.drop")
+local drop = {} -- module scratch.drop
+
local dropdown = {}
@@ -126,4 +127,4 @@ function toggle(prog, vert, horiz, width, height, sticky, screen)
end
end
-setmetatable(_M, { __call = function(_, ...) return toggle(...) end })
+return setmetatable(drop, { __call = function(_, ...) return toggle(...) end })
diff --git a/scratch/init.lua b/scratch/init.lua
index eb037fc..f3b3e7e 100644
--- a/scratch/init.lua
+++ b/scratch/init.lua
@@ -6,7 +6,9 @@
-- * http://sam.zoy.org/wtfpl/COPYING
---------------------------------------------------------------
-require("scratch.pad")
-require("scratch.drop")
+local scratch = {} -- module scratch
-module("scratch")
+scratch.pad = require("scratch.pad")
+scratch.drop = require("scratch.drop")
+
+return scratch
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