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

7 lines
259 B
Plaintext
Raw Normal View History

2018-05-16 16:22:26 +00:00
#!/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