From 32e69bc1cc2adca6fc032b49cb4939e289533c16 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 24 Nov 2008 17:52:58 +0100 Subject: [PATCH] awesomerc: add missing check for client.focus Signed-off-by: Julien Danjou --- awesomerc.lua.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index 8e10fd27..53f10e9d 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -223,20 +223,20 @@ keybinding({ modkey, "Shift" }, "q", awesome.quit):add() -- Client manipulation keybinding({ modkey }, "m", awful.client.maximize):add() -keybinding({ modkey }, "f", function () client.focus.fullscreen = not client.focus.fullscreen end):add() -keybinding({ modkey, "Shift" }, "c", function () client.focus:kill() end):add() -keybinding({ modkey }, "j", function () awful.client.focus.byidx(1); client.focus:raise() end):add() -keybinding({ modkey }, "k", function () awful.client.focus.byidx(-1); client.focus:raise() end):add() +keybinding({ modkey }, "f", function () if client.focus then client.focus.fullscreen = not client.focus.fullscreen end end):add() +keybinding({ modkey, "Shift" }, "c", function () if client.focus then client.focus:kill() end end):add() +keybinding({ modkey }, "j", function () awful.client.focus.byidx(1); if client.focus then client.focus:raise() end end):add() +keybinding({ modkey }, "k", function () awful.client.focus.byidx(-1); if client.focus then client.focus:raise() end end):add() keybinding({ modkey, "Shift" }, "j", function () awful.client.swap.byidx(1) end):add() keybinding({ modkey, "Shift" }, "k", function () awful.client.swap(-1) end):add() keybinding({ modkey, "Control" }, "j", function () awful.screen.focus(1) end):add() keybinding({ modkey, "Control" }, "k", function () awful.screen.focus(-1) end):add() keybinding({ modkey, "Control" }, "space", awful.client.togglefloating):add() -keybinding({ modkey, "Control" }, "Return", function () client.focus:swap(awful.client.getmaster()) end):add() +keybinding({ modkey, "Control" }, "Return", function () if client.focus then client.focus:swap(awful.client.getmaster()) end end):add() keybinding({ modkey }, "o", awful.client.movetoscreen):add() keybinding({ modkey }, "Tab", awful.client.focus.history.previous):add() keybinding({ modkey }, "u", awful.client.urgent.jumpto):add() -keybinding({ modkey, "Shift" }, "r", function () client.focus:redraw() end):add() +keybinding({ modkey, "Shift" }, "r", function () if client.focus then client.focus:redraw() end end):add() -- Layout manipulation keybinding({ modkey }, "l", function () awful.tag.incmwfact(0.05) end):add() @@ -262,7 +262,7 @@ keybinding({ modkey, "Ctrl" }, "i", function () local s = mouse.screen if mypromptbox[s].text then mypromptbox[s].text = nil - else + elseif client.focus mypromptbox[s].text = nil if client.focus.class then mypromptbox[s].text = "Class: " .. client.focus.class .. " "