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

feature request: something like sway's smart_borders #1350

Closed
goolord opened this issue Aug 13, 2022 · 4 comments
Closed

feature request: something like sway's smart_borders #1350

goolord opened this issue Aug 13, 2022 · 4 comments

Comments

@goolord
Copy link

goolord commented Aug 13, 2022

smart_borders on|no_gaps|off

    If smart_borders are on, borders will only be enabled if the workspace has more than one visible child. If smart_borders is set to no_gaps, borders will only be enabled if the workspace has more than one visible child and gaps equal to zero.

just something i miss from sway

@goolord
Copy link
Author

goolord commented Aug 13, 2022

here's how i'm currently faking this feature

yabai -m signal --add event=window_created action=/Users/zach/.local/bin/yabai-smart-borders.sh
yabai -m signal --add event=window_destroyed action=/Users/zach/.local/bin/yabai-smart-borders.sh
yabai -m signal --add event=window_moved action=/Users/zach/.local/bin/yabai-smart-borders.sh
yabai -m signal --add event=window_minimized action=/Users/zach/.local/bin/yabai-smart-borders.sh
yabai -m signal --add event=window_deminimized action=/Users/zach/.local/bin/yabai-smart-borders.sh
yabai -m signal --add event=space_changed action=/Users/zach/.local/bin/yabai-smart-borders.sh
#! /usr/bin/env zsh
NUM_WINDOWS=$(yabai -m query --windows --space mouse | jq -c '[.[] | select (."is-floating" == false and ."is-visible" == true)] | length')

if [ "$NUM_WINDOWS" = "1" ] || [ "$NUM_WINDOWS" = "0" ]; then
    yabai -m config --space mouse window_border off
else
    yabai -m config --space mouse window_border on
fi

@koekeishiya
Copy link
Owner

I don't think the --space selector applies to the window_border config.

@goolord
Copy link
Author

goolord commented Aug 14, 2022

oh, maybe not. it works for me regardless, maybe because i have a single monitor setup and can't see more than one space at a time

@koekeishiya
Copy link
Owner

Borders have been removed in the latest release (v6.0.0) (#1889) because of multiple issues present in both Ventura and Sonoma.

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

No branches or pull requests

2 participants