Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix newlines in yabai output #402

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

ZhongXiLu
Copy link
Contributor

Description

Whenever I cmd + f in my Google Chrome to search the web page, the parsing of the yabai windows output fails due to a newline in the output. Google Chrome will prefix the window title with "Find in page\n":

{
  "title": "Find in page\n    Amazon Web Services Sign-In"
}

I'm not sure since when this was broken, possibly since f165275, but reverting this commit still did not fix this issue. I got it fixed by adding the | tr -d '\n' at the end instead.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I manually tested this.

Before my commit, it would show "... JSON error..." in the bar if I would cmd + f on a page. After my commit, it works normally.

Test Configuration:

  • OS version Sonoma 14.5
  • Yabai version yabai-v7.1.1
  • Übersicht version Version 1.6 (82)
  • Google Chrome version 124.0.6367.209

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@Jean-Tinland
Copy link
Owner

Oh, sorry I must have broken your fix by simplifying the new line cleanup thinking it would still work.

@Jean-Tinland Jean-Tinland merged commit e958ea2 into Jean-Tinland:master May 20, 2024
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.

None yet

2 participants