<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Get Info: #xbar</title>
    <description>Posts tagged “xbar” — Blog of independent game and app developer Matt Sephton. Featuring vintage Macintosh, game development, digital artwork, Japanese esoterica, video game reviews, hacks and tips, and much more.</description>
    <link>https://blog.gingerbeardman.com/tag/xbar/</link>
    <atom:link href="https://blog.gingerbeardman.com/tag/xbar/index.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Wed, 15 Jul 2026 17:33:15 +0000</pubDate>
    <lastBuildDate>Wed, 15 Jul 2026 17:33:15 +0000</lastBuildDate>
    <generator>Jekyll v4.4.1</generator>

    
      
        <item>
          <title>Controlling local web servers using xbar</title>
          <description>&lt;blockquote&gt;
  &lt;p&gt;I’ve released a native macOS app that does all this script can do &lt;em&gt;and much more!&lt;/em&gt;&lt;br /&gt;Read all about it: &lt;a href=&quot;https://www.gingerbeardman.com/apps/localmost/&quot;&gt;gingerbeardman.com/apps/localmost/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sometimes I want to run local web servers for projects I’m working on. Usually more than one at a time, or at least over a short space of time.&lt;/p&gt;

&lt;p&gt;So I thought it would be cool to have a controller for those local servers in my menu bar. Sounded like the perfect job for a little scripting and &lt;a href=&quot;https://github.com/matryer/xbar&quot;&gt;xbar&lt;/a&gt;, which is a great way to prove a menubar app idea quickly.&lt;/p&gt;

&lt;h2 id=&quot;how-it-works&quot;&gt;How it works&lt;/h2&gt;

&lt;p&gt;The plugin allows you to:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;toggle servers on and off&lt;/li&gt;
  &lt;li&gt;open in browser&lt;/li&gt;
  &lt;li&gt;view ports&lt;/li&gt;
  &lt;li&gt;view paths&lt;/li&gt;
  &lt;li&gt;view log sizes&lt;/li&gt;
  &lt;li&gt;clear logs&lt;/li&gt;
  &lt;li&gt;edit config&lt;/li&gt;
  &lt;li&gt;and more!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/xbar-localhost-dark.png&quot; alt=&quot;IMG&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;example-config&quot;&gt;Example config&lt;/h2&gt;

&lt;p&gt;In the config file we set the starting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SERVER_PORT&lt;/code&gt;, followed by one or more &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SERVER_DIR&lt;/code&gt; for as many projects as you might want servers. We can temporarily comment out those server lines to prevent projects from appearing in the menu.&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# .xbar_httpd_config&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;SERVER_PORT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;8000
&lt;span class=&quot;c&quot;&gt;#SERVER_DIR=~/Projects/starchasers/&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;SERVER_DIR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;~/Projects/serenity/
&lt;span class=&quot;nv&quot;&gt;SERVER_DIR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;~/Projects/point-cloud/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;source-code&quot;&gt;Source code&lt;/h2&gt;

&lt;p&gt;Python source code is available in the following gist:&lt;/p&gt;

&lt;noscript&gt;&lt;p&gt;&lt;a href=&quot;https://gist.github.com/gingerbeardman/a81df96cd0b4c7a397b04711cafeb287&quot;&gt;View the source code as a Gist&lt;/a&gt;&lt;/p&gt;&lt;/noscript&gt;
&lt;script src=&quot;https://gist.github.com/gingerbeardman/a81df96cd0b4c7a397b04711cafeb287.js&quot;&gt;&lt;/script&gt;

</description>
          <author>by Matt Sephton</author>
          <pubDate>Mon, 12 Jan 2026 20:57:00 +0000</pubDate>
          <link>https://blog.gingerbeardman.com/2026/01/12/xbar-local-web-server-controller/</link>
          <guid isPermaLink="true">https://blog.gingerbeardman.com/2026/01/12/xbar-local-web-server-controller/</guid>
        </item>
      
    
      
        <item>
          <title>Automating the cleaning of macOS-specific files on Eject</title>
          <description>&lt;blockquote&gt;
  &lt;p&gt;I’ve released a native macOS app that does all this script can do &lt;em&gt;and much more!&lt;/em&gt;&lt;br /&gt;Read all about it: &lt;a href=&quot;https://www.gingerbeardman.com/apps/driveaway/&quot;&gt;gingerbeardman.com/apps/driveaway/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Dot underscore &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;._&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.DS_Store&lt;/code&gt; files are macOS-specific metadata cruft generated for foreign filesystems (like FAT32 or exFAT) that are not usually needed for disks that are mainly used on other platforms. Digital cameras, music players, e-book readers, and handheld gaming devices can get confused when they encounter these odd files during file system parsing and directory listing. The problem is compounded if the devices naïvely process files by looking only at the file extension as they will then see the dot underscore version of a file as a duplicate and try to preview/play/open it.&lt;/p&gt;

&lt;p&gt;For years I’ve used an app called &lt;a href=&quot;https://web.archive.org/web/20250208072547/https://macpaw.com/cleanmymac&quot;&gt;CleanMyDrive&lt;/a&gt; to remove such files, but &lt;a href=&quot;https://macpaw.com/news/cleanmydrive-no-longer-developed&quot;&gt;it was discontinued in October 2023&lt;/a&gt;. I continued to use it until it recently stopped working completely …so I needed to find an alternative solution. There are some apps on the Mac App Store that look like they’ll do the trick, but I don’t really want to spend the time buying and trialling multiple apps to find one that fits my usage habits. I can make one!&lt;/p&gt;

&lt;p&gt;I already use an app called &lt;a href=&quot;https://xbarapp.com&quot;&gt;xbar&lt;/a&gt; for keeping track of my GitHub issues, itch.io sales, network/server status, and more. So I decided to flex my shell script muscles and put together an xbar script to do it.&lt;/p&gt;

&lt;p&gt;The script adds a menu bar item that allows you to:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Eject (click)&lt;/li&gt;
  &lt;li&gt;Unmount (option-click)&lt;/li&gt;
  &lt;li&gt;Eject All (without cleaning, useful when you want to disconnect all drives from your computer)&lt;/li&gt;
  &lt;li&gt;All with a handy notification&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it! Straight to the point, no frills, functional software.&lt;/p&gt;

&lt;p class=&quot;tofigure&quot;&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/xbar-volumes.png&quot; alt=&quot;IMG&quot; title=&quot; &quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;noscript&gt;&lt;p&gt;&lt;a href=&quot;https://gist.github.com/gingerbeardman/610f22180117ad20465d7c529cc5faa0&quot;&gt;View the source code as a Gist&lt;/a&gt;&lt;/p&gt;&lt;/noscript&gt;
&lt;script src=&quot;https://gist.github.com/gingerbeardman/610f22180117ad20465d7c529cc5faa0.js&quot;&gt;&lt;/script&gt;

</description>
          <author>by Matt Sephton</author>
          <pubDate>Sat, 08 Feb 2025 20:45:00 +0000</pubDate>
          <link>https://blog.gingerbeardman.com/2025/02/08/automating-the-cleaning-of-macos-specific-files-on-eject/</link>
          <guid isPermaLink="true">https://blog.gingerbeardman.com/2025/02/08/automating-the-cleaning-of-macos-specific-files-on-eject/</guid>
        </item>
      
    

  </channel>
</rss>
