martanne / dvtm

dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
MIT License
843 stars 108 forks source link

attachaside patch #118

Open faradayawerty opened 3 years ago

faradayawerty commented 3 years ago

If only there was a patch similar to dwm's attachaside. I prefer the new window not to become a new master but to be created as a slave.

dyamon commented 3 years ago

Would you like some pointers on how to do it? It's been a while since I checked dvtm source code, so it would be a nice exercise for me, and you would get a chance to get your hands dirty with it as well :smiley:

faradayawerty commented 3 years ago

Actually, I solved it by adding these lines at the end of create function: zoom(NULL); focus(c); Feels like a bit of a workaround though...

dyamon commented 3 years ago

Feels like a bit of a workaround though...

It is, and despite the fact that it works it's kind of hard to see what it is doing. Still, it's good that you managed to solve it your own way.

A couple more pointers if you want to explore a bit more:

Edit: a million typos

vkochan commented 3 years ago

I just did something for my needs when I need to have file-browser sticked at master position and open files from it via dvtm fifo at next positon (after master):

https://github.com/vkochan/dvtm-vk/commit/5cad1584b62523fd6b6a2abcc523db784441bed5

current implementation has disadvantage that it sets sticky mode globally, but better to have it per tag.

dyamon commented 3 years ago

Nice! If extended to work with nmasters >1 it would be a nice way to "freeze" the master area.

vkochan commented 3 years ago

I forced my dvtm-vk repo with new changes:

https://github.com/vkochan/dvtm-vk/commit/0e23062c4b68d882d52015a0cec2f2f11e6f6385

1) added (I assume) stick more masters 2) fixed impossible to replace sticky master by MOD+Enter 3) added [*] in border line of each sticked masters (not sure it is needed but at least lets know if sticky mode is turned on/off).