-
Notifications
You must be signed in to change notification settings - Fork 188
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
Add more specific margin capabilities #196
Conversation
* Adds more customizability for window margins * Correct order * FMT
@@ -147,9 +148,13 @@ impl Window { | |||
value = self.normal.w(); | |||
} else if self.floating() && self.floating.is_some() { | |||
let relative = self.normal + self.floating.unwrap(); | |||
value = relative.w() - (self.margin * 2) - (self.border * 2); | |||
value = relative.w() | |||
- (self.margin.clone().left() + self.margin.clone().right()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure exactly why it’s applied. Can try running it without and see what happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might test myself as well. Was just curious if there was some reasoning behind that.
} else { | ||
self.normal.y() + self.margin | ||
self.normal.y() + self.margin.clone().bottom() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another question if I may: why are you using .bottom()
here and not .top()
? Isn't the origin for determining window-positions the top-left screen corner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that you mention it, that’s probably right. This might be an artifact from when I was confused and had the HTML top/bottom/ left/right specs backwards.
Should probably check over and see if the behaviour is what we’re expecting it to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as I am just about to get a MarginMultiplier
PR ready (just struggling to get the external command working) so I might include this..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds great! Thanks for reviewing that. I wonder if it's partially related to #248
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's partially related to #248
Gonna look into this tomorrow, now it's bedtime. Gn8
* Adds more customizability for window margins * Correct order * FMT
Good evening,
This PR adds functionality to the margins as per #194. I went with the HTML format of [top, right, bottom, left] and [top/bottom, left/right]. To change the margins, edit ~/.config/leftwm/themes/current/theme.toml from:
to:
I intended to apply this to borders as well, but it does not appear that this is possible due to an upstream requirement of a singular integer to define borders, but it may be possible.