Open faradayawerty opened 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:
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:
attach
. In create
it is used to put the new Client
in the doubly linked list of clients
(as the first element). It should be possible to write a function attachlast
to attach something to the end of the list (or maybe keep track of the last element of the list, along with clients
, which is a reference to the first).attachafter
seems interesting as well. For example, in a classic tiled
layout I would prefer the new client to be attached "at the top" of the slave stack. This should be easy to achieve with attachafter
.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
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).
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.