diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-05-23 10:28:57 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-05-23 10:28:57 +0200 |
commit | 8e47ab2d5c32459a8071da3facc0d1f096261de5 (patch) | |
tree | 513e64301398f5135f64b9f0e91a9116fade4fd6 | |
parent | 65989a0d67084252fc372816dcdca38d91eef283 (diff) | |
download | dotfiles-8e47ab2d5c32459a8071da3facc0d1f096261de5.tar.gz dotfiles-8e47ab2d5c32459a8071da3facc0d1f096261de5.tar.bz2 dotfiles-8e47ab2d5c32459a8071da3facc0d1f096261de5.zip |
awesome: Partially update to awesome 3.4.11
Not yet hooked up is the new startup-error handling.
-rw-r--r-- | .config/awesome/awesome.lua | 24 | ||||
-rw-r--r-- | .config/awesome/rc.lua | 26 |
2 files changed, 44 insertions, 6 deletions
diff --git a/.config/awesome/awesome.lua b/.config/awesome/awesome.lua index 5f788c2..1b8271a 100644 --- a/.config/awesome/awesome.lua +++ b/.config/awesome/awesome.lua @@ -112,11 +112,17 @@ mytaglist.buttons = awful.util.table.join( mytasklist = {} mytasklist.buttons = awful.util.table.join( awful.button({ }, 1, function (c) - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) + if c == client.focus then + c.minimized = true + else + if not c:isvisible() then + awful.tag.viewonly(c:tags()[1]) + end + -- This will also un-minimize + -- the client, if needed + client.focus = c + c:raise() end - client.focus = c - c:raise() end), awful.button({ }, 3, function () if instance then @@ -220,7 +226,6 @@ globalkeys = awful.util.table.join( awful.key({ modkey, }, "a", function () awful.util.spawn(terminal .. " -geometry 100x25 -e pa-sink-ctl" ) end), awful.key({ modkey, }, "w", function () awful.util.spawn("luakit") end), awful.key({ modkey, }, "p", function () awful.util.spawn("pidgin") end), - awful.key({ modkey, }, "n", function () awful.util.spawn(terminal .. " -e wicd-curses") end), awful.key({ modkey, }, "i", function () awful.util.spawn(terminal .. " -geometry 100x30 -e " .. os.getenv("HOME") .. "/.scripts/start_remote_irssi.sh") end), awful.key({ }, "Print", function () awful.util.spawn("scrot") end), @@ -250,6 +255,8 @@ globalkeys = awful.util.table.join( awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), awful.key({ modkey, "Shift" }, "f", function () awful.layout.set(layouts[1]) end), + awful.key({ modkey, "Control" }, "n", awful.client.restore), + -- Prompt awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), @@ -271,7 +278,12 @@ clientkeys = awful.util.table.join( awful.key({ modkey, }, "o", awful.client.movetoscreen ), awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end), awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), - -- awful.key({ modkey, }, "n", function (c) c.minimized = not c.minimized end), + awful.key({ modkey, }, "n", + function (c) + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. + c.minimized = true + end), awful.key({ modkey, }, "m", function (c) c.maximized_horizontal = not c.maximized_horizontal diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 5bf50ce..c58d101 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -1,3 +1,29 @@ +---- After require("naughty") +---- {{{ Error handling +---- Check if awesome encountered an error during startup and fell back to +---- another config (This code will only ever execute for the fallback config) +--if awesome.startup_errors then +-- naughty.notify({ preset = naughty.config.presets.critical, +-- title = "Oops, there were errors during startup!", +-- text = awesome.startup_errors }) +--end +-- +---- Handle runtime errors after startup +--do +-- local in_error = false +-- awesome.add_signal("debug::error", function (err) +-- -- Make sure we don't go into an endless error loop +-- if in_error then return end +-- in_error = true +-- +-- naughty.notify({ preset = naughty.config.presets.critical, +-- title = "Oops, an error happened!", +-- text = err }) +-- in_error = false +-- end) +--end +---- }}} + local rc, err = loadfile(os.getenv("HOME").."/.config/awesome/awesome.lua"); if rc then rc, err = pcall(rc); |