From 1a87e0734aa2d1b6879249751772c7b121e26978 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 28 Mar 2016 05:03:55 -0400 Subject: [PATCH] Fix compatibility with Awesome git-master --- focus.lua | 2 +- screen.lua | 4 ++++ split.lua | 5 +---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/focus.lua b/focus.lua index ed7f5ee..0096c0e 100644 --- a/focus.lua +++ b/focus.lua @@ -238,4 +238,4 @@ function module._quit() end return setmetatable(module, { __call = function(_, ...) return new(...) end }) --- kate: space-indent on; indent-width 2; replace-tabs on; \ No newline at end of file +-- kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/screen.lua b/screen.lua index 628ef8d..6d9d505 100644 --- a/screen.lua +++ b/screen.lua @@ -148,6 +148,10 @@ end local function next_screen(ss,dir,move) local scr_index = screens_inv[ss] + if type(scr_index) == "screen" then + scr_index = scr_index.index + end + if dir == "left" then scr_index = scr_index == 1 and #screens or scr_index - 1 elseif dir == "right" then diff --git a/split.lua b/split.lua index 67ba717..1e4334f 100644 --- a/split.lua +++ b/split.lua @@ -221,7 +221,6 @@ local function drill(context, root, source) if points then for k, point in ipairs(points) do - print(#points) add_splitter(context, point) end end @@ -250,7 +249,6 @@ local function find_split_points(context) context.add_x, context.add_y = wa.x, wa.y local source = drill(context, layout.hierarchy, nil) if source then - print("\n\nGET", layout.hierarchy, layout.hierarchy:get_widget()) context.source_root = layout.hierarchy:get_widget() end end @@ -271,7 +269,6 @@ end local function start_keygrabber(context) capi.keygrabber.run(function(mod, key, event) local hook = context.hooks[key] -print("\n\nKEY", key, hook) if hook and hook.callback and event == "press" then context.hooks[key]:callback(context) end @@ -327,4 +324,4 @@ function module.add_prompt_hook(hook_key) -- client in a specific position end -return setmetatable(module, { __call = function(_, ...) return module.display_layout_split(...) end }) \ No newline at end of file +return setmetatable(module, { __call = function(_, ...) return module.display_layout_split(...) end })