Skip to content

Set an specific size to a non floating window #2142

Discussion options

You must be logged in to vote

Finally I went with this script and map it to a shortcut.

#!/bin/bash

TARGET_HEIGHT=890
WINDOW_HEIGHT=$(yabai -m query --windows --window | jq '.frame."h"')
WINDOW_HEIGHT=$(echo $WINDOW_HEIGHT | tr -d '"')
RESIZE_AMOUNT=$(echo "$WINDOW_HEIGHT - $TARGET_HEIGHT" | bc)

if (($(echo "$RESIZE_AMOUNT > 0" | bc -l))); then
	yabai -m window --resize bottom:0:-$RESIZE_AMOUNT
fi

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@victor-falcon
Comment options

@victor-falcon
Comment options

@Bellavene
Comment options

@victor-falcon
Comment options

Answer selected by victor-falcon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants