Skip to content

fix: 1824 keybind shortcut was throwing initilization issue and after… - #1827

Closed
viveksharma48 wants to merge 1 commit into
HyDE-Project:devfrom
viveksharma48:vivek/1824
Closed

fix: 1824 keybind shortcut was throwing initilization issue and after…#1827
viveksharma48 wants to merge 1 commit into
HyDE-Project:devfrom
viveksharma48:vivek/1824

Conversation

@viveksharma48

@viveksharma48 viveksharma48 commented Jul 23, 2026

Copy link
Copy Markdown

… few retrys was dumping entire json (each line as new entry)

Pull Request

Description

Type of change

Please put an x in the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (non-breaking change; modified files are limited to the documentations)
  • Technical debt (a code change that does not fix a bug or add a feature but makes something clearer for devs)
  • Other (provide details below)

Checklist

Please put an x in the boxes that apply:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My commit message follows the commit guidelines.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.
  • I have added necessary comments/documentation to my code.
  • I have added tests to cover my changes.
  • I have tested my code locally and it works as expected.
  • All new and existing tests passed.

Screenshots

(if appropriate)

Additional context

Add any other context about the problem here.

Summary by CodeRabbit

  • New Features

    • Added automatic floating behavior for Ghidra’s “No Active Project” window.
    • Improved keyboard shortcut hint handling, including support for cleaner keycode display.
  • Bug Fixes

    • Improved reliability when reading Hyprland keybinding data.
    • Updated the default keybinding hint output format to Rofi.

… few retrys was dumping entire json (each line as new entry)
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a Hyprland rule to float Ghidra’s inactive-project window and updates Hyprland keybind parsing, unmapped key display, and CLI output defaults.

Changes

Ghidra window rule

Layer / File(s) Summary
Float inactive Ghidra project window
Configs/.config/hypr/windowrules.conf
Adds a rule matching Ghidra’s “NO ACTIVE PROJECT” title and setting the window to float.

Hyprland keybind hint handling

Layer / File(s) Summary
Sanitize and format keybind output
Configs/.local/lib/hyde/keybinds/hint-hyprland.py
Sanitizes hyprctl binds -j output before JSON parsing, returns unmapped keycodes directly, and changes the default CLI format to rofi.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit hops through Hyprland’s glow,
Ghidra floats where projects sleep below.
Keys parse clean, unknown ones show,
Rofi now leads the hints in flow.
Nibble, bind, and onward go!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the keybind initialization bug fix described in the changeset and issue #1824.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Configs/.local/lib/hyde/keybinds/hint-hyprland.py`:
- Around line 18-20: Update the sanitization substitutions in the JSON cleanup
flow to preserve valid primitive types: do not quote numeric keycode values or
boolean allow_input_capture values. Only quote genuinely malformed string
tokens, then ensure map_codeDisplay integer lookups and boolean checks receive
their expected native types.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 30ad1b7b-13f9-4e54-a5fc-17ae3dc186e4

📥 Commits

Reviewing files that changed from the base of the PR and between 1ca4d45 and e1f9e02.

📒 Files selected for processing (2)
  • Configs/.config/hypr/windowrules.conf
  • Configs/.local/lib/hyde/keybinds/hint-hyprland.py

Comment on lines +18 to +20
clean_json = result.stdout
clean_json = re.sub(r'("keycode":\s*)([^"\s,\}]+)(\s*[,}])', r'\1"\2"\3', clean_json)
clean_json = re.sub(r'("allow_input_capture":\s*)([^"\n]+?)(,\s*\n)', r'\1"\2"\3', clean_json)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve JSON primitive types during sanitization.

These substitutions convert valid values such as keycode: 87 into "87" and allow_input_capture: false into "false". Consequently, map_codeDisplay cannot match its integer map keys, and boolean checks may treat "false" as truthy. Only quote genuinely malformed string tokens, or normalize types before downstream lookups.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Configs/.local/lib/hyde/keybinds/hint-hyprland.py` around lines 18 - 20,
Update the sanitization substitutions in the JSON cleanup flow to preserve valid
primitive types: do not quote numeric keycode values or boolean
allow_input_capture values. Only quote genuinely malformed string tokens, then
ensure map_codeDisplay integer lookups and boolean checks receive their expected
native types.

@kRHYME7 kRHYME7 closed this Jul 25, 2026
@kRHYME7

kRHYME7 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

closing as the issue should be fix in upstream Hyprland

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.

2 participants