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

Feat: monocle mode #478

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

Fuann-Kinoko
Copy link
Contributor

@Fuann-Kinoko Fuann-Kinoko commented Dec 16, 2023

Hi, I've tried to add a simple monocle implementation #78 that doesn't involve any modifications to the existing tiling window logic.

Instead of defining new monocle containers, it just draws each tiling window (floating windows are ignored) in the workspace where isMonocle is set to true, to fit most of the screen (the same size as the rectangle of a tiled window with a 100% size percentage). If the isMonocle flag is set to false, then GlazeWM restores the position of the managed windows correctly, since they were never touched or modified in monocle mode.

And because there are only two directions in Monocle mode: next/prev, I've also added two commands: focus next/prev to focus the corresponding window in the nested window tree (they're essentially the same as focusInDirection, but less restrictive), and an override of hjkl to focus next/prev when the workspace is in monocle mode.

This implementation can be tested by adding a keyboard binding to the command toggle monocle (focus next and focus prev is also added).

@Fuann-Kinoko
Copy link
Contributor Author

Fuann-Kinoko commented Dec 17, 2023

bar component monocle indicator added for convenience

    - type: "monocle indicator"
      label_entered: "󰊓"
      label_exited: " "
      foreground: "#b4637a"

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

1 participant