diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-12-04 00:36:39 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-12-04 00:36:39 +0100 |
commit | fd4705821ca844f379986a6142ea97d671f5eab8 (patch) | |
tree | 9902a6f19064a2ed89a55a66b6eed542d9dbe7b6 /rc.lua | |
parent | 22eda10d0fc1c10279434e39b11ce565fbe79b2d (diff) | |
download | awesome-configs-fd4705821ca844f379986a6142ea97d671f5eab8.tar.xz |
rc.lua: import OSK with pcall, when called the first time
Variable boosk (boolean osk) controlls if osk() gets called or
imported. Now OSK doesn't sit in memory, since it could get called
seldom, like once in a week.
Diffstat (limited to 'rc.lua')
-rw-r--r-- | rc.lua | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -15,7 +15,6 @@ require("awful") require("awful.rules") require("awful.autofocus") -- User libraries -require("osk") require("vicious") require("teardrop") require("scratchpad") @@ -359,7 +358,9 @@ globalkeys = awful.util.table.join( awful.key({}, "#244", function () exec("sudo /usr/sbin/pm-hibernate") end), awful.key({}, "#150", function () exec("sudo /usr/sbin/pm-suspend") end), awful.key({}, "#225", function () exec("pypres.py") end), - awful.key({}, "#157", function () osk() end), + awful.key({}, "#157", function () if boosk then osk() + else boosk, osk = pcall(require, "osk") end + end), -- }}} -- {{{ Prompt menus @@ -517,7 +518,8 @@ awful.rules.rules = { { rule = { class = "Emacs", instance = "emacs" }, properties = { tag = tags[screen.count()][2] } }, { rule = { class = "Emacs", instance = "_Remember_" }, - properties = { floating = true } }, + properties = { floating = true }, + callback = awful.titlebar.add }, { rule = { class = "Xmessage", instance = "xmessage" }, properties = { floating = true }, callback = awful.titlebar.add }, @@ -562,8 +564,8 @@ client.add_signal("manage", function (c, startup) if not startup then awful.client.setslave(c) - if not c.size_hints.user_position - and not c.size_hints.program_position then + if not c.size_hints.program_position + and not c.size_hints.user_position then awful.placement.no_overlap(c) awful.placement.no_offscreen(c) end |