• Tech Tips

    Monitoring APFS Drive Decryption Progress

    I recently decided to [permanently] decrypt an APFS volume via Finder (Right click the drive, choose Decrypt).

    There wasn’t any indication that it was actually working. After some web searches, I pieced together a one-liner to monitor the progress of the decryption operation. This will refresh every 60 seconds. If your setup is anything like mine this will be an exceptionally slow operation.

  • Development,  Tech Tips

    Switch Audio Input/Output Device using Alfred

    My top two must-have Mac apps are Keyboard Maestro and Alfred. If you know me, you’ve likely heard me say this, ad nauseum. I use these two apps countless times each day. Often I use them to run command line scripts via hotkey. This is one such implementation.

    Recently I picked up a Jabra Evolve 65 headset. I keep it connected to my Mac via USB. Also, I have some speakers hooked up via the external speaker jack. You can only send output to one of these devices at a time (speakers OR headset). I desired a way to quick-switch between the two. I chose to use Alfred for this.

    The steps below show how to create some quick switchers like this:

    Alfred sound switchers

    Switch to speakers

    Requirements and Initial Setup

  • Tech Tips

    Mac High CPU Usage – WindowServer

    DISCLAIMER: I’m writing about my personal experience here. I am by no means doing some exhaustive investigation. The changes I explain below seem to make a difference, at least according to what Activity Monitor is showing for CPU usage.

    My laptop (3.1GHz i7 MacBook Pro with 16GB of RAM) has enough of power, so why has it been such a dog since starting from scratch with a fresh OS? A colleague posted an animated Gif today in Slack and my MacBook fans kicked in and it sounded like it was getting ready to fly away. This was the last straw in what has been weeks of wondering why my laptop has been slow.

    I opened Activity Monitor and found that my WindowServer process was using a significant amount of CPU resources (up to 77% when the animated gif was visible on my screen), and that it has used significantly more than the next heaviest process since I last rebooted.

    I understand that it’s probably a pretty heavy process, but it got me thinking, and Googling. As it turns out, when something is being drawn to the screen it takes processing power; go figure! One of the top suggestions was removing or disabling things from the menu bar that are constantly updating. The suggestions included CrashPlan and Little Snitch Network Monitor. Wow. I use the latter! I opened the Little Snitch preferences and unchecked “Show network activity in menu bar” and voila! the WindowServer process memory dropped about 15%. Then I closed the animated gif my colleague posted in Slack (the only other thing on the screen that was moving) and voila! it dropped again.

    Now, as I’m looking at my CPU Time in Activity Monitor I’m thinking through what I really need running. Is the “Next Meeting” (which shows the name and time of my next meeting in the menu bar) application really worth running 24/7? I don’t think so; especially if I have more important things for my CPU to be doing. After quitting this application my WindowServer CPU usage dropped to 6.6%.

    I’m going to continue to trim the fat to see how lean I can make my machine. Obviously it doesn’t stop at just trimming out running applications, but I’m blown away by the impact of small changes like these.

  • Tech Tips

    Microphone Enable/Disable with Alert – Keyboard Maestro Macro

    In the past I’ve used Shush to achieve a push-to-talk or push-to-silence setup on my Mac. It works alright but more often than not I forget which mode I’m in, or whether I’m silenced or not. This leads to awkward moments in meetings.

    I’ve solved the problem using Keyboard Maestro. This macro, triggered via CTRL-m simple enables or disables the current “input” device (whatever is selected in the Sound preferences) by setting its level to 0 or 100. It’s a toggling macro so you can use the same hotkey to flip between the two states. Most importantly, though, is the nice popup alert that appears when you go into “disabled” mic mode. This window is hide-able if it gets in the way, and it also disappears if you re-enable (via hotkey OR the RE-ENABLE button). You can safely disable the “Custom HTML Prompt” action if you don’t want to see the prompt. Here’s what the popup looks like:

    MicDisable

  • Tech Tips

    “755”-style permissions with ‘ls’

    After a quick Google search for “ls permissions octal” I found a very handy alias to put in my .bashrc. Not only is it handy to see the OCTAL value of the permissions for each file/dir, it will undoubtedly help you more quickly recognize/interpret the normal ls -al output.

     Example usage:
    You can also type (or paste) this slightly different version into terminal: