Skip to content

hyprland/language: add tooltip-format support#5099

Open
jarlyn95 wants to merge 1 commit into
Alexays:masterfrom
jarlyn95:codex/hyprland-language-tooltip-format
Open

hyprland/language: add tooltip-format support#5099
jarlyn95 wants to merge 1 commit into
Alexays:masterfrom
jarlyn95:codex/hyprland-language-tooltip-format

Conversation

@jarlyn95

@jarlyn95 jarlyn95 commented Jun 4, 2026

Copy link
Copy Markdown

Summary

  • add tooltip-format support to the hyprland/language module
  • format tooltip text with the same layout placeholders as format: {}, {long}, {short}, {shortDescription}, and {variant}
  • document the new option in waybar-hyprland-language(5)

Closes #3693

Validation

  • git diff --check HEAD~1..HEAD

I could not run a full Meson/Ninja build in this Windows workspace because the required Linux build tools and Waybar system dependencies were not installed; Docker image setup timed out before completing.

Copilot AI review requested due to automatic review settings June 4, 2026 12:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds configurable tooltip formatting to the Hyprland language module so users can display different text in the tooltip than in the label.

Changes:

  • Parse a new tooltip-format config option for hyprland/language.
  • Set tooltip markup during update() using the configured tooltip format (or fall back to the label text).
  • Refactor layout formatting into a shared helper (lambda) to avoid duplication.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/modules/hyprland/language.cpp Implements tooltip-format parsing and tooltip rendering; refactors formatting into a helper.
include/modules/hyprland/language.hpp Adds storage for the tooltip format string.
man/waybar-hyprland-language.5.scd Documents the new tooltip-format option and adds an example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +42 to +48
const auto formatLayout = [this](const std::string& format) {
return trim(fmt::format(fmt::runtime(format), layout_.short_name,
fmt::arg("long", layout_.full_name),
fmt::arg("short", layout_.short_name),
fmt::arg("shortDescription", layout_.short_description),
fmt::arg("variant", layout_.variant)));
};
Comment on lines +66 to +69
if (tooltipEnabled()) {
label_.set_tooltip_markup(
tooltip_format_.empty() ? layoutName : formatLayout(tooltip_format_));
}
Comment on lines +42 to +48
const auto formatLayout = [this](const std::string& format) {
return trim(fmt::format(fmt::runtime(format), layout_.short_name,
fmt::arg("long", layout_.full_name),
fmt::arg("short", layout_.short_name),
fmt::arg("shortDescription", layout_.short_description),
fmt::arg("variant", layout_.variant)));
};
Comment on lines +20 to +22
*tooltip-format*: ++
typeof: string ++
The format, how information should be displayed in the tooltip. This format supports the same replacements as *format*.
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.

(hyprland/language) [Feature request] Tooltip on the module

3 participants