avatarJake Jing
# Summary

This web content provides a comprehensive guide for setting up a macOS environment with the kitty terminal, fish shell, and vifm file manager.

# Abstract

The article presents a detailed tutorial for Mac users to enhance their terminal experience by installing and configuring kitty as their default terminal emulator. It also guides users through setting up the user-friendly fish shell and the powerful vifm file manager. The installation process includes downloading and running scripts, setting default applications, creating keyboard shortcuts, and modifying system settings to ensure a seamless workflow.

# Opinions

- The author believes that using a good terminal tool, such as kitty, can significantly improve workflow efficiency.
- Setting kitty as the default terminal is recommended for a consistent user experience.
- The use of RCDefaultApp.prefPane is suggested for easily changing default applications on macOS.
- Custom keyboard shortcuts, like shift-cmd-1, are encouraged for quick access to terminal tools.
- The author provides a template kitty.conf file for users to download and use, indicating a preference for this configuration.
- Installing fish via a provided bash script simplifies the process, showing the author's intent to make the setup as straightforward as possible.
- Adding fish to /etc/shells and setting it as the default shell is emphasized to fully integrate the fish shell into the user's environment.
- The installation of vifm is included in the fish configuration script, suggesting that the author values an all-in-one solution for terminal setup.
- The author's inclusion of useful links to their GitHub repositories indicates a commitment to providing resources and support for users following the tutorial.

A Complete Tutorial for Kitty to Fish with vifm

A good terminal tool can speed up your workflow, and make your life much easier. Here I give a complete tutorial of installing the kitty terminal, and configuring the fish shell and vifm manager on mac.

  1. kitty

(1) install kitty on mac

>> curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin

(2) set kitty as the default terminal tool

To set kitty as the default application, you need to install a plug-in called “RCDefaultApp.prefPane”. You can download it from my github repository.

>> git clone https://github.com/JakeJing/kittyconfig.git
>> sudo mv kittyconfig/RCDefaultApp.prefPane /Library/PreferencePanes/

This will add an icon of “default apps” in your system preferences, and allow you to set the default terminal tools in this way (system preferences — default Apps — click the “default Apps” — URLS — x-man-page — set the default application as “kitty”).

(3) add shortcut (shift-cmd-1) to open a new kitty terminal window

You can also create a keyboard shortcut to open a new terminal window in the current folder by setting System Preferences — Keyboard — Shortcuts — Services — New kitty wondow here. I am using the keybinding (shift-cmd-1) for open a new kitty window.

(4) download template kitty.conf

>> wget https://raw.githubusercontent.com/JakeJing/kittyconfig/master/kitty.conf -P ~/.config/kitty/

2. fish

(1) install fish shell

Here I provide a bash script for installing fish and vifm in my github repository. If everything works well, you should be able to type fish and vifm in your terminal, and switch to fish shell and vifm.

>> wget https://raw.githubusercontent.com/JakeJing/fishconfig/master/settings_all_mac.sh
>> bash
>> chmd +x settings_all_mac.sh
>> source settings_all_mac.sh

(2) set fish as the default shell

You need to add the fish shell in your /etc/shells. If it doesn’t work due to restricted writing permission, you can try “sudo nano /etc/shells”, and manually add the “/usr/local/bin/fish” at the last line.

sudo sh -c 'echo /usr/local/bin/fish >> /etc/shells'

Restart the terminal and set the fish shell as the default.

chsh -s /usr/local/bin/fish

3. vifm

The previous bash script also include the installation and configurations for vifm. Now you can type vifm on your terminal, and navigate between different directories.

Useful links:

Shell Script
Terminal Commands
Kitty
Fishshell
Bash Script
Recommended from ReadMedium