Terminal – How MacPorts Works with /Applications/MacPorts and /opt/usr/local/bin

macportsterminalwindow-manager

I have installed i3 under MacPorts. Whenever I run uxterm under X11 it works as expected and I can get vertical and horizontal splits with i3. However, when I try to run kitty — also installed under MacPorts, I get a terminal that opens up as if it was a native OSX application, and not one managed by the Xorg Server that MacPorts installed.

Note, MacPorts installs i3 to /opt/local/bin, and it installs kitty to /Applications/MacPorts/kitty.app. What are the implications of these two different install paths, and can I get i3 to work with MacPorts kitty?

Best Answer

The different install paths does not have a consequence here. It doesn't matter where the application is installed in terms of running under X11 or native OS X.

kitty on macOS is a native macOS application, and is not "managed" by Xorg. You do not need Xquartz, Xorg or X11 at all to run kitty on macOS.

i3 is a window manager for X11. It will only work with and affect X11 applications. You will not be able to use it as a tiling window manager for native macOS applications, such as the default kitty.

In order for kitty to be managed by i3 you would have to recompile kitty using an X11 backend, if that is possible. The X11 backend is already made as it is used on Linux. However it doesn't seem like the X11 backend has been tested on macOS, as the author intends the user to use the native Carbon backend.

Another solution would be to install a macOS tiling window manager such as chunkwm with skhd. That window manager would then be able to tile windows of both native macOS applications as well as the ones managed by XQuartz for example.