From 812268c03f836d3e86307894bfd48472a7e2a083 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 10 Oct 2017 13:00:33 +0200 Subject: Update for awesome 4. --- rc.lua | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'rc.lua') 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 -- }}} -- cgit v1.2.3