<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cli &#8211; Benjamin Caccia</title>
	<atom:link href="https://bcacciaaudio.com/tag/cli/feed/" rel="self" type="application/rss+xml" />
	<link>https://bcacciaaudio.com</link>
	<description>Sound design, audio, and Linux tutorials</description>
	<lastBuildDate>Fri, 02 Nov 2018 14:56:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://bcacciaaudio.com/wp-content/uploads/2014/07/cropped-Music-audio-wave-2-icon1-1-32x32.png</url>
	<title>cli &#8211; Benjamin Caccia</title>
	<link>https://bcacciaaudio.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to change urxvt terminal emulator colors</title>
		<link>https://bcacciaaudio.com/2018/11/02/how-to-change-urxvt-terminal-emulator-colors/</link>
		
		<dc:creator><![CDATA[Ben]]></dc:creator>
		<pubDate>Fri, 02 Nov 2018 14:56:33 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://bcacciaaudio.com/?p=697</guid>

					<description><![CDATA[urxvt is a fast, lightweight terminal emulator that supports unicode. It is also very customizable. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>urxvt is a fast, lightweight terminal emulator that supports unicode. It is also very customizable. In this walkthrough, you&#8217;ll learn how to customize the color scheme of urxvt.</p>
<h2><span style="text-decoration: underline;"><strong>Installation</strong></span></h2>
<p>To install in Ubuntu use:</p>
<p><code>sudo apt install rxvt-unicode</code></p>
<h2><span style="text-decoration: underline;"><strong>Setup</strong></span></h2>
<p>Configuration for urxvt is done in the <strong>~/.Xresources</strong> file. If you don&#8217;t have one, you can create it in your home directory.</p>
<p><a href="https://terminal.sexy/">terminal.sexy</a> is a great resource for viewing and downloading terminal themes. Simply:</p>
<p>1. Navigate to the site and browse the themes. Locate one you like.<br />
2. Click on the <strong>Export</strong> tab and select <strong>Xresources</strong> from the drop down.<br />
3. Click on the <strong>Export</strong> button which will populate the list with the theme. Copy and paste the values into your <strong>.Xresources</strong> file.<br />
4. Change all instances of <strong>*</strong> to be <strong>urxvt</strong> and then save your file.</p>
<p>Note that in the <strong>~/.Xresources</strong> file, a <strong>!</strong> is used to show a comment, not a <strong>#.</strong><br />
Once saved, the changes will not take effect immediately. You will need to perform the following order of actions:</p>
<p>1. Run the command <code>xrdb -merge ~/.Xresources</code><br />
2. Log out of any terminal instances.<br />
3. Launch a new terminal.</p>
<p>At this point your color changes will have taken effect.</p>
<h2><span style="text-decoration: underline;"><strong>Tips</strong></span></h2>
<p>I keep several .Xresources files for different themes in my home folder. The format is:</p>
<p><code>.Xresources.solarizeddark</code><br />
<code>.Xresources.molokai</code><br />
<code>.Xresources.materialblue</code></p>
<p>I&#8217;ve also created the alias below in my .bashrc to reload the .XResources file:<br />
<code>alias ureload='xrdb -merge ~/.Xresources</code></p>
<p>When it is time to change a theme, I will cp the new theme over the old one, and then run <strong>ureload</strong>. For example:</p>
<p><code>cp .XResources.solarizeddark .XResources</code><br />
<code>ureload</code></p>
<p>I have other configurations for urxvt in my .XResources file, so when I want to add a new theme, I simply copy the current one and replace the color scheme data. This should be all the basics you need to get started.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Personal wiki using Vimwiki</title>
		<link>https://bcacciaaudio.com/2018/10/10/personal-wiki-using-vimwiki/</link>
		
		<dc:creator><![CDATA[Ben]]></dc:creator>
		<pubDate>Wed, 10 Oct 2018 13:43:01 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://bcacciaaudio.com/?p=639</guid>

					<description><![CDATA[I&#8217;ve dabbled in many different productivity systems over the years in an effort to organize [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" src="https://bcacciaaudio.com/wp-content/uploads/2018/10/1200px-Vimlogo.svg_-e1539174362279.png" alt="Vim Logo" /></p>
<p>I&#8217;ve dabbled in many different productivity systems over the years in an effort to organize my personal/work tasks/notes/writing.</p>
<p>These include using methods and services such as:</p>
<ul>
<li>Disparate plain text files </li>
<li>Simplenote</li>
<li>Wunderlist</li>
<li>Catch</li>
<li>Microsoft To-Do</li>
<li>Evernote</li>
<li>Trello</li>
<li>Wekan</li>
</ul>
<p>Each of the above listed services addresses one, but not all of the items that I need to organize. This leads to using multiple services. I&#8217;d like to avoid any sort of added complexity to keep my system as friction-less as possible. So what do I want in my perfect organizational system? The best way to determine this is to list out my needs/wants.</p>
<h2>What makes a good system?</h2>
<h4><strong>Future proof</strong></h4>
<ul>
<li>A format that can be accessed from anywhere. Ubiquitously supported. </li>
<li>Consumes minimal bandwidth/storage space.</li>
<li>Does not rely on a new service that may be shutdown/acquired in a year or two.</li>
</ul>
<h4><strong>Accessibility</strong></h4>
<ul>
<li>Should be accessible from any desktop computer or mobile device. </li>
<li>Fully cross platform (Windows, OS X, Linux, iOS, Android)</li>
<li>Changes should instantly sync once a file is saved. </li>
</ul>
<h4><strong>Built in hierarchical structure</strong></h4>
<ul>
<li>Systems that use a single text file become confusing to navigate as they grow in size. Tagging systems like those used in Simplenote help a bit, but the structure is still loose. The ideal system would have a logical structure built in so that the user has no choice but to organize their data from the start.</li>
</ul>
<h4><strong>Security</strong></h4>
<ul>
<li>Needs SSL encryption for all network interactions</li>
<li>Files can be placed within an encrypted container for added security.</li>
<li>Can be self hosted. </li>
</ul>
<h2>What needs to be stored?</h2>
<ul>
<li>Todo items </li>
<li>Scratchpad</li>
<li>Technical knowledge </li>
<li>Study notes </li>
<li>Writing </li>
<li>Lyrics</li>
</ul>
<p>Plain text files work well but suffer from:</p>
<ul>
<li>Lack of organizational structure/hierarchy. </li>
<li>No form of markup to format notes (bold, italic, lists, etc.) </li>
</ul>
<p>Simplenote came the closest to reaching the above goals, but there were a few gotchas:</p>
<ul>
<li>Lack of organizational structure/hierarchy. </li>
<li>Security concerns as notes are not encrypted on the server. </li>
<li>Occasional sync issues, which had led to loss of some note data. </li>
</ul>
<p>Markdown, specifically the <a href="https://commonmark.org/">CommonMark</a> standard seemed the best choice to ensure that my stored data was read-ably formatted and could easily be exported to another format such as PDF/HTML/etc. by using a utility such as <a href="https://pandoc.org/">Pandoc</a>.</p>
<p>However, discrete Markdown files still don&#8217;t address the issue of hierarchical structure. Sure, in a single page document, Markdown headings can be used to delineate different sections. But what if a user wants to interlink or relate two different documents?</p>
<p><a href="https://github.com/vimwiki/vimwiki">Vimwiki</a> is a system that addresses the hierarchy/interlinking issues.</p>
<ul>
<li>Supports taking notes in Markdown (Set to Vimwiki syntax by default. This can be changed in its config file.) </li>
<li>Markdown files are just plain text with a <em>.md</em> extension. Text files are as low bandwidth as it gets. </li>
<li>Creation/interlinking of notes is natively supported. This takes care of the hierarchy requirement. </li>
<li>Wiki is quickly searchable using the built in search command <strong>VWS</strong> or a <strong>grep</strong> of the wiki directory. </li>
<li>Wiki location can be customized for easy syncing using Dropbox, Syncthing, OwnCloud, etc. </li>
<li>No web server required. You can even SSH into your server to edit the wiki directly.</li>
</ul>
<h2>The Wiki structure</h2>
<p>This is how my personal wiki is laid out as an example:</p>
<ul>
<li><strong>Todo</strong> &#8211; This contains all my task lists. There are sub headings for Personal and Work. Once an item is listed using the standard markdown list format, while the cursor is on the line, I press <strong>Ctrl + Space</strong> to turn the line into a checkbox item. </li>
<li><strong>Scratchpad</strong> &#8211; If I want to quickly jot down some information or begin writing something and am unsure where it will live in the wiki hierarchy, I start in this page.</li>
<li><strong>Technical</strong> &#8211; This contains sub pages such as Vim Tips, Bash Tips, study notes, tutorial ideas, written tutorials, etc. </li>
<li><strong>Personal</strong> &#8211; Personal plans, writing, information that doesn&#8217;t fit under the other categories.</li>
<li><strong>Music</strong> &#8211; Lyrics, useful tools and links, album release ideas, etc. are stored here. </li>
</ul>
<h2>Wiki Workflow</h2>
<p>So how does this look in day to day practice?</p>
<p>I have the wiki stored in my Dropbox. This automatically syncs any updates to my computers and mobile device. On a laptop or desktop, the workflow is:</p>
<ol>
<li>Launch a terminal window. </li>
<li>Create a new window in my running tmux session and start up Vim. </li>
<li>Press <strong>\ + ww</strong> to pull up my wiki index page. </li>
</ol>
<p>This keeps the wiki conveniently running in tmux so it can be accessed quickly. Once a change is made, I manually save using <strong>:w</strong> in Vim. Changes are automatically synced to Dropbox. For editing on a mobile device, I use the Dropbox Android app, which allows me to edit plain text files. This gets the job done but isn&#8217;t ideal for the reason that I am unable to create new wiki page entries. However, there is a future solution for this outlined in the next section.</p>
<h2>Potential sync issues to be aware of</h2>
<p>Let&#8217;s take a look at a potentially tricky scenario. I&#8217;ve updated my Todo list on my mobile device. This is automatically synced to Dropbox, and the changes are pulled down to my laptop. However, Vim is already running in tmux. So how do I ensure that the latest changes are loaded? I run the <strong>:bufdo e!</strong> command in Vim. This reloads the contents of all my currently loaded buffers and populates the new changes in Vim.</p>
<h2>Future workflow improvements</h2>
<p>As mentioned earlier, I currently have Vimwiki stored in Dropbox. However, there is one way to further improve the system. That is to have a persistent tmux session running on a home server. This addresses two issues:</p>
<ol>
<li>Sync issues that can be caused by updating your wiki via a mobile device. </li>
<li>Security concerns of having data hosted on Dropbox. </li>
</ol>
<p>The home server can be something small with low power draw such as a Raspberry Pi. The user can ssh into the server and then attach the already running tmux session from their desktop, laptop, or mobile device (using an app such as <a href="https://juicessh.com/">JuiceSSH</a>).</p>
<h2>References</h2>
<ul>
<li>Evan Travers Vimwiki Article: <a href="https://www.smoothterminal.com/articles/vimwiki">https://www.smoothterminal.com/articles/vimwiki</a></li>
<li>Vimwiki Cheatsheet: <a href="http://thedarnedestthing.com/vimwiki%20cheatsheet">http://thedarnedestthing.com/vimwiki%20cheatsheet</a></li>
<li>Vimwiki Github: <a href="https://github.com/vimwiki/vimwiki">https://github.com/vimwiki/vimwiki</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Alpine Mail setup with Gmail</title>
		<link>https://bcacciaaudio.com/2018/10/09/alpine-mail-setup-with-gmail/</link>
		
		<dc:creator><![CDATA[Ben]]></dc:creator>
		<pubDate>Tue, 09 Oct 2018 14:13:17 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://bcacciaaudio.com/?p=598</guid>

					<description><![CDATA[Why would you use a command line mail client when the GMail web client is [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" src="https://bcacciaaudio.com/wp-content/uploads/2018/10/AlpineMailClient.png" alt="Alpine Mail Main Screen" /></p>
<p>Why would you use a command line mail client when the GMail web client is accessible from anywhere and has a myriad of useful features?</p>
<p><span id="more-598"></span></p>
<ul>
<li>You have an older computer and the javascript heavy web client takes too long to load. </li>
<li>You work primarily in a CLI environment, use a terminal multiplexer, and would like to be able to read your email without spinning up a browser instance.</li>
</ul>
<p>For my particular use case, the first bullet point is the reason why I wanted to try setting up Alpine. Loading GMail on my older under powered laptop was taking far too long. Below is the process I used to configure everything.</p>
<h2>Downsides</h2>
<p>There are some convenient features that you&#8217;ll be missing from the web client such as:</p>
<ul>
<li>Access to and autocomplete of email addresses in your Google Contacts. (although there is discussion of an <a href="https://superuser.com/questions/55124/how-can-i-use-my-gmail-contacts-within-alpine-pine">inelegant work around</a>)</li>
<li>Rich text email reading/composition.</li>
</ul>
<h2>Installing</h2>
<p>I&#8217;m setting this up on Kubuntu 18.04 LTS. The first step is to install Alpine using the following command:</p>
<p><code>sudo apt install alpine</code></p>
<h2>Server setup</h2>
<h4>IMAP Setup</h4>
<p>Launch Alpine. Navigate to <strong>Main>Setup>collectionLists>Add</strong> and add in the following settings:</p>
<p><code>Nickname : Gmail (or whatever you would like to name the folder)</code><br />
<code>Server : imap.gmail.com/ssl/user=youruserid@gmail.com (ex: youremail@gmail.com)</code><br />
<code>Path :</code><br />
<code>View :</code></p>
<p>Press enter. When prompted, enter your password.</p>
<p>If you are using Gmail 2FA, your login password will not be accepted. You will need to create a specialized <a href="https://support.google.com/accounts/answer/185833?hl=en">Google App password</a> in the Gmail Privacy and Security settings and enter that in instead.</p>
<h4>SMTP Setup</h4>
<p>Navigate to <strong>Setup > Config</strong> and enter in the following information for SMTP Server:</p>
<p><code>smtp.gmail.com:587/tls/user=youruserid@gmail.com (ex: youremail@gmail.com)</code></p>
<h2>Folder setup</h2>
<p>Navigate to Setup > Config and check off the following items:</p>
<ul>
<li>Compensate for deficient IMAP servers</li>
<li>Combined Folder Display</li>
<li>Enable incoming folders collection</li>
<li>Enable incoming folders checking</li>
</ul>
<h2>Deleting mail</h2>
<p>To properly delete email in Alpine so that it shows up in the Trash folder on Gmail, do the following:</p>
<ol>
<li>Select the message and press <strong>Shift + S</strong> to mark it to be saved. </li>
<li>Press <strong>Ctrl + T</strong> to show the folder menu. </li>
<li>Select <strong>[Gmail]/Trash</strong> as the folder. </li>
<li>Confirm your choice and save. </li>
</ol>
<h2>Tips</h2>
<ul>
<li>By default, Alpine checks for new mail every 150 seconds. You can change this in the Config screen by changing the <strong>Mail Check Interval</strong> value. Press <strong>Ctrl + L</strong> to force updating/checking of a folder.</li>
</ul>
<h2>Reference pages</h2>
<ul>
<li>Initial server setup: <a href="https://www.cs.virginia.edu/~csadmin/wiki/index.php/Setting_up_Pine_%28Alpine%29_for_IMAP_Gmail">https://www.cs.virginia.edu/~csadmin/wiki/index.php/Setting_up_Pine_(Alpine)&#95;for&#95;IMAP_Gmail</a></li>
<li>Explanation of Gmail non standard folder behavior: <a href="https://superuser.com/questions/454263/deleting-gmail-messages-from-alpine">https://superuser.com/questions/454263/deleting-gmail-messages-from-alpine</a></li>
<li>Settings that should be enabled for folder views: <a href="https://accc.uic.edu/answer/how-do-i-use-pine-alpine-googleapps">https://accc.uic.edu/answer/how-do-i-use-pine-alpine-googleapps</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Check the weather from the command line</title>
		<link>https://bcacciaaudio.com/2018/10/08/check-the-weather-from-the-command-line/</link>
		
		<dc:creator><![CDATA[Ben]]></dc:creator>
		<pubDate>Mon, 08 Oct 2018 14:23:27 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://bcacciaaudio.com/?p=593</guid>

					<description><![CDATA[This video tutorial will show you how to retrieve the weather via the command line [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This video tutorial will show you how to retrieve the weather via the command line using <strong>curl</strong> and the website <a href="https://wttr.in/">https://wttr.in/</a></p>
<p><iframe title="Check the weather from the command line" width="640" height="360" src="https://www.youtube.com/embed/FmXew0bSXMM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<ul>
<li>https://wttr.in/</li>
<li>https://github.com/chubin/wttr.in</li>
</ul>
<p>To retrieve the weather type the following at your command line:<br />
<code>curl wttr.in</code></p>
<p>To add as an alias:</p>
<ol>
<li><code>sudo vim .bashrc</code></li>
<li><code>alias wtr='curl wttr.in'</code></li>
<li><code>source .bashrc</code></li>
</ol>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
