Skip to content

Focus Screen#489

Closed
TaylorBeeston wants to merge 8 commits intowayvr-org:mainfrom
TaylorBeeston:pr/focus-screen-clean
Closed

Focus Screen#489
TaylorBeeston wants to merge 8 commits intowayvr-org:mainfrom
TaylorBeeston:pr/focus-screen-clean

Conversation

@TaylorBeeston
Copy link
Copy Markdown

What this is

This adds a screen-focus flow to WayVR so a specific desktop screen can be pulled into a focused VR view and then restored back to its normal state. It also includes the focused-screen tuning/config plumbing and the Hyprland helper scripts I’ve been using locally to exercise the feature against the active monitor/window.

The basic idea is that you can make a global keybind to "focus" a screen. Focusing a screen moves it directly in front of you and automatically rotates/translates it based on your head movement to make it easier to work with. It really helps with text in particular.

You can also have it focus a cropped part of a screen, which is nice if you just want to focus e.g. a single window, though that takes some extra work user-side. One of the scripts does this for you if you use Hyprland like me though =)

How it works

wayvrctl adds two entry points for this:

  • screen-focus-toggle <SCREEN_NAME>
  • screen-focus-at [--crop-x ... --crop-y ... --crop-w ... --crop-h ... --refresh-only] <SCREEN_NAME> <TARGET_X> <TARGET_Y>

Those commands send a screen-focus IPC request into WayVR. The runtime then:

  • looks up the target screen overlay
  • saves that screen’s current state and crop rect
  • applies a focused transform using the configured distance / scale / cylindrical curve / look-assist values
  • optionally applies a crop rect so the focused view can track a sub-region instead of the whole screen
  • animates between the original and focused states

The screen-focus-at --refresh-only path is there so an external helper can keep updating the focused crop/target in place without toggling the focus mode off and back on each time.

How to test it

Manual CLI testing:

  • wayvrctl screen-focus-toggle <SCREEN_NAME>
  • wayvrctl screen-focus-at <SCREEN_NAME> 0.5 0.5
  • wayvrctl screen-focus-at --crop-x 0.1 --crop-y 0.1 --crop-w 0.6 --crop-h 0.6 <SCREEN_NAME> 0.5 0.5

Hyprland-based testing:

  • scripts/wayvr-hypr-screen-toggle.sh toggles focus for the active monitor
  • scripts/wayvr-hypr-local.sh / scripts/wayvr-hypr-helper-local.sh focus the active monitor, derive crop/target from the active window, and keep it refreshed as the active window changes
  • scripts/test-focus.sh is a quick sanity check for the exposed CLI flow

Validation run on this branch:

  • cargo fmt --all
  • cargo check -p wayvr-ipc
  • cargo check -p wayvrctl
  • cargo check -p wayvr
  • cargo test -p wayvr-ipc
  • cargo test -p wayvrctl
  • cargo test -p wayvr
  • cargo run -q -p wayvrctl -- screen-focus-at --help

TaylorBeeston and others added 8 commits April 11, 2026 15:11
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@galister
Copy link
Copy Markdown
Collaborator

I'm going to reject this. The code in general seems like a mess, would take too much effort to bring it up to acceptable quality, and I honestly don't even want to spend my time reviewing it properly after taking a quick look. It's full-on slop. I want to avoid adding AI generated code. Nobody knows how it works, it only results in increased maintenance burden.

@galister galister closed this Apr 22, 2026
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