<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: five-sssss</title>
    <description>The latest articles on DEV Community by five-sssss (@fivesssss).</description>
    <link>https://dev.to/fivesssss</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1060612%2Fa3c39751-a185-42f0-8684-d3884365c41c.png</url>
      <title>DEV Community: five-sssss</title>
      <link>https://dev.to/fivesssss</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fivesssss"/>
    <language>en</language>
    <item>
      <title>Setup practical and appealing terminal on macOS</title>
      <dc:creator>five-sssss</dc:creator>
      <pubDate>Wed, 12 Apr 2023 15:54:18 +0000</pubDate>
      <link>https://dev.to/fivesssss/setup-practical-and-appealing-terminal-on-macos-2f86</link>
      <guid>https://dev.to/fivesssss/setup-practical-and-appealing-terminal-on-macos-2f86</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://www.fivesssss.io/terminal-setup-macos" rel="noopener noreferrer"&gt;author's own blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to set up an appealing and practical terminal on macOS
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Disclaimer - Default terminal
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkt73m808zjvunaygv1zf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkt73m808zjvunaygv1zf.png" alt="macOS Default Terminal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I get it, default terminal is not that bad, it is usable enough and could get you far. Personally I have used various terminal applications and various &lt;a href="https://unix.stackexchange.com/questions/4126/what-is-the-exact-difference-between-a-terminal-a-shell-a-tty-and-a-con" rel="noopener noreferrer"&gt;shells&lt;/a&gt; mainly due to my curiosity.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Curiosity is an interesting feeling... but also dangerous&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I am not going to tell you that you need to change anything with the current setup that you have, if it does the job for you that's good, and I support that, customizing your environment too much could hurt your productivity, however, if you have a bit of a free time and curious to try out something else, I have more or less optimal configuration that worked for me and I certainly hope it would work for you.&lt;/p&gt;

&lt;p&gt;The article focuses on essentials to prevent being overwhelmed by all options and configurations. If you do not care about the looks too much you can straight jump to practicality part, although I would recommend skimming through the whole article, I promise it won't take long.&lt;/p&gt;

&lt;p&gt;Also, I will be using &lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;homebrew&lt;/a&gt; to install all the needed applications, you can use any other way.&lt;/p&gt;

&lt;h3&gt;
  
  
  Looks - Terminal app and prompt
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;iTerm2&lt;/li&gt;
&lt;li&gt;Starship Prompt&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  iTerm2
&lt;/h4&gt;

&lt;p&gt;The main reason of why I use iTerm2 is that I am used to it, you do not have to use iTerm2 to achieve the same look, stay tuned I am in the middle of reviewing other alternatives. For now, let's use iTerm2. Additionally, if you ever decide to extend configuration, it is much easier to do that in iTerm2 with all the customization options you have.&lt;/p&gt;

&lt;p&gt;Let's start by installing iTerm2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--cask&lt;/span&gt; iterm2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once installed, we will customize following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Colors&lt;/li&gt;
&lt;li&gt;Fonts&lt;/li&gt;
&lt;li&gt;Window opacity&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Colors
&lt;/h5&gt;

&lt;p&gt;In order to update the colors all is needed is the color scheme defined as &lt;code&gt;.itermcolors&lt;/code&gt; file, for example, the theme I currently use is &lt;a href="https://github.com/folke/tokyonight.nvim" rel="noopener noreferrer"&gt;"Tokyonight"&lt;/a&gt;. To acquire iTerm2 theme we need to find relevant file together with theme. Most of the theme providers, be it editor theme, shell theme or something else have &lt;code&gt;.itermcolors&lt;/code&gt; provided together too. For example you could find "Tokyonight" iTerm2 color scheme &lt;a href="https://github.com/folke/tokyonight.nvim/tree/main/extras/iterm" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Once you find the file, open it in raw view and copy the content. Create a local file with &lt;code&gt;.itermcolors&lt;/code&gt; extension and paste the copied content into it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Or you can just download those files, your choice&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These are some themes I have, &lt;a href="https://github.com/rumaan/poimandres-iterm/tree/main/themes" rel="noopener noreferrer"&gt;poimandres&lt;/a&gt;,&lt;a href="https://github.com/rebelot/kanagawa.nvim/blob/master/extras/kanagawa.itermcolors" rel="noopener noreferrer"&gt;kanagawa&lt;/a&gt;, &lt;a href="https://github.com/folke/tokyonight.nvim/tree/main/extras/iterm" rel="noopener noreferrer"&gt;tokyonight&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyoj4sqo0jqokl7dqs4i0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyoj4sqo0jqokl7dqs4i0.png" alt="itermcolors"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have files on your system, open up iTerm2, open Settings in the menu bar and go to Profiles &amp;gt; Colors. You should be able to see Color Presets menu in the bottom-right corner, select the menu and choose Import, where you can choose the &lt;code&gt;.itermcolors&lt;/code&gt; file that you have created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqbgna04d19319bj3vqa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqbgna04d19319bj3vqa.png" alt="iterm-color-presets"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, you can browser more themes &lt;a href="https://iterm2colorschemes.com/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Fonts (Nerd Fonts)
&lt;/h5&gt;

&lt;p&gt;Nerd fonts are necessary in order to render certain glyphs (icons). Nerd font is just a patched version of a normal font to enable ability to have icons rendered correctly. I am not going to explain on how to install fonts in macOS, however my preferred method is using &lt;code&gt;brew&lt;/code&gt;, personal I use &lt;a href="https://rubjo.github.io/victor-mono/" rel="noopener noreferrer"&gt;Victor Mono font&lt;/a&gt;, you could install it via brew like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--cask&lt;/span&gt; font-victor-mono-nerd-font
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I use following &lt;a href="https://github.com/Homebrew/homebrew-cask-fonts" rel="noopener noreferrer"&gt;repository&lt;/a&gt; as a source to install fonts and review which nerd fonts are available, you can browse &lt;a href="https://github.com/Homebrew/homebrew-cask-fonts/tree/master/Casks" rel="noopener noreferrer"&gt;casks folder&lt;/a&gt; there to find available fonts. Once nerd font is installed head over to the Settings &amp;gt; Profile &amp;gt; Text menu of iTerm2. You can choose your desired font in the "Font" selection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2pmoy8avdi7zwfkquqwp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2pmoy8avdi7zwfkquqwp.png" alt="iterm-fonts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Window opacity
&lt;/h5&gt;

&lt;blockquote&gt;
&lt;p&gt;This might not be usable for you depending on your theme and workflow, do not ruin your eyes for the looks only, experiment and find what works for you&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Window opacity would add transparency to the terminal, while not very practical I personally find very aesthetically pleasing. Open Settings &amp;gt; Profiles &amp;gt; Window. You will be able to adjust transparency there, add some blur for better visibility.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fusf8ifkvoaa6nw0jhuoo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fusf8ifkvoaa6nw0jhuoo.png" alt="iterm-transparency"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Starship
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://starship.rs/" rel="noopener noreferrer"&gt;Starship&lt;/a&gt; is a "blazingly fast" cross shell prompt. It has many features and reasons to use, but I use it primarily for easiness of configuration and because it is written in rust (I am considering switching my terminal soon due to that, don't judge me).&lt;/p&gt;

&lt;p&gt;Use following command to install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;starship
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once installed ensure your shell is configured to auto-start starship prompt, checkout &lt;a href="https://starship.rs/guide/#%F0%9F%9A%80-installation" rel="noopener noreferrer"&gt;here&lt;/a&gt; for more details. For fish shell, which is what we are going to setup in Practicality section insert following in your &lt;code&gt;~/.config/fish/config.fish&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;starship init fish | &lt;span class="nb"&gt;source&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once we have starship shell up and running, let's modify the configuration, I am not going to teach you how to configure prompt, you could read more &lt;a href="https://starship.rs/config/#prompt" rel="noopener noreferrer"&gt;here&lt;/a&gt;, however to save you time here is the configuration that I use, it should be enough to get you started:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.config/starship.toml&lt;/span&gt;

&lt;span class="nn"&gt;[battery]&lt;/span&gt;
&lt;span class="py"&gt;full_symbol&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"🔋"&lt;/span&gt;
&lt;span class="py"&gt;charging_symbol&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"🔌"&lt;/span&gt;
&lt;span class="py"&gt;discharging_symbol&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"⚡"&lt;/span&gt;

&lt;span class="nn"&gt;[[battery.display]]&lt;/span&gt;
&lt;span class="py"&gt;threshold&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bold red"&lt;/span&gt;

&lt;span class="nn"&gt;[character]&lt;/span&gt;
&lt;span class="py"&gt;error_symbol&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[✖](bold red) "&lt;/span&gt;

&lt;span class="nn"&gt;[cmd_duration]&lt;/span&gt;
&lt;span class="py"&gt;min_time&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10_000&lt;/span&gt;  &lt;span class="c"&gt;# Show command duration over 10,000 milliseconds (=10 sec)&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;" took [$duration]($style)"&lt;/span&gt;

&lt;span class="nn"&gt;[directory]&lt;/span&gt;
&lt;span class="py"&gt;truncation_length&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[$path]($style)[$lock_symbol]($lock_style) "&lt;/span&gt;

&lt;span class="nn"&gt;[git_branch]&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;" [$symbol$branch]($style) "&lt;/span&gt;
&lt;span class="py"&gt;symbol&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"🍣 "&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bold yellow"&lt;/span&gt;

&lt;span class="nn"&gt;[git_commit]&lt;/span&gt;
&lt;span class="py"&gt;commit_hash_length&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bold white"&lt;/span&gt;

&lt;span class="nn"&gt;[git_state]&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'[\($state( $progress_current of $progress_total)\)]($style) '&lt;/span&gt;

&lt;span class="nn"&gt;[git_status]&lt;/span&gt;
&lt;span class="py"&gt;conflicted&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"⚔️ "&lt;/span&gt;
&lt;span class="py"&gt;ahead&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"🏎️ 💨 ×${count}"&lt;/span&gt;
&lt;span class="py"&gt;behind&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"🐢 ×${count}"&lt;/span&gt;
&lt;span class="py"&gt;diverged&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"🔱 🏎️ 💨 ×${ahead_count} 🐢 ×${behind_count}"&lt;/span&gt;
&lt;span class="py"&gt;untracked&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"🛤️  ×${count}"&lt;/span&gt;
&lt;span class="py"&gt;stashed&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"📦 "&lt;/span&gt;
&lt;span class="py"&gt;modified&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"📝 ×${count}"&lt;/span&gt;
&lt;span class="py"&gt;staged&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"🗃️  ×${count}"&lt;/span&gt;
&lt;span class="py"&gt;renamed&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"📛 ×${count}"&lt;/span&gt;
&lt;span class="py"&gt;deleted&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"🗑️  ×${count}"&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bright-white"&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"$all_status$ahead_behind"&lt;/span&gt;

&lt;span class="nn"&gt;[hostname]&lt;/span&gt;
&lt;span class="py"&gt;ssh_only&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"&amp;lt;[$hostname]($style)&amp;gt;"&lt;/span&gt;
&lt;span class="py"&gt;trim_at&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"-"&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bold dimmed white"&lt;/span&gt;
&lt;span class="py"&gt;disabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="nn"&gt;[memory_usage]&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"$symbol[${ram}( | ${swap})]($style) "&lt;/span&gt;
&lt;span class="py"&gt;threshold&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;70&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bold dimmed white"&lt;/span&gt;
&lt;span class="py"&gt;disabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;span class="nn"&gt;[package]&lt;/span&gt;
&lt;span class="py"&gt;disabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="nn"&gt;[python]&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bold green"&lt;/span&gt;

&lt;span class="nn"&gt;[rust]&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[$symbol$version]($style) "&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bold green"&lt;/span&gt;

&lt;span class="nn"&gt;[time]&lt;/span&gt;
&lt;span class="py"&gt;time_format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"%T"&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"🕙 $time($style) "&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bright-white"&lt;/span&gt;
&lt;span class="py"&gt;disabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;span class="nn"&gt;[username]&lt;/span&gt;
&lt;span class="py"&gt;style_user&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bold dimmed blue"&lt;/span&gt;
&lt;span class="py"&gt;show_always&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;span class="nn"&gt;[nodejs]&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"via [🤖 $version](bold green) "&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Practicality - Fish Shell and utilities
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Fish Shell - Best shell for me
&lt;/h4&gt;

&lt;p&gt;Fish shell feels fast with out of the box autocomplete support based on your history. I started to use fish long time and just stuck with it, recently I have tried zsh shell with powerlevel10k setup, felt slower so I went back to fish.&lt;/p&gt;

&lt;p&gt;To install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;fish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To set fish as your default shell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;fish
&lt;span class="nv"&gt;$ &lt;/span&gt;fish_add_path /opt/homebrew/bin
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"/opt/homebrew/bin/fish"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/shells
&lt;span class="nv"&gt;$ &lt;/span&gt;chsh &lt;span class="nt"&gt;-s&lt;/span&gt; /opt/homebrew/bin/fish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;fish_add_path /opt/homebrew/bin&lt;/code&gt; ensures fish recognizes homebrew &lt;code&gt;$PATH&lt;/code&gt;, we would need to add that into our config later&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shells&lt;/code&gt; adds fish shell to known shells&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chsh -s /opt/homebrew/bin/fish&lt;/code&gt; sets fish as your default shell&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once fish shell installed and configured as your default shell, you would need to logout and log back in, now whenever you open iTerm2 it would start with fish shell.&lt;/p&gt;

&lt;p&gt;Let's edit the configuration.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to your fish config folder &lt;code&gt;$ cd ~/.config/fish&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;config.fish&lt;/code&gt; file with your favourite code/text editor&lt;/li&gt;
&lt;li&gt;Add the line that we have already covered there &lt;code&gt;fish_add_path /opt/homebrew/bin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Also add the &lt;code&gt;starship&lt;/code&gt; init script &lt;code&gt;starship init fish | source&lt;/code&gt;, note that it should be &lt;strong&gt;always at the end of the file&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Save the file, close iTerm2 and open it again, now you should see a nice looking terminal.&lt;/p&gt;

&lt;h4&gt;
  
  
  exa - A modern ls replacement
&lt;/h4&gt;

&lt;p&gt;exa is a faster and modern replacement for ls (written in rust btw).&lt;/p&gt;

&lt;p&gt;Install it like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;exa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't want to combat your muscle memory add these aliases to your &lt;code&gt;config.fish&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias ls&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'exa -al --color=always --group-directories-first --icons'&lt;/span&gt; &lt;span class="c"&gt;# preferred listing&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;la&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'exa -a --color=always --group-directories-first --icons'&lt;/span&gt; &lt;span class="c"&gt;# all files and dirs&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;ll&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'exa -l --color=always --group-directories-first --icons'&lt;/span&gt; &lt;span class="c"&gt;# long format&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;lt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'exa -aT --color=always --group-directories-first --icons'&lt;/span&gt; &lt;span class="c"&gt;# tree listing&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;l.&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"exa -a | egrep '^&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="s2"&gt;'"&lt;/span&gt; &lt;span class="c"&gt;# show only dotfiles&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  ripgrep - Faster grep (Optional)
&lt;/h4&gt;

&lt;p&gt;ripgrep is a faster &lt;code&gt;grep&lt;/code&gt; (written in rust btw).&lt;/p&gt;

&lt;p&gt;Install it like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;ripgrep
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add this alias to your &lt;code&gt;config.fish&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias grep&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'rg --color=auto'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &amp;lt;keyword to get&amp;gt; &amp;lt;path to file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example to get alias keyword in &lt;code&gt;config.fish&lt;/code&gt; file use following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep alias&lt;/span&gt; .config/fish/config.fish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See &lt;a href="https://github.com/ogham/exa" rel="noopener noreferrer"&gt;docs&lt;/a&gt; for more.&lt;/p&gt;

&lt;h4&gt;
  
  
  fd - Faster find (Optional)
&lt;/h4&gt;

&lt;p&gt;fd is fast and user friendly alternative to &lt;code&gt;find&lt;/code&gt; (written in rust btw).&lt;/p&gt;

&lt;p&gt;Install it like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;fd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;fd config.fish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See &lt;a href="https://github.com/sharkdp/fd" rel="noopener noreferrer"&gt;docs&lt;/a&gt; for more.&lt;/p&gt;

&lt;h4&gt;
  
  
  Bonus configurations for fish shell
&lt;/h4&gt;

&lt;p&gt;Aliases (pretty self-explanatory):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; ..&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd ..'&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; ...&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd ../..'&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; ....&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd ../../..'&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; .....&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd ../../../..'&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; ......&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd ../../../../..'&lt;/span&gt;
&lt;span class="nb"&gt;alias dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'dir --color=auto'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;please&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'sudo'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you notice everytime you open terminal it shows a "greeting" message from fish, to remove add this in your &lt;code&gt;config.fish&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;set &lt;/span&gt;fish_greeting &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>iterm</category>
      <category>macos</category>
      <category>fish</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
