Hi, I’m Chris. 👋

This is where I write about my interests, share my opinions, and link to other things I find interesting.

When I’m not writing, I’m developing Text Case, a text transformation app for macOS and iOS.


A Better Git Command Line Experience

5th December 2021

I’ll start by saying that I’m the sort of person that prefers to use the command line for Git commands. But there are still occasions where I just found it annoying, such as managing huge amounts of branches, reading old diffs, and also when making a big commit, and wanting to get a quick overview of what’s being added.

For those occasions, I used Fork. Although I’m sure for my uses, I could have probably used any Git GUI. However, I’m now using a terminal UI called Lazygit. I think it’s incredible. It lets me stay in the terminal, but gives me the functionality (that I use) of a typical GUI app.

This is what it looks like:

Because it’s a terminal app, it’s full of keyboard shortcuts, that make everything super fast. For example, to pull changes, you just use a lowercase p, and to push it’s an uppercase P.

Most of them are that simple that you just tap one key, but they tend to be limited to the active panel. For example, if you want to manage branches, then the branches panel needs to be the active one. Once it’s active, you can use things like space to checkout the selected branch, n to create a new branch, d to delete, o to create a pull request, etc. There’s honestly so many that if you were to check out Lazygit, I’d recommend having a glance at the full list of key bindings.

This is obviously a small example, but here is the experience of committing files:

It’s not limited to the keyboard though, you can navigate Lazygit using the cursor as well:

After installing Lazygit, I haven’t needed to use a GUI application at all. I know some may prefer to use a GUI, but I certainly have found Lazygit so much easier to use. Especially because of the abundance of keyboard shortcuts, and also because it lets me keep my Git activity to a single terminal window.

Lazygit works everywhere, macOS, Linux, or Windows, so if you want to enhance your Git experience in the command line, I’d definitely recommend checking it out.

Vinegar - A Safari Extension To Fix YouTube Videos

1st December 2021

You may have heard about Vinegar, since it’s been doing the rounds recently. However, if you haven’t, It’s essentially a Safari extension that makes YouTube videos look better, and act like standard HTML videos. Which means they use Safari’s native video player, which means that you have slightly more control over the video, but at the same time you do lose some functionality that YouTube has in their player.

As you can see, the video player still lets you change the video quality, use subtitles, stream to an AirPlay device, etc. So the basic functionality is there. And it makes Picture-in-Picture a lot easier to access, as the YouTube player requires three clicks, and the native player has a button in the top-left corner.

And as much as I would say that YouTube looks better with the native player, and that it’s easier to use, there are still downsides. For example, autoplay doesn’t work, you can’t access the YouTube Miniplayer, you can’t toggle Theatre Mode, and you can’t pause/play the video using the space bar.

The downsides will have different levels of importance to different people, and I’m personally a bit in the middle. I’m definitely keeping it installed, and going to be using it by default, but there are certainly ways it can be improved.

What I can say, is that it’s definitely worth it’s £1.79 price. Which seems to be an opinion shared by others, as it’s currently sitting in second place in the Utilities category of the Mac App Store in the UK.

Using a Tiling Window Manager on macOS

30th November 2021

Since starting to use Linux, I’ve been hearing more about window managers, and especially tiling window managers. I started to play around with them on my Linux install (I’m now using Kubuntu), and after some getting used to the keyboard shortcuts, I found it to be really useful to quickly be able to rearrange windows, and also have everything visible at once.

That’s why a few days ago I tried to see what I could achieve on my Mac. I’d tried BetterSnapTool recently, but wanted something with a bit more control. After watching a to of demos on YouTube of people’s setups, it seems as if yabai was the most popular option. I was starting to get the feel of it, but it never felt stable. Sometimes as I was typing in Safari’s address bar, the windows would attempt to readjust as if I’d moved something. But it just resulted in a bunch of flickering. Add on that you need to disable SIP before installing yabai, it never felt like a great choice.

But, I looked a bit more, and I discovered another option, Amethyst. I checked out the website, and it looked reasonably simple to grasp the basics of, while also offering an absolute ton of options. This is what I wanted ideally, as I want to be able to use it straight away, but I didn’t want to be stuck with a really restricted experience.

By default, it has over 50 different actions that are configured with keyboard shortcuts. Right now, I’m using about five of them regularly, and I already feel faster on my Mac.

There are a few default layouts, and you even create them yourself, but I’ve been using the “Tall” layout the whole time, and I think it’s certainly enough for now. That basically means that there’s one window to the left, and all other windows are in a vertical stack to the right.

Here’s an example of how my Mac usually looks:

On the left, I have the “main” window, this is usually a web browser or text editor. Then on the right, there’s usually at least one terminal window, and maybe a few extras.

How I’ve been using the right side is that I’ll have a handy terminal window to perform quick commands, like managing a git repository, but also windows that I might want to occasionally check out. So if I’m writing code, I might have a terminal to the right for git, and a web browser while I’m looking at how to do a certain task.

There are times where I’d like a full-screen app, for example when I’m writing, I like to have just Ulysses open, or if I’m reading a long web page, I might want to also have that as big as possible. For this, I usually use a different desktop. Amethyst does have a bunch of shortcuts for managing desktops, but I’ve not got the hang of those yet.

As for the shortcuts that I do use, I can adjust the width of the focussed window, by using SHIFT + OPT + L to make it bigger and SHIFT + OPT + L to make it smaller. And if the window you have focused is in a vertical stack, then they are all resized at the same time.

To move focus between windows, you can cycle through them clockwise with SHIFT + OPT + K, and clockwise with SHIFT + OPT + J. Most of the time I do this via the trackpad, but the shortcuts can be useful.

But I’d say the most useful is SHIFT + OPT + RETURN, which swaps the focussed window with the “main” window. Essentially making it the big window on the left of my display. It becomes key when there are three or more windows on the right, and I want to quickly make it bigger. Then when I’m done, I can just focus on the previous window and make that the main window again.

There are definitely some drawbacks to using a tiling window manager. The main one is that you can’t have two big windows, with one behind the other. This has forced me into multiple desktops, but also hide or quit applications when I’m finished with them.

The only thing I’m not sure about is how it will deal with multiple monitors. Maybe I’ll try that out soon.

For now, I’m enjoying how fast it feels to navigate between windows on my Mac, and hopefully, I’ll get the hang of some more shortcuts soon.

The Restrictions for Younger Users on Douyin, China's Version of TikTok

27th November 2021

There's certainly a lot of opinions about TikTok, and technology that originates from China in general. But putting aside cultural and political differences, I've been reading about the rules that Douyin (China's version of  TikTok) have put in place for its younger users, and to be honest, I'm a fan.

I've got a pretty strong opinion that in general, social media isn't a good thing for children. But I'd have to admit that it does have its benefits. Especially given how intertwined social media is with the modern world.

According to Kerry Allen, a BBC China media analyst, these restrictions have been coming for a while:

For the last three years, official media has been warning that the growing amount of time young Chinese people are spending on the internet is having an impact on their physical and mental health.

I'm sure it isn't a surprise to most people that young people's physical and mental health can be affected by the internet, and in particular, social media. But I can't think of any other platform that has actively tried to combat the effects.

As for the rules and differences that apply to Douyin's younger users, here are a few:

  • Under 18s require consent from a legal guardian to use the platform.
  • More educational content is being produced, which will target younger users.
  • Under 14s can only access the platform between 06:00 and 22:00.
  • Under 14s can only use the platform for a maximum of 40 minutes per day.

The restrictions for under 14 year olds is known as "Youth Mode", and it requires what they call "real-name authentication", so I'm assuming that some form of identification is necessary, which would certainly be a controversial topic in the west.

However, I still think it's good to see that at least one social media platform is putting the health of its younger users before engagement metrics.

London

24th November 2021

A few more photos again today from the archives. I'm still going through and making sure I've got all of my favourite shots published here on the blog.

This time it's a few shots I took in London back in September.

Autumnal Animal Photos

23rd November 2021

This past autumn I've taken quite a few photos of animals, so I've taken a few of my favourites, and decided to share them here!

Monterey Blocking Ports 5000 and 7000

22nd November 2021

If you're a developer and use macOS Monterey, then you may have come into issues when using ports 5000 and 7000 on your local machine. And seeing as these are pretty common ports, I can imagine that this will affect quite a few people.

It turns out, what's using these ports is the new AirPlay Receiver functionality added in Monterey.

You can find this in the Sharing pane of System Preferences. And if you don't care about having it enabled, then you can just uncheck it, and the ports will be free.

However, if you do want to make use of AirPlay Receiver, then all you need to do is first disable it, run your local server, and then enable AirPlay Receiver again. It will then use a different port.

Durdle Door

22nd November 2021

I've been to Durdle Door before, back in 2019. And only a few months ago, I visited the area again. And of course, I ended up taking a few photos. Which I think turned out a lot better than last time.

How To Edit Your Ghost Theme Using Github

Who knew that you integrate a GitHub repository to your Ghost blog and have your theme automatically deploy? I for sure didn't, but luckily Greg Morris did, and he's written a great guide on how to set it all up:

Since first trying Ghost, one of the best things about editing my theme is the ability to host on Github. Through a simple integration I can easily edit my theme to make changes from almost anywhere. If you want to do this too, this guide should help you out.

I've just run through this guide myself, and the theme for this blog now automatically updates whenever I push changes to my repository. This is going to be so much better than using scp or sftp to manually upload changes.