diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-09-13 18:32:29 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-09-13 18:32:29 +0200 |
commit | 4ecd13a3c8fd6ec0ddf13219a56e331db8a6e92e (patch) | |
tree | 7a0c5112692912d6a57a2fe04fc0828f6d7a54a4 | |
parent | b76b9429356df9233446a1b42216bbcac7f09d74 (diff) | |
download | awesome-configs-4ecd13a3c8fd6ec0ddf13219a56e331db8a6e92e.tar.xz |
teardrop: added more improvements
- teardrop clients drop down from the top by default
- teardrop clients are not visible on the tasklist
- teardrop clients don't have titlebars
-rw-r--r-- | rc.lua | 6 | ||||
-rw-r--r-- | teardrop.lua | 32 |
2 files changed, 22 insertions, 16 deletions
@@ -424,8 +424,8 @@ globalkeys = awful.util.table.join( awful.key({ modkey }, "u", function () awful.util.spawn("utorrent", false) end), awful.key({ modkey }, "w", function () awful.util.spawn("firefox", false) end), awful.key({ altkey }, "F1", function () awful.util.spawn("urxvt", false) end), - awful.key({ altkey }, "#49", function () teardrop.toggle("urxvt") end), - awful.key({ modkey }, "F2", function () teardrop.toggle("gmrun", 1, 0.08) end), + awful.key({ altkey }, "#49", function () teardrop.toggle("urxvt", 1) end), + awful.key({ modkey }, "F2", function () teardrop.toggle("gmrun", 0, 0.08) end), awful.key({ modkey }, "a", function () awful.util.spawn("urxvt -title Alpine -e alpine_exp", false) end), @@ -605,7 +605,7 @@ clientkeys = awful.util.table.join( awful.key({ modkey, "Shift" }, "0", function (c) c.sticky = not c.sticky end), awful.key({ modkey, "Shift" }, "o", function (c) c.ontop = not c.ontop end), awful.key({ modkey, "Shift" }, "t", function (c) - if c.titlebar then awful.titlebar.remove(c) + if c.titlebar then awful.titlebar.remove(c) else awful.titlebar.add(c, { modkey = modkey }) end end), awful.key({ modkey, "Control" }, "r", function (c) c:redraw() end), diff --git a/teardrop.lua b/teardrop.lua index d3c37c6..a2cbb0a 100644 --- a/teardrop.lua +++ b/teardrop.lua @@ -4,10 +4,10 @@ -- Original by: Lucas de Vries <lucas_glacicle_com> -- * http://awesome.naquadah.org/wiki/Drop-down_terminal -- --- Modified by: Adrian C. <anrxc_sysphere_org> +-- Teardrop by: Adrian C. <anrxc_sysphere_org> -- * turned into a module -- * st-notification disabled --- * bottom edge by default +-- * bottom edge as an option -- * ported to awesome 3.4 -- * different tag handling -- @@ -22,8 +22,8 @@ -- -- Parameters: -- prog - Program to run, for example: "urxvt" or "gmrun" --- edge - Screen edge (optional), 1 to drop down from the top of the --- screen, by default it slides in from the bottom +-- edge - Screen edge (optional), 1 to slide in from the bottom of +-- the screen, by default it drops down from the top -- height - Height (optional), in absolute pixels when > 1 or a height -- percentage when < 1, 0.25 (25% of the screen) by default -- screen - Screen (optional) @@ -43,10 +43,9 @@ local capi = { module("teardrop") -local dropdown = {} - -- Drop-down (quake-like) application toggle --- +local dropdown = {} +-- -- Create a new window for the drop-down application when it doesn't -- exist, or toggle between hidden and visible states when it does. function toggle(prog, edge, height, screen) @@ -81,7 +80,7 @@ function toggle(prog, edge, height, screen) -- Store client dropdown[prog][screen] = c - -- Float client + -- Float the client awful.client.floating.set(c, true) -- Get screen geometry @@ -94,14 +93,14 @@ function toggle(prog, edge, height, screen) -- Deduce edge if edge < 1 then - -- Slide in from the bottom of the screen - screenedge = screengeom.height + screengeom.y - height - else -- Drop down from the top of the screen -- * not covering the wibox --screenedge = screengeom.y -- * covering the wibox screenedge = screengeom.y - screengeom.y + else + -- Slide in from the bottom of the screen + screenedge = screengeom.height + screengeom.y - height end -- Resize client @@ -112,11 +111,18 @@ function toggle(prog, edge, height, screen) height = height }) - -- Mark application as ontop + -- Client properties + -- * skip tasklist + c.skip_taskbar = true + -- * always ontop c.ontop = true c.above = true + -- * no titlebar + if c.titlebar then + awful.titlebar.remove(c) + end - -- Focus and raise client + -- Focus and raise c:raise() capi.client.focus = c |