This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/wres1080

13 lines
453 B
Bash
Executable File

#!/usr/bin/env bash
targetwidth="1920"
targetheight="1080"
dimensions="$(bspc query -T -n | jq '.client.tiledRectangle | .width, .height')"
width=$(echo "$dimensions" | head -n 1)
height=$(echo "$dimensions" | tail -n 1)
diffwidth=$((targetwidth - width))
diffheight=$((targetheight - height))
# bspc node -d
echo "width: ${width}, height ${height}, dw ${diffwidth}, dh ${diffheight}"
bspc node focused --resize bottom_right "$diffwidth" "$diffheight"