Then you can use the center-window-frame window modal action to use it like the following:
Creates an advisable function called windows.position-window-center that takes the center-ratio config string and the target window. It is responsible for parsing the center-ratio string into numbers, and applying them to the target window. The advisable function gives users the option of overriding it to parse the center-ratio string in a different format and apply the calculation differently if needed.
If an option is not set, defaults to 80:50 which is a percentage of the screen. This is nearly identical to the previous version defaults.
NOTE: This PR depends on #118. Once that is merged, I'll rebase to reduce noise.
Fixes #119
Allows you to add something like the following to your config.fnl:
Then you can use the center-window-frame window modal action to use it like the following:
Creates an advisable function called
windows.position-window-center
that takes the center-ratio config string and the target window. It is responsible for parsing the center-ratio string into numbers, and applying them to the target window. The advisable function gives users the option of overriding it to parse the center-ratio string in a different format and apply the calculation differently if needed.If an option is not set, defaults to
80:50
which is a percentage of the screen. This is nearly identical to the previous version defaults.