Skip to content

Make "useful window widths" and "useful window heights" user-configurable through PaperWM extension settings#456

Merged
jtaala merged 6 commits intopaperwm:developfrom
PaperWM-redux:cycle-steps-user-configurable-prefs
Jan 21, 2023
Merged

Make "useful window widths" and "useful window heights" user-configurable through PaperWM extension settings#456
jtaala merged 6 commits intopaperwm:developfrom
PaperWM-redux:cycle-steps-user-configurable-prefs

Conversation

@jtaala
Copy link
Copy Markdown
Collaborator

@jtaala jtaala commented Dec 27, 2022

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% or 400px; 800px; 900px. Mixed input types (e.g. input with % AND px in it) are not supported and will cause the input box to turn red (error css class), as will any invalid input:
image
image
image

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!

image

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).
@jtaala jtaala changed the title Make "useful window widths" and "useful window heights" user-configuration through PaperWM extension settings Make "useful window widths" and "useful window heights" user-configurable through PaperWM extension settings Dec 28, 2022
@jtaala
Copy link
Copy Markdown
Collaborator Author

jtaala commented Dec 28, 2022

@ccope could you review / test this one when you get a chance?

@jtaala
Copy link
Copy Markdown
Collaborator Author

jtaala commented Dec 28, 2022

@Gelbana @tadfisher @smichel17 - just FYI, asked ccope to review this one (since he requested it in #402).

Thoughts or any improvements suggestions super welcome!

Comment thread Settings.ui Outdated
Comment thread prefs.js Outdated
@jtaala jtaala force-pushed the cycle-steps-user-configurable-prefs branch from 8525096 to a6c2ab6 Compare December 29, 2022 08:29
@jtaala jtaala requested a review from smichel17 December 29, 2022 09:32
@jtaala jtaala marked this pull request as ready for review December 29, 2022 09:32
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.
@jtaala jtaala removed the request for review from smichel17 January 21, 2023 12:29
@jtaala jtaala merged commit b644867 into paperwm:develop Jan 21, 2023
@smichel17
Copy link
Copy Markdown
Member

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?

@jtaala
Copy link
Copy Markdown
Collaborator Author

jtaala commented Jan 29, 2023

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.

@jtaala
Copy link
Copy Markdown
Collaborator Author

jtaala commented Jan 29, 2023

Yep, I guess I wouldn't mind have the width/height settings hidden / or changing them through dconf, a few thoughts though:

  • having them in settings allows changing them without needing a shell-reload (which is handy for fine-tuning without needing restart/login-logout if in wayland)... but there's ways to keep that behaviour with changes via gsettings/dconf;
  • it's much easier to let users know when they input invalid inputs if in settings (e.g. input boxes turn red) - users will probably try to input/mix % and px values (or some other invalid inputs) and currently the box turns red letting them know when inputs aren't right. We could throw an error user notification when they try to use the invalid widths/heights though... so maybe this one isn't such a big deal.

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

Successfully merging this pull request may close these issues.

Make Useful Window Widths/Heights configurable via the Extensions tool Add a setting for the default window size(s)

2 participants