mytasklist = widget({ type = "tasklist", name = "mytasklist" })
mytasklist:buttons({
button({ }, 1, function (object, c) client.focus = c; c:raise() end),
- button({ }, 4, function () awful.client.focusbyidx(1) end),
- button({ }, 5, function () awful.client.focusbyidx(-1) end)
+ button({ }, 4, function () awful.client.focus.byidx(1) end),
+ button({ }, 5, function () awful.client.focus.byidx(-1) end)
})
mytasklist.label = awful.widget.tasklist.label.currenttags
keybinding({ modkey }, "Return", function () awful.util.spawn(terminal) end):add()
keybinding({ modkey, "Control" }, "r", function ()
- mypromptbox.text =
+ mypromptbox[mouse.screen].text =
awful.util.escape(awful.util.restart())
end):add()
keybinding({ modkey, "Shift" }, "q", awesome.quit):add()
-- Prompt
keybinding({ modkey }, "F1", function ()
- awful.prompt.run({ prompt = "Run: " }, mypromptbox, awful.util.spawn, awful.completion.bash,
+ awful.prompt.run({ prompt = "Run: " }, mypromptbox[mouse.screen], 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,
+ awful.prompt.run({ prompt = "Run Lua code: " }, mypromptbox[mouse.screen], awful.util.eval, awful.prompt.bash,
os.getenv("HOME") .. "/.cache/awesome/history_eval") end):add()
keybinding({ modkey, "Ctrl" }, "i", function ()
- if mypromptbox.text then
- mypromptbox.text = nil
+ local s = mouse.screen
+ if mypromptbox[s].text then
+ mypromptbox[s].text = nil
else
- mypromptbox.text = nil
+ mypromptbox[s].text = nil
if client.focus.class then
- mypromptbox.text = "Class: " .. client.focus.class .. " "
+ mypromptbox[s].text = "Class: " .. client.focus.class .. " "
end
if client.focus.instance then
- mypromptbox.text = mypromptbox.text .. "Instance: ".. client.focus.instance .. " "
+ mypromptbox[s].text = mypromptbox[s].text .. "Instance: ".. client.focus.instance .. " "
end
if client.focus.role then
- mypromptbox.text = mypromptbox.text .. "Role: ".. client.focus.role
+ mypromptbox[s].text = mypromptbox[s].text .. "Role: ".. client.focus.role
end
end
end):add()
-- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c)
- -- Honor size hints: if you want to drop the gaps between windows, set this to false. | if maxapps[inst] or maxapps[cls] then
+ -- Honor size hints: if you want to drop the gaps between windows, set this to false.
c.honorsizehints = true
-- Maximise some
local s = f:read('*l')
f:close()
if not s then
- return laststring;
+ return '-';
end
-- Battery 0: Discharging, 89%, 00:02:14 remaining
elseif status == 'Discarching' then
status = 'd';
else
- status = '';
+ status = '-';
end
return percent; -- .. ' (' .. status .. ')'; -- .. ' ' .. time .. ' left';