<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Cli on &lt;raj.sh&#39;log&gt;</title>
    <link>https://shalemrajkumar.github.io/tags/cli/</link>
    <description>Recent content in Cli on &lt;raj.sh&#39;log&gt;</description>
    <generator>Hugo -- 0.148.2</generator>
    <language>en</language>
    <atom:link href="https://shalemrajkumar.github.io/tags/cli/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Terminal Emulator</title>
      <link>https://shalemrajkumar.github.io/mydocs/terminal_emulator/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://shalemrajkumar.github.io/mydocs/terminal_emulator/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Terminal Emulators replicate the functionality of traditional computer terminals within a GUI environment. They allow users to interact with the command line interface (CLI) of an operating system, providing a text-based interface for executing commands, running scripts, and managing files.&lt;/p&gt;
&lt;h2 id=&#34;best-terminal-emulators&#34;&gt;Best Terminal Emulators&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;https://sw.kovidgoyal.net/kitty/&#34;&gt;Kitty&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://ghostty.org/&#34;&gt;Ghostty&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://wezterm.org/index.html&#34;&gt;WezTerm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://alacritty.org/&#34;&gt;Alacritty&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;alacritty&#34;&gt;Alacritty&lt;/h2&gt;
&lt;p&gt;I am not really a power user of Alacritty, but I have heard good things about it. It has been known for its speed and simplicity, I liked it have some level of vim-like keybindings for navigation.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<h2 id="introduction">Introduction</h2>
<p>Terminal Emulators replicate the functionality of traditional computer terminals within a GUI environment. They allow users to interact with the command line interface (CLI) of an operating system, providing a text-based interface for executing commands, running scripts, and managing files.</p>
<h2 id="best-terminal-emulators">Best Terminal Emulators</h2>
<ol>
<li><a href="https://sw.kovidgoyal.net/kitty/">Kitty</a></li>
<li><a href="https://ghostty.org/">Ghostty</a></li>
<li><a href="https://wezterm.org/index.html">WezTerm</a></li>
<li><a href="https://alacritty.org/">Alacritty</a></li>
</ol>
<h2 id="alacritty">Alacritty</h2>
<p>I am not really a power user of Alacritty, but I have heard good things about it. It has been known for its speed and simplicity, I liked it have some level of vim-like keybindings for navigation.</p>
<p>My Alacritty <a href="">config files</a> with Dracula theme.</p>
<h2 id="kitty">Kitty</h2>
<ol>
<li>Install Kitty</li>
</ol>
<pre tabindex="0"><code>sudo pacman -S Kitty
</code></pre><ol start="2">
<li>make config file</li>
</ol>
<pre tabindex="0"><code>nvim ~/.config/kitty/kitty.conf
</code></pre><ol start="3">
<li>Create a symbolic link for the config file:</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-fish" data-lang="fish"><span style="display:flex;"><span><span style="color:#a6e22e">ln</span> <span style="color:#a6e22e">-s</span> ~/dotfiles/kitty/kitty.conf ~/.config/kitty/kitty.conf
</span></span></code></pre></div><ol start="4">
<li>Create kitty config file. I used kitty <a href="https://github.com/Fadilix/dotfiles/blob/main/kitty/kitty.conf">config file</a> from Fadilix.</li>
</ol>
<pre tabindex="0"><code>nvim ~/.config/kitty/kitty.conf
</code></pre><ol start="5">
<li>I have updated my fish shell config such that my alias for ls uses <code>exa</code> with colors and icons. This is important to make use of hyperlinks in kitty. default ls users can use <code>ls --hyperlink=auto</code>.</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-fish" data-lang="fish"><span style="display:flex;"><span>alias ls<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;exa --hyperlink --icons --color=auto&#39;</span>
</span></span></code></pre></div><ol start="6">
<li>create a new file in <code>~/config/kitty/open-action.conf</code> and add the following content</li>
</ol>
<pre tabindex="0"><code class="language-conf" data-lang="conf"># Tail a log file (*.log) in a new OS Window and reduce its font size
protocol file
ext log
action launch --title ${FILE} --type=os-window tail -f -- ${FILE_PATH}
action change_font_size current -2

# Open any file with a fragment in vim, fragments are generated
# by the hyperlink-grep kitten and nothing else so far.
protocol file
fragment_matches [0-9]+
action launch --type=overlay --cwd=current vim +${FRAGMENT} -- ${FILE_PATH}

# Open text files without fragments in the editor
protocol file
mime text/*
action launch --type=overlay --cwd=current -- ${EDITOR} -- ${FILE_PATH}

# Open any image in the full kitty window by clicking on it
protocol file
mime image/*
action launch --type=overlay kitten icat --hold -- ${FILE_PATH}

protocol filelist
action send_text all ${FRAGMENT}

# Open directories
protocol file
mime inode/directory
action launch --type=overlay --cwd -- $FILE_PATH
</code></pre><p>these changes are based on kitty documentation :</p>
<ul>
<li><a href="https://sw.kovidgoyal.net/kitty/open_actions/#scripting-the-mouse-click">Scripting the mouse click</a></li>
<li><a href="https://sw.kovidgoyal.net/kitty/kittens/hyperlinked_grep/#hyperlinked-grep">Hyperlink Grep Kitten</a></li>
</ul>
<ol start="7">
<li>Download themes using</li>
</ol>
<pre tabindex="0"><code>kitty +kitten themes --list
</code></pre><ol start="8">
<li>my additional addons to kitty.conf</li>
</ol>
<pre tabindex="0"><code class="language-conf" data-lang="conf"># Hyperlink hints
map ctrl+f kitten hints --type hyperlink

# focus_visible_window
map ctrl+; focus_visible_window
</code></pre>]]></content:encoded>
    </item>
  </channel>
</rss>
