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

setting width from qtile shell / client_managed hook #20

Open
skaface opened this issue Mar 16, 2021 · 0 comments
Open

setting width from qtile shell / client_managed hook #20

skaface opened this issue Mar 16, 2021 · 0 comments

Comments

@skaface
Copy link

skaface commented Mar 16, 2021

Hi, Ive been trying to set the width of a program from within a hook, so that as soon as I launch for example MPV, it will resize it to a width of 1920.
On trying to run the command from qtile shell,
layout > width(500)

File "/home/gary/.local/lib/python3.9/site-packages/plasma/node.py", line 328, in size
val = max(min(val, self.parent.capacity - occupied),
TypeError: '<' not supported between instances of 'int' and 'str'

I am sorry, I don't know how to submit a patch, but I fixed this by changing line 328 of node.py to

val = max(min(int(val), self.parent.capacity - occupied),

to change the type of val to an integer

I am still having trouble calling the width function directly from within a hook, but I am unsure if I am doing it correctly or if this is just unsupported, I would be appreciative if you could give me some direction on how to accomplish this? I have a rather hacky solution in place at the moment to simulate a keypress which is bound to the lazy.layout.width() function

Thank you

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

1 participant