Make "useful window widths" and "useful window heights" user-configurable through PaperWM extension settings#456
Conversation
Bound prefs cycle-width-steps in prefs.js. Added reset buttons. Added reset button tool tips.
…(but that mixed ratio and pixel values are not supported). Now splitting width/height input values by whitespace blocks (seems a bit cleaner).
|
@ccope could you review / test this one when you get a chance? |
|
@Gelbana @tadfisher @smichel17 - just FYI, asked ccope to review this one (since he requested it in #402). Thoughts or any improvements suggestions super welcome! |
element for invalid inputs.
8525096 to
a6c2ab6
Compare
… Increased length of input elements.
sort to ensure monotonicity (PaperWM cycle widths/heights require monotonic values).
…` variable. Was using `cycle-width-steps` instead of the variable `settingName` so `cycle-height-steps` wasn't being applied.
|
On reflection, I use "useful window widths" a ton but I don't think I've ever actually used "useful window heights" (and in fact, I didn't realize it was a thing until just now). Is it something you added because you wanted to change it, or because you were also making the window widths configurable and it felt like the heights should be, too? |
Heights were there, I actually use them quite a bit as I have a layout I like for several applications and being able to set a specific height (that I use) was part of the early intent of this PR. So bit of a mix - they were there (so might as well have a setting for them like widths), plus I wanted to change/use them anyway. |
|
Yep, I guess I wouldn't mind have the width/height settings hidden / or changing them through dconf, a few thoughts though:
|
Resolves #316, resolves #402
This PR makes the "useful window widths" and "useful window heights" user-settable through the extension pref settings ui.
Inputs supported are percentage or pixel values, e.g.



38.195%; 50%; 61.804%or400px; 800px; 900px. Mixed input types (e.g. input with%ANDpxin it) are not supported and will cause the input box to turn red (error css class), as will any invalid input:Changes are applied immediately (no need to logout/login etc.).
Reset buttons are also provided which will reset width/height values back to the default PaperWM cycle values.
Feedback welcome!