Skip to content

Conversation

c4software
Copy link
Contributor

@c4software c4software commented Sep 8, 2025

Hi,

Simple submenu to allow users a quick resolution change, scale for connected screen using hyprctl, walker and gum.

screenrecording-2025-09-10_15-08-47.mp4

The current selected value is in italics, and the script at the end explains how to persist this new configuration. If the user only have one screen do not prompt for it. At the end it's also save the configuration to the monitors.conf file.

Features :

  • Lists monitors.
  • Lists compatible resolutions (including preferred and disabled, which are not shown in the video in the PR).
  • Lists scaling options (including auto, also not shown in the video).
  • Saves the result and updates the monitors.conf file in a dedicated block at the end.
  • Basic profiles system to backup, restore, manage the screen configuration.
screenrecording-2025-09-13_17-12-46.mp4

This script allows users to change a monitor's resolution and scale in Hyprland interactively using fzf for selection and gum for confirmation.
@axelfontaine
Copy link

Shouldn't the TUI offer to persist it for the user as well?

@c4software
Copy link
Contributor Author

Shouldn't the TUI offer to persist it for the user as well?

It's easy to do, but if you go in this direction hyprmon is a larger tool but can persist and create profiles.

The idea behind this script is just to offer a quick way to temporarily change a monitor resolution.

@LucaNerlich
Copy link

The idea behind this script is just to offer a quick way to temporarily change a monitor resolution.

but why would I want that? Honest question.

@c4software
Copy link
Contributor Author

The idea behind this script is just to offer a quick way to temporarily change a monitor resolution.

but why would I want that? Honest question.

In my case it is to reduce scaling/resolution when doing presentations (classrooms, meeting etc)

@abenz1267
Copy link
Contributor

abenz1267 commented Sep 10, 2025

I don't see the point of this being a TUI instead of just being a submenu.

@c4software
Copy link
Contributor Author

I don't see the point of this being a TUI instead of just being a submenu.

A submenu is a nice idea, but the user can have multiple screens not just one. And it's just easier to make this evolve outside of the current code of the menu IMO.

@abenz1267
Copy link
Contributor

abenz1267 commented Sep 10, 2025

What exactly is the issue with multiple screens?

A bash script to maintain is a bash script to maintain and the benefits from a better UX outweights the cons of having to maintain slightly more. If at all.

Also: persistency is a must.

@c4software
Copy link
Contributor Author

Yes you right I will use Walker to render the list instead of fzf to match the style of the menu.

@c4software
Copy link
Contributor Author

There it is :

screenrecording-2025-09-10_11-54-14.mp4

@abenz1267
Copy link
Contributor

Way better, or not :P. Only minor nitpick: if there's only 1 monitor there's no reason to offer a selection.

@c4software c4software changed the title Add TUI to select a resolution Add submemu to select a resolution, scale for connected screen Sep 10, 2025
@c4software
Copy link
Contributor Author

Way better, or not :P. Only minor nitpick: if there's only 1 monitor there's no reason to offer a selection.

Nice idea.

Refactor monitor selection logic to handle single and multiple monitors more clearly. Update comments for better understanding.
@c4software
Copy link
Contributor Author

Done, I also update the PR description accordingly.

@abenz1267
Copy link
Contributor

Is there a good reason for the confirmation via gum? should be dropped imo. If you want confirmation that should also be done in walker.

Personally I'd remove the confirmation though.

@c4software
Copy link
Contributor Author

Is there a good reason for the confirmation via gum? should be dropped imo. If you want confirmation that should also be done in walker.

Personally I'd remove the confirmation though.

It's just because the confirmation also explain how to persist the configuration, and display « Monitor, Resolution, scale ».

@abenz1267
Copy link
Contributor

Is there a good reason for the confirmation via gum? should be dropped imo. If you want confirmation that should also be done in walker.
Personally I'd remove the confirmation though.

It's just because the confirmation also explain how to persist the configuration, and display « Monitor, Resolution, scale ».

Yeah, but there's no real reason for it. It's not something system critical and i think it's fair to assume users aren't fully dense. It's also easy to correct, IF someone chose the wrong option. Having a confirmation screen for that... seems overblown.

You can ofc keep it if you feel like it's necessary. But then make it a selection in walker and not annoy the user by popping up a different UI.

For the persistency, i already wrote that above: it should just default to make it persistent. That's what users would expect.

@c4software
Copy link
Contributor Author

I'm updating the PR to handle :

  • Saving to the monitors.conf with updating if already present.
  • Automatic mode.
  • Disable screen.

@c4software
Copy link
Contributor Author

Working great :

It's now handle :

  • Saving the configuration.
  • Disable / Enable screen
  • Multiple monitor.
screenrecording-2025-09-10_15-08-47.mp4

@c4software
Copy link
Contributor Author

And I also added preferred resolution and auto scale.

@c4software c4software changed the title Add submemu to select a resolution, scale for connected screen Add submemu to select a resolution, scale for connected monitors Sep 10, 2025
Added user prompt for saving configuration when applying monitor settings.
@c4software
Copy link
Contributor Author

I also add options to save profiles (save, load, delete)

screenrecording-2025-09-13_17-12-46.mp4

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.

4 participants