2 local utils = require("utils")
4 -- Widget and layout library
5 local wibox = require("wibox")
7 -- Create a textclock widget
8 separator = wibox.widget.textbox()
9 separator:set_markup('<span font="Symbola 10" color="#404040">│</span>')
12 -- Create a wibox for each screen and add it
13 local taglist_buttons = awful.util.table.join(
14 awful.button({ }, 1, function(t) t:view_only() end),
15 awful.button({ modkey }, 1, function(t)
17 client.focus:move_to_tag(t)
20 awful.button({ }, 3, awful.tag.viewtoggle),
21 awful.button({ modkey }, 3, function(t)
23 client.focus:toggle_tag(t)
26 awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),
27 awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
30 local tasklist_buttons = awful.util.table.join(
31 awful.button({ }, 1, function (c)
32 if c == client.focus then
35 -- Without this, the following
36 -- :isvisible() makes no sense
38 if not c:isvisible() and c.first_tag then
39 c.first_tag:view_only()
41 -- This will also un-minimize
42 -- the client, if needed
47 awful.button({ }, 2, function (c) c:kill() end),
48 awful.button({ }, 3, function ()
49 if instance and instance.wibox.visible then
53 instance = awful.menu.clients({ theme = { width=250 }})
56 awful.button({ }, 4, function ()
57 awful.client.focus.byidx(1)
59 awful.button({ }, 5, function ()
60 awful.client.focus.byidx(-1)
64 awful.screen.connect_for_each_screen(function(s)
65 -- Create a promptbox for each screen
66 s.mypromptbox = awful.widget.prompt()
67 -- Create an imagebox widget which will contains an icon indicating which layout we're using.
68 -- We need one layoutbox per screen.
69 s.mylayoutbox = awful.widget.layoutbox(s)
70 s.mylayoutbox:buttons(awful.util.table.join(
71 awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
72 awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
73 awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
74 awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
75 -- Create a taglist widget
76 s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)
78 -- Create a tasklist widget
79 s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons)
82 s.mywibox = awful.wibar({ position = "top", screen = s })
84 -- Add widgets to the wibox
86 layout = wibox.layout.align.horizontal,
88 layout = wibox.layout.fixed.horizontal,
93 s.mytasklist, -- Middle widget
95 layout = wibox.layout.fixed.horizontal,
97 wibox.widget.systray(),
99 require("widgets/pomodoro"),
101 require("widgets/awesompd"),
102 require("widgets/volume_widget"),
103 utils.has_battery() and {
104 layout = wibox.layout.fixed.horizontal,
106 require("widgets/battery_widget"),
109 require("widgets/network_widget"),
111 require("widgets/calendar"),