]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Ability to name new tags
authormartin f. krafft <madduck@madduck.net>
Sun, 6 Feb 2022 13:46:01 +0000 (14:46 +0100)
committermartin f. krafft <madduck@madduck.net>
Sun, 6 Feb 2022 13:52:19 +0000 (14:52 +0100)
.config/awesome/rc.lua
.config/awesome/taghelpers.lua

index 2902f3eb3bdae85a0f16944f0dfda1e9484394dd..738a08145836cb016b231ec011e96429fad34645 100644 (file)
@@ -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()
     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()
     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,
     end,
               {description = "add a permanent tag with the focused client", group = "tag"}),
     awful.key({ modkey, "Mod1"   }, "a", th.copy_tag,
index 147a9e9736090dc40f6c14ceeb86ac6135b78c73..39f26f416575d6ef9564d0dd251fb34e303926ec 100644 (file)
@@ -52,13 +52,14 @@ function module.rename_tag()
     }
 end
 
     }
 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 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 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)
         screen = s,
         volatile = volatile,
     }), switchto, force)