Skip to content

issue-2076: Add refresh rates to xrandr block.#2223

Merged
bim9262 merged 5 commits intogreshake:masterfrom
zheltikov:issue-2076-xrandr-frame-rates
Jan 7, 2026
Merged

issue-2076: Add refresh rates to xrandr block.#2223
bim9262 merged 5 commits intogreshake:masterfrom
zheltikov:issue-2076-xrandr-frame-rates

Conversation

@zheltikov
Copy link
Contributor

@zheltikov zheltikov commented Dec 30, 2025

  • xrandr: Implement new xrandr output parser with nom.
  • xrandr: Parse monitor refresh rate from xrandr output (vertical Hz)
  • xrandr: Add new placeholder $refresh_rate
  • xrandr: Add unit tests for new parser.

Resolves #2076 .
Depends on #2219 being merged first.

@MaxVerevkin @bim9262 @ammgws

@zheltikov zheltikov force-pushed the issue-2076-xrandr-frame-rates branch from 2ad866f to c6a7b2f Compare December 30, 2025 14:59
@zheltikov zheltikov mentioned this pull request Dec 30, 2025
@bim9262
Copy link
Collaborator

bim9262 commented Jan 5, 2026

Could you rebase this one too to get the checks to pass? @zheltikov

…for parsing output refresh rate (v_clock_hz). Add new $refresh_rate placeholder to xrandr block format string.
@zheltikov zheltikov force-pushed the issue-2076-xrandr-frame-rates branch from c6a7b2f to 8e1e82f Compare January 5, 2026 11:28
@zheltikov
Copy link
Contributor Author

zheltikov commented Jan 5, 2026

Rebased, @bim9262
The CI workflow needs a re-run; however, retrying is only available to maintainers.

//! Key | Values | Default
//! ----|--------|--------
//! `format` | A string to customise the output of this block. See below for available placeholders. | `" $icon $display $brightness_icon $brightness "`
//! `format` | A string to customize the output of this block. See below for available placeholders. | `" $icon $display $brightness_icon $brightness "`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

customise

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -124,41 +125,43 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> {
}

struct Monitor {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just add the new Monitor attributes here instead of making Monitor wrap the parser::Output?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: flattened parser::Output into Monitor.

Copy link
Collaborator

@bim9262 bim9262 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Thanks!

@bim9262 bim9262 merged commit 7d68c03 into greshake:master Jan 7, 2026
13 checks passed
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.

xrandr frame rates?

2 participants