From be0c6869bb9f450503b4cfb28a6867ceaa941a67 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 6 Feb 2022 14:46:01 +0100 Subject: [PATCH 1/1] Ability to name new tags --- .config/awesome/rc.lua | 4 ++-- .config/awesome/taghelpers.lua | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 2902f3e..738a081 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -767,11 +767,11 @@ globalkeys = gears.table.join( awful.key({ modkey, }, "d", th.delete_tag, {description = "delete the current tag", group = "tag"}), awful.key({ modkey, "Shift", }, "a", function() - th.move_to_new_tag(nil, { layout = layouts.maximised },true,true,true) + th.move_to_new_tag(nil, nil, { layout = layouts.maximised },true,true,true) end, {description = "add a volatile tag with the focused client", group = "tag"}), awful.key({ modkey, "Shift", "Control" }, "a", function() - th.move_to_new_tag(nil, { layout = layouts.maximised },false,true,true) + th.move_to_new_tag(nil, nil, { layout = layouts.maximised },false,true,true) end, {description = "add a permanent tag with the focused client", group = "tag"}), awful.key({ modkey, "Mod1" }, "a", th.copy_tag, diff --git a/.config/awesome/taghelpers.lua b/.config/awesome/taghelpers.lua index 147a9e9..39f26f4 100644 --- a/.config/awesome/taghelpers.lua +++ b/.config/awesome/taghelpers.lua @@ -52,13 +52,14 @@ function module.rename_tag() } end -function module.move_to_new_tag(clnt, properties, volatile, switchto, force) +function module.move_to_new_tag(clnt, name, properties, volatile, switchto, force) local c = clnt or client.focus if not c then return end + local n = name or c.class local p = (type(properties) == "table" and properties) or {} local s = p.screen or c.screen - local t = module.add_tag(c.class, gears.table.join(p, { + local t = module.add_tag(n, gears.table.join(p, { screen = s, volatile = volatile, }), switchto, force) -- 2.39.2