<?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>OSX on D. Sébastien Taggart</title>
    <link>https://www.sebastientaggart.com/tags/osx/</link>
    <description>Recent content in OSX on D. Sébastien Taggart</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 04 Oct 2026 23:02:59 -0400</lastBuildDate>
    <atom:link href="https://www.sebastientaggart.com/tags/osx/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Step-by-Step Guide to Install Hugo on a Mac Using Homebrew</title>
      <link>https://www.sebastientaggart.com/writing/step-by-step-guide-to-install-hugo-on-a-mac-using-homebrew/</link>
      <pubDate>Sun, 12 Jun 2022 07:45:52 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/step-by-step-guide-to-install-hugo-on-a-mac-using-homebrew/</guid>
      <description>&lt;p&gt;Hugo is a powerful static site generator built with Go, designed for those who crave flexibility and control over their web applications. Whether you&amp;rsquo;re a blogger, developer, or a tech enthusiast, Hugo offers a streamlined way to bring your ideas to life online.&lt;/p&gt;
&lt;h2 id=&#34;what-is-homebrew&#34;&gt;What is Homebrew?&lt;/h2&gt;
&lt;p&gt;Homebrew is a widely-used package manager for macOS that simplifies the software installation process. Think of it as the Swiss Army knife for your Mac—one command can install a plethora of software, saving you from the drudgery of lengthy setups and configurations.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Hugo is a powerful static site generator built with Go, designed for those who crave flexibility and control over their web applications. Whether you&rsquo;re a blogger, developer, or a tech enthusiast, Hugo offers a streamlined way to bring your ideas to life online.</p>
<h2 id="what-is-homebrew">What is Homebrew?</h2>
<p>Homebrew is a widely-used package manager for macOS that simplifies the software installation process. Think of it as the Swiss Army knife for your Mac—one command can install a plethora of software, saving you from the drudgery of lengthy setups and configurations.</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>Before diving into the installation, ensure you have a Mac running macOS and Homebrew installed. If you haven&rsquo;t set up Homebrew yet, head over to the <a href="https://brew.sh">Homebrew website</a> and follow their straightforward installation instructions.</p>
<h2 id="installing-hugo-using-homebrew">Installing Hugo Using Homebrew</h2>
<p>With Homebrew ready to go, let’s get Hugo up and running. Open your terminal and follow these steps:</p>
<h3 id="step-1--update-homebrew">Step 1 – Update Homebrew</h3>
<p>First things first—make sure your Homebrew is up-to-date. This ensures you’re working with the latest packages:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">brew update
</span></span></code></pre></div><h3 id="step-2--install-hugo">Step 2 – Install Hugo</h3>
<p>Now, let’s install Hugo. Simply run the following command in your terminal:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">brew install hugo
</span></span></code></pre></div><p>Once the installation is complete, you can verify that everything went smoothly by checking the installed version of Hugo:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">hugo version
</span></span></code></pre></div><p>You should see the version number displayed, confirming that Hugo is ready for action.</p>
<h2 id="basic-hugo-commands">Basic Hugo Commands</h2>
<p>With Hugo installed, you’re poised to create dynamic web content. Here are a few essential commands to kickstart your journey:</p>
<ul>
<li>
<p><strong>Create a New Site</strong><br>
To set up a new Hugo site, use the following command, replacing <code>[site_name]</code> with your desired name:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">hugo new site <span class="o">[</span>site_name<span class="o">]</span>
</span></span></code></pre></div><p>Example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">hugo new site myFirstSite
</span></span></code></pre></div></li>
<li>
<p><strong>Create New Content</strong><br>
To create new content, such as a blog post, use this command. Simply replace <code>[path_to_content]</code> with your preferred path and filename:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">hugo new <span class="o">[</span>path_to_content<span class="o">]</span>
</span></span></code></pre></div><p>Example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">hugo new posts/myFirstPost.md
</span></span></code></pre></div></li>
<li>
<p><strong>Start the Hugo Server</strong><br>
To see your site in action, start the Hugo server with the command below. Your site will be accessible at <code>http://localhost:1313</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">hugo server
</span></span></code></pre></div></li>
</ul>
<p>With Hugo installed and these commands at your disposal, you’re well on your way to crafting fast, efficient web content. Whether you&rsquo;re focused on personal blogging, developing comprehensive web applications, or simply exploring programming concepts, the world of Hugo is yours to navigate.</p>
<p>Happy coding!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Stop Firefox from Redirecting to HTTPS</title>
      <link>https://www.sebastientaggart.com/writing/how-to-stop-firefox-from-redirecting-to-https/</link>
      <pubDate>Wed, 16 Feb 2022 20:39:47 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/how-to-stop-firefox-from-redirecting-to-https/</guid>
      <description>&lt;p&gt;When using Firefox, you may have noticed an automatic redirection to the HTTPS version of websites. This feature is part of Mozilla&amp;rsquo;s commitment to secure browsing. However, there are scenarios—especially when working with local networks or development environments—where you may want to disable this automatic HTTPS redirect. Let’s explore how to regain control over your browsing experience.&lt;/p&gt;
&lt;h2 id=&#34;accessing-firefoxs-hidden-configurations&#34;&gt;Accessing Firefox&amp;rsquo;s Hidden Configurations&lt;/h2&gt;
&lt;p&gt;Before we dive into the specific settings, let’s first locate Firefox’s hidden configuration options. Think of this as accessing the control room of your browser—where you can fine-tune its behavior.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>When using Firefox, you may have noticed an automatic redirection to the HTTPS version of websites. This feature is part of Mozilla&rsquo;s commitment to secure browsing. However, there are scenarios—especially when working with local networks or development environments—where you may want to disable this automatic HTTPS redirect. Let’s explore how to regain control over your browsing experience.</p>
<h2 id="accessing-firefoxs-hidden-configurations">Accessing Firefox&rsquo;s Hidden Configurations</h2>
<p>Before we dive into the specific settings, let’s first locate Firefox’s hidden configuration options. Think of this as accessing the control room of your browser—where you can fine-tune its behavior.</p>
<ol>
<li>Open Firefox and type <code>about:config</code> into the address bar. This will lead you to a treasure trove of advanced settings.</li>
<li>You may encounter a warning about voiding your warranty. While this sounds dramatic, it’s a fair caution. Modifying these settings can significantly impact your browsing experience. If you’re ready to proceed, go ahead and access those advanced options.</li>
</ol>
<h2 id="disabling-https-redirect">Disabling HTTPS Redirect</h2>
<p>Now, let’s take a closer look at the settings that control HTTPS redirection.</p>
<h3 id="1-networkstricttransportsecuritypreloadlist">1. Network.stricttransportsecurity.preloadlist</h3>
<p>This setting enforces HTTP Strict Transport Security (HSTS), compelling Firefox to connect to specific sites exclusively through HTTPS. To deactivate this:</p>
<ol>
<li>In the <code>about:config</code> search box, type <code>network.stricttransportsecurity.preloadlist</code>.</li>
<li>The default setting is <code>true</code>. Double-click it to change the value to <code>false</code>. This action will halt HSTS enforcement on the specified sites.</li>
</ol>
<h3 id="2-domsecurityhttps_first">2. Dom.security.https_first</h3>
<p>This preference, which defaults to <code>false</code>, instructs Firefox to attempt HTTPS connections before reverting to HTTP. To modify it:</p>
<ol>
<li>Enter <code>dom.security.https_first</code> in the search box.</li>
<li>Double-click to switch its value to <code>true</code>. This adjustment will guide the browser to first seek HTTPS connections.</li>
</ol>
<h3 id="3-domsecurityhttps_first_pbm">3. Dom.security.https_first_pbm</h3>
<p>This setting mirrors the previous one but applies in Private Browsing Mode. To adjust it:</p>
<ol>
<li>Type <code>dom.security.https_first_pbm</code> into the search box.</li>
<li>Double-click to set the value according to your preference.</li>
</ol>
<h3 id="4-browserfixupfallback-to-https">4. Browser.fixup.fallback-to-https</h3>
<p>This setting causes Firefox to default to HTTPS when the protocol is unclear. To deactivate it:</p>
<ol>
<li>Search for <code>browser.fixup.fallback-to-https</code>.</li>
<li>Double-click to change its value to <code>false</code>, preventing Firefox from defaulting to HTTPS.</li>
</ol>
<p>By modifying these settings, you can stop Firefox&rsquo;s automatic redirection to HTTPS, granting you greater control over your browsing experience. However, a word of caution: while this flexibility may be convenient, it could expose you to security risks. HTTPS provides essential encryption and helps mitigate various types of attacks. Always be mindful of the potential hazards associated with browsing less secure websites.</p>
<p>In summary, understanding and adjusting these settings can empower you to tailor your Firefox experience to better suit your needs. As always, remain curious and informed about the implications of your choices in the digital realm.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Exploring Ways to Increase Scroll Back Limit in iTerm2</title>
      <link>https://www.sebastientaggart.com/writing/exploring-ways-to-increase-scroll-back-limit-in-iterm2/</link>
      <pubDate>Fri, 03 Dec 2021 21:36:09 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/exploring-ways-to-increase-scroll-back-limit-in-iterm2/</guid>
      <description>&lt;p&gt;Ever found yourself staring at a terminal output so lengthy that the scrollback buffer limit left you in the dark about where things went awry? It&amp;rsquo;s a common frustration, but fear not! Let’s delve into how you can enhance the scrollback limit in iTerm2, so you can keep your debugging skills sharp and your output history rich.&lt;/p&gt;
&lt;h2 id=&#34;understanding-the-scrollback-limit-in-iterm2&#34;&gt;Understanding the Scrollback Limit in iTerm2&lt;/h2&gt;
&lt;p&gt;Before we get our hands dirty, let&amp;rsquo;s unpack the concept of the &amp;lsquo;Scrollback Limit.&amp;rsquo; Think of it as a safety net for your terminal output. By default, iTerm2 allows you to scroll back through 1,000 lines of output. While this is usually sufficient, there are moments—like when you&amp;rsquo;re running extensive scripts or analyzing logs—when you&amp;rsquo;d prefer a deeper dive into your terminal&amp;rsquo;s past. That’s where increasing the scrollback limit comes into play.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Ever found yourself staring at a terminal output so lengthy that the scrollback buffer limit left you in the dark about where things went awry? It&rsquo;s a common frustration, but fear not! Let’s delve into how you can enhance the scrollback limit in iTerm2, so you can keep your debugging skills sharp and your output history rich.</p>
<h2 id="understanding-the-scrollback-limit-in-iterm2">Understanding the Scrollback Limit in iTerm2</h2>
<p>Before we get our hands dirty, let&rsquo;s unpack the concept of the &lsquo;Scrollback Limit.&rsquo; Think of it as a safety net for your terminal output. By default, iTerm2 allows you to scroll back through 1,000 lines of output. While this is usually sufficient, there are moments—like when you&rsquo;re running extensive scripts or analyzing logs—when you&rsquo;d prefer a deeper dive into your terminal&rsquo;s past. That’s where increasing the scrollback limit comes into play.</p>
<h2 id="increasing-the-scrollback-limit-in-iterm2">Increasing the Scrollback Limit in iTerm2</h2>
<p><img loading="lazy" src="/writing/exploring-ways-to-increase-scroll-back-limit-in-iterm2/assets/imgpaste_22-18-59-12.png"></p>
<p>Ready to expand your horizons? Here’s a straightforward guide to boost the scrollback limit in iTerm2:</p>
<ol>
<li>
<p><strong>Open iTerm2</strong>: Start by launching the iTerm2 terminal on your machine.</p>
</li>
<li>
<p><strong>Access Preferences</strong>: Navigate to <code>iTerm2 &gt; Preferences</code>. This will bring up the preferences dialogue box, your command center for customization.</p>
</li>
<li>
<p><strong>Go to Profiles</strong>: Within the dialogue box, head over to the <code>Profiles</code> tab. This is where the magic happens.</p>
</li>
<li>
<p><strong>Select Terminal Sub-tab</strong>: Click on the <code>Terminal</code> sub-tab within the Profiles section.</p>
</li>
<li>
<p><strong>Adjust Scrollback Buffer</strong>: Here, you&rsquo;ll find the <code>Scrollback Buffer</code> option. To unlock unlimited scrolling, select <code>Unlimited Scrollback</code>. Alternatively, if you prefer a specific limit, deselect <code>Unlimited Scrollback</code> and input your desired number in the <code>Scrollback Lines</code> box.</p>
</li>
<li>
<p><strong>Save and Close</strong>: Once you&rsquo;ve made your adjustments, simply close the dialogue box. Your changes will be saved automatically.</p>
</li>
</ol>
<p>Now, whether you opt for <em>Unlimited Scrollback</em> or set a custom limit, you can confidently scroll back through your terminal output. This means fewer headaches during debugging and an enhanced ability to trace errors back to their source.</p>
<p>Happy coding, and may your scrollback history be ever expansive!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Making Markdown Preview Work From Finder in OSX</title>
      <link>https://www.sebastientaggart.com/writing/making-markdown-preview-work-from-finder-in-osx/</link>
      <pubDate>Fri, 15 Oct 2021 21:48:53 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/making-markdown-preview-work-from-finder-in-osx/</guid>
      <description>&lt;p&gt;The versatility of Markdown lies in its simplicity, making it one of the most effective tools for converting plain text to rich HTML. For those new to the world of Markdown, it’s a lightweight markup language that allows you to create structured documents with ease. However, there’s often a pesky hurdle to overcome: how can we preview Markdown files without the need to open a dedicated text editor or application? Fear not—using OSX’s Finder, you can preview these files as effortlessly as you would an image or PDF. In this guide, I’ll walk you through the steps to enable Markdown previews directly from Finder using a nifty tool called QLMarkdown.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>The versatility of Markdown lies in its simplicity, making it one of the most effective tools for converting plain text to rich HTML. For those new to the world of Markdown, it’s a lightweight markup language that allows you to create structured documents with ease. However, there’s often a pesky hurdle to overcome: how can we preview Markdown files without the need to open a dedicated text editor or application? Fear not—using OSX’s Finder, you can preview these files as effortlessly as you would an image or PDF. In this guide, I’ll walk you through the steps to enable Markdown previews directly from Finder using a nifty tool called QLMarkdown.</p>
<h2 id="understanding-homebrew-your-new-best-friend">Understanding Homebrew: Your New Best Friend</h2>
<p>Before we dive into the setup, let’s take a moment to talk about Homebrew. Think of Homebrew as your personal package manager for macOS—an automated assistant that simplifies the installation of software on your system. It handles everything from downloading to unpacking and installing applications. With that context, let’s harness the power of Homebrew to get QLMarkdown up and running.</p>
<p><strong>To install QLMarkdown via Homebrew, follow these straightforward steps:</strong></p>
<ol>
<li>Open your terminal.</li>
<li>Paste the following line and press enter:<br>
<code>brew install --cask qlmarkdown</code></li>
</ol>
<p>This command will pull QLMarkdown directly from Homebrew&rsquo;s official casks. The <code>--cask</code> option signals to Homebrew that you’re installing a binary package rather than a typical one. If you haven’t installed Homebrew yet, don’t worry—it’s easy to get started. Just follow the instructions on their <a href="https://brew.sh">official website</a>.</p>
<h2 id="previewing-markdown-in-finder">Previewing Markdown in Finder</h2>
<p>Once you’ve successfully installed QLMarkdown, it’s time to see it in action. Here’s how to preview Markdown (.md) files directly from Finder:</p>
<ol>
<li>Open Finder and navigate to the directory containing your .md file.</li>
<li>Click on the .md file you wish to preview.</li>
<li>Press <code>Space</code> to bring up the Quick Look preview.</li>
</ol>
<p>Voilà! You should now see a rendered preview of your Markdown file, right there in Finder.</p>
<p><img alt="Markdown Preview Example" loading="lazy" src="/writing/making-markdown-preview-work-from-finder-in-osx/assets/imgpaste_22-18-38-00.png"></p>
<h2 id="wrapping-up">Wrapping Up</h2>
<p>The steps outlined above provide an efficient and straightforward method to preview Markdown on OSX. With just a simple addition via Homebrew, you can eliminate the need for extra applications or text editors. This process exemplifies how understanding and tweaking your tools can enhance your workflow. By combining the strengths of QLMarkdown, Finder, and Homebrew, you can make your Markdown previews more accessible and convenient.</p>
<p>So, go ahead—explore, experiment, and happy coding!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Configuring the Perfect Terminal Experience in OSX</title>
      <link>https://www.sebastientaggart.com/writing/configuring-the-perfect-terminal-experience-in-osx/</link>
      <pubDate>Mon, 10 May 2021 06:38:16 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/configuring-the-perfect-terminal-experience-in-osx/</guid>
      <description>&lt;p&gt;The terminal can feel like a daunting space for newcomers. Yet, with a bit of practice, it transforms into an indispensable ally for those of us who spend our days navigating the digital landscape—especially in programming, system administration, and related fields. In this post, we&amp;rsquo;ll explore how to configure an optimal terminal experience in OSX.&lt;/p&gt;
&lt;h2 id=&#34;choosing-the-right-terminal&#34;&gt;Choosing the Right Terminal&lt;/h2&gt;
&lt;p&gt;When it comes to terminal emulators for OSX, you have a smorgasbord of choices, each with its distinct advantages. While the default Terminal.app serves its purpose, you may find it lacking compared to some alternatives. Here are two standout options:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>The terminal can feel like a daunting space for newcomers. Yet, with a bit of practice, it transforms into an indispensable ally for those of us who spend our days navigating the digital landscape—especially in programming, system administration, and related fields. In this post, we&rsquo;ll explore how to configure an optimal terminal experience in OSX.</p>
<h2 id="choosing-the-right-terminal">Choosing the Right Terminal</h2>
<p>When it comes to terminal emulators for OSX, you have a smorgasbord of choices, each with its distinct advantages. While the default Terminal.app serves its purpose, you may find it lacking compared to some alternatives. Here are two standout options:</p>
<ul>
<li>
<p><strong>iTerm2</strong>: Considered the Swiss Army knife of OSX terminal emulators, iTerm2 boasts a wealth of features—split windows, powerful search capabilities, seamless autocomplete, and even a mouseless copy tool. It&rsquo;s designed to enhance your productivity and efficiency.</p>
</li>
<li>
<p><strong>Hyper</strong>: Developed by the team at Zeit, Hyper is not just visually appealing; it’s also built on open web standards (HTML/CSS/JS), making it highly customizable. If you enjoy tweaking and personalizing your tools, Hyper presents a canvas for your creativity.</p>
</li>
</ul>
<h2 id="key-customizations-for-osx-terminal">Key Customizations for OSX Terminal</h2>
<p>To achieve a terminal experience that’s both enjoyable and efficient, a few thoughtful customizations can go a long way. Here are my top picks:</p>
<ul>
<li>
<p><strong>Zsh and Oh My Zsh</strong>: Zsh is a powerful alternative to the default bash shell in OSX. When paired with Oh My Zsh—a framework that streamlines Zsh configuration—you unlock a plethora of features, including theme support and an extensive library of plugins. It’s a robust combination that many developers swear by.</p>
</li>
<li>
<p><strong>Starship Prompt</strong>: Think of Starship as your personal concierge for terminal prompts. This fast and customizable prompt works with any shell, ensuring that crucial information is always front and center, making your terminal experience not just functional but also enjoyable.</p>
</li>
<li>
<p><strong>tmux</strong>: If you find yourself juggling multiple terminal sessions, tmux (short for &ldquo;terminal multiplexer&rdquo;) is your best friend. It allows you to detach sessions from their controlling terminals and reattach them later, providing flexibility that is often crucial in development and system management tasks.</p>
</li>
<li>
<p><strong>Homebrew</strong>: Often referred to as the &ldquo;missing package manager for OSX,&rdquo; Homebrew simplifies the installation of software and packages on your Mac. It’s like having a well-organized toolbox at your fingertips.</p>
</li>
</ul>
<h2 id="color-schemes-and-fonts">Color Schemes and Fonts</h2>
<p>Let’s not overlook the visual aspect of your terminal experience. Aesthetics matter, especially if you’re spending hours in front of the screen. Here’s how to elevate your terminal&rsquo;s look:</p>
<ul>
<li>
<p><strong>Color Schemes</strong>: Both iTerm2 and Hyper support an array of third-party color schemes. Solarized and Dracula are two popular choices among developers, providing a harmonious balance between contrast and visual appeal.</p>
</li>
<li>
<p><strong>Fonts</strong>: The right programming font can make reading and writing code a lot more pleasant. Consider using fonts like Hack, Fira Code, or Source Code Pro, all of which support programming ligatures that enhance readability.</p>
</li>
</ul>
<p>With the right terminal emulator, effective productivity tools, and an eye for aesthetics, you can cultivate the perfect terminal experience on OSX. Remember, the ultimate goal is to create an environment that not only boosts your productivity but also makes your coding or sysadmin sessions enjoyable. So go ahead—make your terminal your own!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Control Menu Bar Icons with Dozer</title>
      <link>https://www.sebastientaggart.com/writing/control-menu-bar-icons-with-dozer/</link>
      <pubDate>Thu, 25 Feb 2021 13:59:20 +0000</pubDate>
      <guid>https://www.sebastientaggart.com/writing/control-menu-bar-icons-with-dozer/</guid>
      <description>&lt;p&gt;Have you ever looked at your Mac&amp;rsquo;s menu bar and felt like you were gazing into a chaotic toy box? Icons spilling over like a giggling toddler with a glass of milk — it&amp;rsquo;s a sight that can test even the most patient among us. While macOS offers a beautifully designed interface, it sometimes overlooks the importance of usability and aesthetics in the menu bar. Enter Dozer, a game-changing tool that elegantly addresses this challenge.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Have you ever looked at your Mac&rsquo;s menu bar and felt like you were gazing into a chaotic toy box? Icons spilling over like a giggling toddler with a glass of milk — it&rsquo;s a sight that can test even the most patient among us. While macOS offers a beautifully designed interface, it sometimes overlooks the importance of usability and aesthetics in the menu bar. Enter Dozer, a game-changing tool that elegantly addresses this challenge.</p>
<p><img alt="Dozer in action" loading="lazy" src="/writing/control-menu-bar-icons-with-dozer/assets/demo.gif"></p>
<p>Dozer is a breath of fresh air in a sea of complex utilities. It’s designed with simplicity in mind, focusing on one core function: managing your menu bar icons. This open-source gem is not only free but also regularly updated, making it a reliable choice for anyone looking to declutter their digital workspace.</p>
<p>One of the standout features of Dozer is its thoughtful settings. You won&rsquo;t find a barrage of confusing options here — just straightforward controls that let you customize your menu bar the way you want.</p>
<p><img alt="Dozer settings" loading="lazy" src="/writing/control-menu-bar-icons-with-dozer/assets/index-1bbacbc3.png"></p>
<p>To get started, visit <a href="https://github.com/Mortennn/Dozer">Dozer&rsquo;s GitHub page</a> or install it via Homebrew with the following command:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">brew install --cask dozer
</span></span></code></pre></div><p>In a world where digital tools can often feel overwhelming, Dozer reminds us that sometimes, less truly is more. Let’s embrace this simplicity and take control of our menu bar — because who doesn’t want a cleaner, more efficient workspace?</p>
]]></content:encoded>
    </item>
    <item>
      <title>Read a Filtered List of Files from a Directory and Ask the User to Choose One (Bash)</title>
      <link>https://www.sebastientaggart.com/writing/read-a-filtered-list-of-files-from-a-directory-and-ask-the-user-to-choose-one-bash/</link>
      <pubDate>Mon, 30 Sep 2019 14:40:05 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/read-a-filtered-list-of-files-from-a-directory-and-ask-the-user-to-choose-one-bash/</guid>
      <description>&lt;p&gt;One of the standout features of Docksal is its extensibility through Bash scripting, making it a valuable tool for automating various tasks. A common scenario is the need to import databases when initializing projects. The snippet below serves this purpose by scanning a directory for database files and allowing the user to select which one to import.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Get a list of *.mysql | *.sql.gz | *.sql in /db/ and let the user choose which to import&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;unset&lt;/span&gt; options i
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;IFS&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;read&lt;/span&gt; -r -d &lt;span class=&#34;s1&#34;&gt;$&amp;#39;\0&amp;#39;&lt;/span&gt; f&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  options&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;i++&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$f&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt; &amp;lt; &amp;lt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;find &lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;PROJECT_ROOT&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;/db/ -maxdepth &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -type f &lt;span class=&#34;se&#34;&gt;\(&lt;/span&gt; -name &lt;span class=&#34;s2&#34;&gt;&amp;#34;*.mysql&amp;#34;&lt;/span&gt; -o -name &lt;span class=&#34;s2&#34;&gt;&amp;#34;*.sql.gz&amp;#34;&lt;/span&gt; -o -name &lt;span class=&#34;s2&#34;&gt;&amp;#34;*.sql&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\)&lt;/span&gt; -print0&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Press [Enter] to choose a DB to import&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;read&lt;/span&gt; -t5 -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;(times out in 5 seconds) &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$?&lt;/span&gt; -gt &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Timed out waiting for response. Skipping DB import...&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;select&lt;/span&gt; opt in &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;options&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[@]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Skip DB Import&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;case&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$opt&lt;/span&gt; in
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      *.mysql &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; *.sql.gz &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; *.sql&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Importing &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$opt&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; ...&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        fin db import &lt;span class=&#34;nv&#34;&gt;$opt&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nb&#34;&gt;break&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s2&#34;&gt;&amp;#34;Skip DB Import&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Skipping DB Import...&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nb&#34;&gt;break&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      *&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Invalid choice, please enter the number of your choice above.&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;esac&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This script effectively searches a specified directory for files that match certain extensions and prompts the user to make a selection. The inclusion of a timeout is a thoughtful touch, especially for scripts designed to run unattended or as part of a larger automation workflow.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>One of the standout features of Docksal is its extensibility through Bash scripting, making it a valuable tool for automating various tasks. A common scenario is the need to import databases when initializing projects. The snippet below serves this purpose by scanning a directory for database files and allowing the user to select which one to import.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Get a list of *.mysql | *.sql.gz | *.sql in /db/ and let the user choose which to import</span>
</span></span><span class="line"><span class="cl"><span class="nb">unset</span> options i
</span></span><span class="line"><span class="cl"><span class="k">while</span> <span class="nv">IFS</span><span class="o">=</span> <span class="nb">read</span> -r -d <span class="s1">$&#39;\0&#39;</span> f<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">  options<span class="o">[</span>i++<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$f</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span> &lt; &lt;<span class="o">(</span>find <span class="si">${</span><span class="nv">PROJECT_ROOT</span><span class="si">}</span>/db/ -maxdepth <span class="m">1</span> -type f <span class="se">\(</span> -name <span class="s2">&#34;*.mysql&#34;</span> -o -name <span class="s2">&#34;*.sql.gz&#34;</span> -o -name <span class="s2">&#34;*.sql&#34;</span> <span class="se">\)</span> -print0<span class="o">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;Press [Enter] to choose a DB to import&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">read</span> -t5 -p <span class="s2">&#34;(times out in 5 seconds) &#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="o">[</span> <span class="nv">$?</span> -gt <span class="m">0</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">  <span class="nb">echo</span> <span class="s2">&#34;&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="nb">echo</span> <span class="s2">&#34;Timed out waiting for response. Skipping DB import...&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">else</span>
</span></span><span class="line"><span class="cl">  <span class="k">select</span> opt in <span class="s2">&#34;</span><span class="si">${</span><span class="nv">options</span><span class="p">[@]</span><span class="si">}</span><span class="s2">&#34;</span> <span class="s2">&#34;Skip DB Import&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="k">do</span>
</span></span><span class="line"><span class="cl">    <span class="k">case</span> <span class="nv">$opt</span> in
</span></span><span class="line"><span class="cl">      *.mysql <span class="p">|</span> *.sql.gz <span class="p">|</span> *.sql<span class="o">)</span>
</span></span><span class="line"><span class="cl">        <span class="nb">echo</span> <span class="s2">&#34;Importing </span><span class="nv">$opt</span><span class="s2"> ...&#34;</span>
</span></span><span class="line"><span class="cl">        fin db import <span class="nv">$opt</span>
</span></span><span class="line"><span class="cl">        <span class="nb">break</span>
</span></span><span class="line"><span class="cl">        <span class="p">;;</span>
</span></span><span class="line"><span class="cl">      <span class="s2">&#34;Skip DB Import&#34;</span><span class="o">)</span>
</span></span><span class="line"><span class="cl">        <span class="nb">echo</span> <span class="s2">&#34;Skipping DB Import...&#34;</span>
</span></span><span class="line"><span class="cl">        <span class="nb">break</span>
</span></span><span class="line"><span class="cl">        <span class="p">;;</span>
</span></span><span class="line"><span class="cl">      *<span class="o">)</span>
</span></span><span class="line"><span class="cl">        <span class="nb">echo</span> <span class="s2">&#34;Invalid choice, please enter the number of your choice above.&#34;</span>
</span></span><span class="line"><span class="cl">        <span class="p">;;</span>
</span></span><span class="line"><span class="cl">    <span class="k">esac</span>
</span></span><span class="line"><span class="cl">  <span class="k">done</span>
</span></span><span class="line"><span class="cl"><span class="k">fi</span>
</span></span></code></pre></div><p>This script effectively searches a specified directory for files that match certain extensions and prompts the user to make a selection. The inclusion of a timeout is a thoughtful touch, especially for scripts designed to run unattended or as part of a larger automation workflow.</p>
<h3 id="why-it-matters">Why It Matters</h3>
<p>Understanding how to leverage Bash for such tasks not only enhances your efficiency but also empowers you to create more dynamic and responsive scripts. This approach illustrates the blend of technical skill and strategic foresight that is crucial in today&rsquo;s digital landscape.</p>
<h3 id="insights-to-consider">Insights to Consider</h3>
<p>Bash scripting, while often seen as a technical skill, is inherently about problem-solving. By framing your scripts to engage users, you add a layer of interaction that can significantly improve the user experience.</p>
<h3 id="moving-forward">Moving Forward</h3>
<p>Consider how you can implement similar patterns in your own scripts. Whether it’s adding user interactivity or building in safeguards like timeouts, these small enhancements can lead to more robust and user-friendly automation solutions. Embrace the iterative process—after all, improvement comes from curiosity and experimentation.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
