From e2c6c45a2636b24b7efd1dacd2227689a0fe08c6 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 16 Nov 2021 16:09:18 +0100 Subject: rc/workspace: handle screen removal cleanly --- utils.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'utils.lua') diff --git a/utils.lua b/utils.lua index 4e3bb90..eb698dc 100644 --- a/utils.lua +++ b/utils.lua @@ -3,6 +3,13 @@ local M = {} local awful = require("awful") local naughty = require("naughty") +function M.tag_desk_idx(t) + return tonumber('0x' .. t.name:sub(1, 2)) +end +function M.tag_page_idx(t) + return tonumber('0x' .. t.name:sub(3, 4)) +end + -- mapping from logical screen indices to indices corresponding to their -- physical layout function M.screen_physical(n) -- cgit v1.2.3