summaryrefslogtreecommitdiff
path: root/rc.lua
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2017-10-10 13:00:33 +0200
committerAnton Khirnov <anton@khirnov.net>2017-10-10 13:09:45 +0200
commit812268c03f836d3e86307894bfd48472a7e2a083 (patch)
tree97de9e533510b033fa590b7851a6350aafd47881 /rc.lua
parent513871ae9f1fac060ce3feca12116c34d38a7514 (diff)
Update for awesome 4.
Diffstat (limited to 'rc.lua')
-rw-r--r--rc.lua28
1 files changed, 14 insertions, 14 deletions
diff --git a/rc.lua b/rc.lua
index 6806402..531b11a 100644
--- a/rc.lua
+++ b/rc.lua
@@ -55,9 +55,9 @@ local layouts =
-- {{{ Tags
workspace = workspace.Workspace:new(layouts)
-for s = 1, screen.count() do
- workspace:add_desktop(s, "Desktop " .. s, 10)
- workspace:view(s, s, 1)
+for s in screen do
+ workspace:add_desktop(s.index, "Desktop " .. s.index, 10)
+ workspace:view(s, s.index, 1)
end
-- }}}
@@ -67,7 +67,7 @@ menubar.utils.terminal = terminal -- Set the terminal for applications that requ
-- {{{ Wibox
-- Create a textclock widget
-mytextclock = awful.widget.textclock()
+mytextclock = wibox.widget.textclock()
-- Create a wibox for each screen and add it
mywibox = {}
@@ -111,7 +111,7 @@ mytasklist.buttons = awful.util.table.join(
if client.focus then client.focus:raise() end
end))
-for s = 1, screen.count() do
+for s in screen do
-- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt()
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
@@ -129,13 +129,13 @@ for s = 1, screen.count() do
pgr:set_desktop(workspace.desktops[1])
mytasklist[s] = pgr
- workspace.signals:connect_signal("desktop:view",
- function(signals, screen_idx, desktop)
- print("desktop:view " .. desktop .. " on " .. screen_idx)
- if screen_idx == s then
- pgr:set_desktop(workspace.desktops[desktop])
- end
- end)
+ workspace.signals:connect_signal("desktop:view",
+ function(signals, view_screen, desktop)
+ print("desktop:view " .. desktop .. " on " .. view_screen.index)
+ if view_screen == s then
+ pgr:set_desktop(workspace.desktops[desktop])
+ end
+ end)
-- Widgets that are aligned to the left
local left_layout = wibox.layout.fixed.vertical()
@@ -143,7 +143,7 @@ for s = 1, screen.count() do
-- Widgets that are aligned to the right
local right_layout = wibox.layout.fixed.vertical()
- if s == 1 then right_layout:add(wibox.widget.systray()) end
+ if s.index == 1 then right_layout:add(wibox.widget.systray()) end
right_layout:add(mytextclock)
right_layout:add(mylayoutbox[s])
@@ -154,7 +154,7 @@ for s = 1, screen.count() do
layout:set_bottom(right_layout)
-- Create the wibox
- mywibox[s] = awful.wibox({ position = "right", screen = s, width = 128 })
+ mywibox[s] = awful.wibar({ position = "right", screen = s, width = 128 })
mywibox[s]:set_widget(layout)
end
-- }}}