diff options
Diffstat (limited to 'desktop.lua')
-rw-r--r-- | desktop.lua | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/desktop.lua b/desktop.lua deleted file mode 100644 index 4b252ab..0000000 --- a/desktop.lua +++ /dev/null @@ -1,44 +0,0 @@ -local M = {} - -local awful = require("awful") -local object = require("gears.object") - -local function desktop_show(self, screen, page_idx) - if page_idx == nil then - local page_hist = self.page_history[screen] - if page_hist ~= nil then - page_idx = page_hist - else - page_idx = 1 - end - end - - local page = self.pages[page_idx] - - if page then - self.page_history[screen] = page_idx - end - return page_idx -end - -local function desktop_new(idx, name, nb_pages, layout) - local ret = object() - - ret.show = desktop_show - - ret.name = name - - ret.pages = {} - for i = 1, nb_pages do - ret.pages[i] = awful.tag.add(name .. i, { layout = layout }) - end - - -- page_history[i] is the last page viewed on screen i - ret.page_history = {} - - return ret -end - -M.new = desktop_new - -return M |