Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attachaside patch #118

Open
faradayawerty opened this issue Dec 19, 2020 · 6 comments
Open

attachaside patch #118

faradayawerty opened this issue Dec 19, 2020 · 6 comments

Comments

@faradayawerty
Copy link

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
Copy link

dyamon commented Dec 20, 2020

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 😃

@faradayawerty
Copy link
Author

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
Copy link

dyamon commented Dec 21, 2020

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. 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).
  • The function 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

@vkochan
Copy link

vkochan commented Dec 22, 2020

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
Copy link

dyamon commented Dec 22, 2020

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

@vkochan
Copy link

vkochan commented Dec 22, 2020

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants