1
0
Fork 0
dotfiles/files/.local/bin/center-float

7 lines
259 B
Bash
Executable File

#!/bin/bash
set -- \
$(i3-msg -t get_workspaces | jq --raw-output '. | map(select(.focused == true)) | .[].rect | [.width, .height] | @sh')
i3-msg -q floating toggle
i3-msg -q resize set $(( $1/3*2 )) $(( $2/3*2 ))
i3-msg -q move absolute position center