attachaside patch
faradayawerty opened this issue ยท 6 comments
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.
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 ๐
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...
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:
- The first function you want to look at is
attach
. Increate
it is used to put the newClient
in the doubly linked list ofclients
(as the first element). It should be possible to write a functionattachlast
to attach something to the end of the list (or maybe keep track of the last element of the list, along withclients
, which is a reference to the first). - The function
attachafter
seems interesting as well. For example, in a classictiled
layout I would prefer the new client to be attached "at the top" of the slave stack. This should be easy to achieve withattachafter
.
Edit: a million typos
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.
Nice! If extended to work with nmaster
s >1 it would be a nice way to "freeze" the master area.
I forced my dvtm-vk repo with new changes:
https://github.com/vkochan/dvtm-vk/commit/0e23062c4b68d882d52015a0cec2f2f11e6f6385
- added (I assume) stick more masters
- fixed impossible to replace sticky master by MOD+Enter
- 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).