<?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: Arjun Sajeev</title>
    <description>The latest articles on DEV Community by Arjun Sajeev (@arjunsajeev).</description>
    <link>https://dev.to/arjunsajeev</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%2F62927%2F49d6c66b-294d-4ef7-b98c-19a75308ee5e.jpeg</url>
      <title>DEV Community: Arjun Sajeev</title>
      <link>https://dev.to/arjunsajeev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arjunsajeev"/>
    <language>en</language>
    <item>
      <title>Custom iTerm2 layouts with itermocil</title>
      <dc:creator>Arjun Sajeev</dc:creator>
      <pubDate>Sun, 19 Jul 2020 08:30:09 +0000</pubDate>
      <link>https://dev.to/arjunsajeev/custom-iterm2-layouts-with-itermocil-310m</link>
      <guid>https://dev.to/arjunsajeev/custom-iterm2-layouts-with-itermocil-310m</guid>
      <description>&lt;p&gt;If you frequently work with web development projects, you tend to run a lot of scripts during development. For example, if you are working on a fullstack node project you might run &lt;code&gt;npm start&lt;/code&gt;, &lt;code&gt;npm run watch&lt;/code&gt; and maybe &lt;code&gt;npm run server&lt;/code&gt;. It is usually convenient to run them in different panes in a single tab in Iterm2, so that you can see everything in one place. It is a hassle to create and arrange these panes every time.&lt;/p&gt;

&lt;p&gt;Iterm2 lets you save and restore layouts from Preferences but &lt;a href="https://github.com/TomAnthony/itermocil"&gt;itermocil&lt;/a&gt; lets you write YAML files for custom arrangements and relaunch them quickly.&lt;/p&gt;

&lt;p&gt;Here is a sample YAML for a simple 2-pane layout.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;windows&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;website&lt;/span&gt;
    &lt;span class="na"&gt;root&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;~/Dev/website&lt;/span&gt;
    &lt;span class="na"&gt;layout&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;even-horizontal&lt;/span&gt;
    &lt;span class="na"&gt;panes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;npm run dev&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;npm run server&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You need to save your custom layouts in &lt;code&gt;~/.itermocil&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can launch this layout by running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    itermocil &amp;lt;layout-name&amp;gt;
    &lt;span class="c"&gt;#&amp;lt;layout-name&amp;gt; is the filename of the layout file in ~/.itermocil&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I aliased &lt;code&gt;itermocil&lt;/code&gt; to &lt;code&gt;t&lt;/code&gt; so that I can launch any of my custom layouts with &lt;code&gt;t &amp;lt;layout-name&amp;gt;&lt;/code&gt;. This has made it easy to switch between various projects quickly. Now I can start working on my website by just using &lt;code&gt;t www&lt;/code&gt;. A nice side effect is that I no longer have to remember what scripts have to be run to start working on any specific project, I can start hacking on any project with a single command.&lt;/p&gt;

&lt;p&gt;Let me know your thoughts and tips to improve productivity.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Originally posted on &lt;a href="https://arjunsajeev.com/writing/custom-iterm2-layouts"&gt;https://arjunsajeev.com/writing/custom-iterm2-layouts&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
