clickable tabs

This commit is contained in:
anakha 2021-07-06 16:15:56 -04:00
parent 86d8127d9a
commit 957699d0b5
2 changed files with 11 additions and 4 deletions

View File

@ -36,7 +36,7 @@ We now have tabs for tiled clients :)
### Next?
- [ ] Better keybindings (possibly emacs style)
- [ ] Clickable tabs
- [X] Clickable tabs
- [ ] Add binding for relocating the entire region
- [ ] Deck spread (send focused client to a direction without moving focus)
- [ ] Visual teleport (overlay with region numbers to choose from)

View File

@ -765,10 +765,12 @@ function draw_tabbar(region_ix, s)
global_widget_table[cl.window] = {}
for cc_ix, cc in ipairs(tablist) do
local buttons = gears.table.join(awful.button({}, 1, function() end))
-- wid_temp
local buttons = gears.table.join(awful.button({}, 1, function(_)
gears.timer.delayed_call(function(p)
client.emit_signal("riseup", p)
end, cc)
end))
global_widget_table[cl.window][cc_ix] = tabs.create(cc, (cc == cl), buttons, cl_ix)
flexlist:add(global_widget_table[cl.window][cc_ix])
flexlist.max_widget_size = 120
end
@ -983,8 +985,13 @@ end -- todo: need to update the other clients in the region here as well
-- client.connect_signal("property::name", name_signal)
local function riseup_signal(c)
client.focus = c; c:raise()
-- c:emit_signal("request::activate", "mouse_enter",{raise = true})
end
--------------------------------------------------------------- signals -- ;
client.connect_signal("riseup", riseup_signal)
client.connect_signal("focus", focus_signal)
client.connect_signal("unfocus", unfocus_signal)
client.connect_signal("property::minimized", minimized_signal)