mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-08-31 23:09:56 +02:00
shifty: fusion delete/rename tag function
When a tag is empty, delete it, otherwise, rename it.
This commit is contained in:
parent
b2da623de0
commit
e17f7b879c
2 changed files with 10 additions and 3 deletions
10
rc/tags.lua
10
rc/tags.lua
|
@ -93,6 +93,12 @@ shifty.config.defaults = {
|
|||
shifty.taglist = config.taglist -- Set in widget.lua
|
||||
shifty.init()
|
||||
|
||||
local tag_del_or_rename = function(tag)
|
||||
if not shifty.del(tag) then
|
||||
shifty.rename(tag)
|
||||
end
|
||||
end
|
||||
|
||||
config.keys.global = awful.util.table.join(
|
||||
config.keys.global,
|
||||
keydoc.group("Tag management"),
|
||||
|
@ -121,8 +127,8 @@ config.keys.global = awful.util.table.join(
|
|||
end,
|
||||
"Send all tags to next screen"),
|
||||
awful.key({ modkey }, 0, shifty.add, "Create a new tag"),
|
||||
awful.key({ modkey, "Shift" }, 0, shifty.del, "Delete tag"),
|
||||
awful.key({ modkey, "Control" }, 0, shifty.rename, "Rename tag"))
|
||||
awful.key({ modkey, "Shift" }, 0, tag_del_or_rename),
|
||||
awful.key({ modkey, "Control" }, 0, tag_del_or_rename, "Rename or delete tag"))
|
||||
|
||||
-- Bind all key numbers to tags.
|
||||
-- Be careful: we use keycodes to make it works on any keyboard layout.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue