From 93bc739eb28a479240d52cc112e63b2cee7c2688 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Tue, 30 Sep 2008 16:08:38 +0200 Subject: [PATCH] follow config changes --- .config/awesome/rc.lua | 69 ++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 46f6d57..3f21875 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -113,7 +113,7 @@ for s = 1, screen.count() do end -- }}} --- {{{ Statusbar +-- {{{ Wibox -- Create a taglist widget mytaglist = widget({ type = "taglist", name = "mytaglist" }) mytaglist:buttons({ @@ -182,13 +182,13 @@ batterywidget:bar_properties_set('bat', { }) -- }}} --- Create a statusbar for each screen and add it -mystatusbar = {} +-- Create a wibox for each screen and add it +mywibox = {} for s = 1, screen.count() do - mystatusbar[s] = wibox({ position = "top", name = "mystatusbar" .. s, + mywibox[s] = wibox({ position = "top", name = "mywibox" .. s, fg = beautiful.fg_normal, bg = beautiful.bg_normal }) - -- Add widgets to the statusbar - order matters - mystatusbar[s]:widgets({ + -- Add widgets to the wibox - order matters + mywibox[s]:widgets({ mytaglist, mytasklist, mypromptbox, @@ -198,13 +198,13 @@ for s = 1, screen.count() do mylayoutbox[s], s == screen.count() and mysystray or nil }) - mystatusbar[s].screen = s + mywibox[s].screen = s end -- }}} -- {{{ Mouse bindings awesome.buttons({ - button({ }, 3, function () awful.spawn(terminal) end), + button({ }, 3, function () awful.util.spawn(terminal) end), button({ }, 4, awful.tag.viewnext), button({ }, 5, awful.tag.viewprev) }) @@ -257,17 +257,20 @@ keybinding({ modkey }, "Right", awful.tag.viewnext):add() keybinding({ modkey }, "Escape", awful.tag.history.restore):add() -- Standard program -keybinding({ modkey }, "Return", function () awful.spawn(terminal) end):add() +keybinding({ modkey }, "Return", function () awful.util.spawn(terminal) end):add() -keybinding({ modkey, "Control" }, "r", awesome.restart):add() +keybinding({ modkey, "Control" }, "r", function () + mypromptbox.text = + awful.util.escape(awful.util.restart()) + end):add() 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.focusbyidx(1); client.focus:raise() end):add() -keybinding({ modkey }, "k", function () awful.client.focusbyidx(-1); client.focus:raise() 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, "Shift" }, "j", function () awful.client.swap(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() @@ -291,7 +294,7 @@ keybinding({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, - -- Prompt keybinding({ modkey }, "F1", function () - awful.prompt.run({ prompt = "Run: " }, mypromptbox, awful.spawn, awful.completion.bash, + awful.prompt.run({ prompt = "Run: " }, mypromptbox, awful.util.spawn, awful.completion.bash, os.getenv("HOME") .. "/.cache/awesome/history") end):add() keybinding({ modkey }, "F4", function () awful.prompt.run({ prompt = "Run Lua code: " }, mypromptbox, awful.eval, awful.prompt.bash, @@ -399,7 +402,7 @@ awful.hooks.unmarked.register(function (c) end) -- Hook function to execute when the mouse is over a client. -awful.hooks.mouse_over.register(function (c) +awful.hooks.mouse_enter.register(function (c) -- Sloppy focus, but disabled for magnifier layout if awful.layout.get(c.screen) ~= "magnifier" and awful.client.focus.filter(c) then @@ -576,27 +579,27 @@ awful.hooks.timer.register(120, hook_battery) cmdmodkey = "Mod3" -- xmms2 & sound -keybinding({ cmdmodkey }, "Prior", function () awful.spawn("amixer set Master 2+") end):add() -keybinding({ cmdmodkey }, "Next", function () awful.spawn("amixer set Master 2-") end):add() -keybinding({ cmdmodkey }, "Up", function () awful.spawn("amixer set PCM 2+") end):add() -keybinding({ cmdmodkey }, "Down", function () awful.spawn("amixer set PCM 2-") end):add() -keybinding({ cmdmodkey }, "Home", function () awful.spawn("amixer set Mic toggle") end):add() -keybinding({ cmdmodkey }, "End", function () awful.spawn("amixer set Master toggle") end):add() -keybinding({ cmdmodkey }, "Left", function () awful.spawn("xmms2 prev") end):add() -keybinding({ cmdmodkey }, "Right", function () awful.spawn("xmms2 next") end):add() -keybinding({ cmdmodkey }, "space", function () awful.spawn("xmms2 toggleplay") end):add() -keybinding({ cmdmodkey }, "backslash", function () awful.spawn("xmms2 current | head -1 | xmessage -nearmouse -timeout 5 -file -") end):add() -keybinding({ cmdmodkey, "Shift" }, "backslash", function () awful.spawn("xmms2 list | xmessage -nearmouse -timeout 5 -file -") end):add() +keybinding({ cmdmodkey }, "Prior", function () awful.util.spawn("amixer set Master 2+") end):add() +keybinding({ cmdmodkey }, "Next", function () awful.util.spawn("amixer set Master 2-") end):add() +keybinding({ cmdmodkey }, "Up", function () awful.util.spawn("amixer set PCM 2+") end):add() +keybinding({ cmdmodkey }, "Down", function () awful.util.spawn("amixer set PCM 2-") end):add() +keybinding({ cmdmodkey }, "Home", function () awful.util.spawn("amixer set Mic toggle") end):add() +keybinding({ cmdmodkey }, "End", function () awful.util.spawn("amixer set Master toggle") end):add() +keybinding({ cmdmodkey }, "Left", function () awful.util.spawn("xmms2 prev") end):add() +keybinding({ cmdmodkey }, "Right", function () awful.util.spawn("xmms2 next") end):add() +keybinding({ cmdmodkey }, "space", function () awful.util.spawn("xmms2 toggleplay") end):add() +keybinding({ cmdmodkey }, "backslash", function () awful.util.spawn("xmms2 current | head -1 | xmessage -nearmouse -timeout 5 -file -") end):add() +keybinding({ cmdmodkey, "Shift" }, "backslash", function () awful.util.spawn("xmms2 list | xmessage -nearmouse -timeout 5 -file -") end):add() -- misc apps -keybinding({ cmdmodkey }, "n", function () awful.spawn("sensible-browser") end):add() -keybinding({ cmdmodkey }, "m", function () awful.spawn(terminal .. " -e mutt -f =store") end):add() -keybinding({ cmdmodkey }, "t", function () awful.spawn(terminal) end):add() -keybinding({ cmdmodkey }, "c", function () awful.spawn(terminal .. " -e python") end):add() -keybinding({ cmdmodkey }, "r", function () awful.spawn("gmrun") end):add() -keybinding({ cmdmodkey }, "j", function () awful.spawn("jpilot") end):add() -keybinding({ cmdmodkey }, "x", function () awful.spawn("/sbin/start-stop-daemon --start --background --exec /usr/bin/xscreensaver; xscreensaver-command -lock") end):add() -keybinding({ cmdmodkey, "Shift" }, "x", function () awful.spawn("xscreensaver-command -exit") end):add() +keybinding({ cmdmodkey }, "n", function () awful.util.spawn("sensible-browser") end):add() +keybinding({ cmdmodkey }, "m", function () awful.util.spawn(terminal .. " -e mutt -f =store") end):add() +keybinding({ cmdmodkey }, "t", function () awful.util.spawn(terminal) end):add() +keybinding({ cmdmodkey }, "c", function () awful.util.spawn(terminal .. " -e python") end):add() +keybinding({ cmdmodkey }, "r", function () awful.util.spawn("gmrun") end):add() +keybinding({ cmdmodkey }, "j", function () awful.util.spawn("jpilot") end):add() +keybinding({ cmdmodkey }, "x", function () awful.util.spawn("/sbin/start-stop-daemon --start --background --exec /usr/bin/xscreensaver; xscreensaver-command -lock") end):add() +keybinding({ cmdmodkey, "Shift" }, "x", function () awful.util.spawn("xscreensaver-command -exit") end):add() -- Highlight statusbars on the screen that has focus, -- set this to false if you only have one screen or -- 2.39.5