From 5bed197f0116581410cda2da850a1001a3e0ef25 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Thu, 26 Nov 2009 23:41:34 +0100 Subject: rc.lua: upgraded to awesome 3.4.2 --- osk.lua | 18 +++++++++--------- rc.lua | 2 +- scratchpad.lua | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/osk.lua b/osk.lua index 4ad7d2c..d4f5bf4 100644 --- a/osk.lua +++ b/osk.lua @@ -35,8 +35,8 @@ local capi = { module("osk") -- Variable definitions -local initied = false -local keycodes = { +local kbd = {} +kbd.codes = { q=24, w=25, e=26, r=27, t=28, z=52, u=30, i=31, o=32, p=33, ["."]=60, a=38, s=39, d=40, f=41, g=42, h=43, j=44, k=45, l=46, Caps=66, y=29, x=53, c=54, v=55, b=56, n=57, m=58, Spc=65, Ret=36, Del=22, @@ -55,8 +55,8 @@ local function create_button_row(...) w.text = util.escape(tostring(i)) w:buttons(util.table.join( button({ }, 1, nil, function () - capi.fake_input("key_press", keycodes[i]) - capi.fake_input("key_release", keycodes[i]) + capi.fake_input("key_press", kbd.codes[i]) + capi.fake_input("key_release", kbd.codes[i]) end) )) @@ -68,8 +68,8 @@ end -- Create a wibox holding OSK rows and toggle its visibility setmetatable(_M, { __call = function (_, pos, scr) - if not inited then - kbd = wibox({ + if not kbd.init then + kbd.box = wibox({ height = 100, position = pos or "bottom", screen = scr or capi.screen.count(), @@ -82,9 +82,9 @@ setmetatable(_M, { __call = function (_, pos, scr) layout = layout.vertical.flex } }) - inited = true - kbd.visible = false + kbd.init = true + kbd.box.visible = false end - kbd.visible = not kbd.visible + kbd.box.visible = not kbd.box.visible end }) diff --git a/rc.lua b/rc.lua index d535e29..a595b0b 100644 --- a/rc.lua +++ b/rc.lua @@ -1,6 +1,6 @@ -- {{{ License -- --- Awesome configuration, using awesome 3.4.1 on Arch GNU/Linux +-- Awesome configuration, using awesome 3.4.2 on Arch GNU/Linux -- * Adrian C. -- Screenshot: http://sysphere.org/gallery/snapshots diff --git a/scratchpad.lua b/scratchpad.lua index b5daca9..72d546d 100644 --- a/scratchpad.lua +++ b/scratchpad.lua @@ -16,9 +16,9 @@ -- Parameters: -- c - Client to scratch or un-scratch -- width - Width in absolute pixels, or width percentage --- when < 1 (0.50 (50% of the screen) by default) +-- when <= 1 (0.50 (50% of the screen) by default) -- height - Height in absolute pixels, or height percentage --- when < 1 (0.50 (50% of the screen) by default) +-- when <= 1 (0.50 (50% of the screen) by default) -- sticky - Visible on all tags, false by default -- screen - Screen (optional), mouse.screen by default --------------------------------------------------------------- @@ -51,8 +51,8 @@ function set(c, width, height, sticky, screen) -- Scratchpad geometry and placement local screengeom = capi.screen[screen].workarea - if width < 1 then width = screengeom.width * width end - if height < 1 then height = screengeom.height * height end + if width <= 1 then width = screengeom.width * width end + if height <= 1 then height = screengeom.height * height end c:geometry({ -- Client is always centered on screen x = screengeom.x + (screengeom.width - width) / 2, -- cgit v1.2.3