newsonaut

Turning inner space into outer space

December 4, 2024

Your Mac's Shortcuts app can create workspaces for you

So you need to do some work on your Mac that involves opening a few apps. One of them is a browser with a couple of tabs open. You want the windows for the apps placed just the way you like them.

And you want this workspace to appear with a single click.

You could buy an app to do this for you — there are a few good ones out there. Or you could use the Shortcuts app that comes with your Mac. Here’s how.

Before we get started, though, if you’re not familiar with the basics of Shortcuts, I suggest you watch the free sample videos in the course from the incomparable MacMost.

You build a shortcut by dragging in actions from the right sidebar, which can be found by typing in the search area.

Start off by pulling in one “Open App” action for each app you want to open. Click on the word “app” and change it to the name of the app you want to open.

If one of those apps is Safari, you can get it to open tabs with the “Open URLs” action. Other browsers are trickier, and you might have to resort to using an AppleScript snippet.

Now drag in one “Find Windows” action for each app. Click on “Add Filter”. Change “App Name is anything” so it reflects the name of the app you’re working on. The name of the app might not always be clear — for example, is it VS Code, Visual Studio Code, or just Code? A good guide is to use the name in the app’s menu bar. In this case, it is just Code.

Finally, you need to attach a “Resize Window” action to each “Find Window” action. Set this action so it puts the window for each app where you want it — for example, “Resize Windows to Left Half”.

If you’re not happy with the pre-sets for window sizing, you can use Dimension, and give an exact size in pixels. If you do this, you will also need to drag in an action called “Move Window”. This is so you can tell Shortcuts where to put the window after it’s been resized.

Test your shortcut by clicking on the arrow on its title bar. It should open the open the apps and URLs, then move their windows to areas you specified.

To save this shortcut, click on the tab in the right sidebar with an “i” inside a circle. You can pin it in the menu bar, make it a quick action, create a keyboard shortcut — and more. Under the File menu, you can add it to the dock.

Here's how it could be done with Safari, VS Code and Transmit:

November 21, 2024

Shared feeds from Reeder are a neat idea, embeds would make them better

Reeder is a much loved RSS feed reader for Mac, iPad and iPhone. Or at least it was until its latest update.

The new concept was a bit too weird for me — and apparently for a lot of other people as well — so I put off testing it and stuck with what is now known as Reeder Classic. Good old Reeder was good enough for me.

But curiosity about a feature called shared feeds finally got the best of me. So I downloaded the app to my iPad and paid for an annual subscription, which worked out to a little over a dollar a month.

Setting up a shared feed was fairly easy. I created a tag called “latest” and tagged a few items with it. I then went to the “latest” folder, long pressed and had a look at its settings. In the sharing section you can turn on a public JSON feed and give it a name. You get a public URL, which you can share.

Here’s the feed I made. It’s hosted by Reeder’s developer at reederapp.net.

Now, every time I tag an item with “latest,” it shows up in this public feed. I’m not sure what to do with this, but it definitely has a coolness factor.

It would be even cooler, though, if you could embed it on a website. There's no way to do this from within the app, but you can grab a JSON feed with a little JavaScript — if the server allows it. This one — as a security precaution — does not. The workaround is to create a proxy with PHP.

It took a lot of fussing with the help of ChatGPT, but here’s what I managed. I like how it turned out. An embed like this could possibly be used to give readers updates from other websites. I hope the developer eventually allows you to create embeds from the app.

Will I actually use it? I’m still thinking about it.

November 17, 2024

Gonna sift those guys right out of my feeds

Four years ago, I wrote about using siftrss to filter out unwanted items from your RSS feeds “in these troubled times.”

The times are just as troubled as ever, so I’m once again recommending siftrss, but this time I have a better idea of how it works.

Say, for example, you wanted to subscribe to Techmeme’s feed, but didn’t want any items with Trump or Musk in the title.

First, go to siftrss and put in the feed URL for Techmeme. That would be: techmeme.com/feed.xml

Change the first dropdown to “exclude”, the second to “title” and the third to “matches regex”. You need to use regex if you want to exclude more than one keyword.

Fill in the blank with /Trump|Musk/i. This tells the filter to exclude any items that have the word “Trump” or “Musk” in the title. The i at the end makes it case insensitive, meaning the filter works regardless of whether the words are upper or lower case.

If you’re familiar with regex, siftrss uses the Perl Compatible Regular Expressions implementation.

Here are some more examples:

Exclude any items with one of these four keywords: /keyword1|keyword2|keyword3|keyword4/i

The pipe symbol means “or”.

Exclude any items with both of these keywords: /keyword1&keyword2/i

The ampersand means “and”.

I find that taking breaks from certain individuals does wonders for my sense of well-being.

Bonus tip: Hacker News

I use a free app called Hack to read Hacker News. It has a massive number of settings, including one that filters items based on keywords. It’s way down at the bottom under Filters & Blocks — don’t miss it!

June 28, 2024

The best free Mac app you may not have heard of

Window management — or the lack of it — comes up a lot in forums where people talk about Mac stuff. The next version of macOS will improve the situation, but it will be minimal compared with some of the features you can get with an app.

I first learned about how much better window management could be when I was forced to use Windows for a few years at work. I disliked everything about it except the ability to move windows to the sides and have them each take up half the screen.

What impressed me even more was grabbing the space between the two windows and resizing the widths of both at the same time. I especially like this setup with a code editor on one side and a web browser on the other.

My search for free similar functionality on a Mac led to me 1Piece, which is humbly described as an app that “includes many features to improve the usability of your Mac.”

It then goes on to describe an amazing 21 features — plus “others”.

Among these features is window management, which includes my wish — the ability to resize the widths of side-by-side windows at the same time. But there’s lots more.

If you find it tedious to grab each window and drag it to the side, you can use the “left + right” command. It takes the top two windows and places them side by side with one click.

Split Assist creates a display of open windows you can choose from to take up the other half of the screen. Or you can decide to put two of them into quarters.

You’re not limited to the usual halves and thirds. You can, for example, choose the top two thirds. Or you can set up a four by six grid and choose whatever portion of the screen you want.

Of course, you can set up hot keys for any of these.

You can also create presets — get a window just way you want it, then use the preset any time you want it that ideal size.

A tweak function puts handles on the edges of the top window so you can change its size a pixel at a time by using your keyboard.

You might think this is a lot in a free app — and it is! But “window management” is just one of the over 21 features it has.

Another much requested function I see is the equivalent of alt-tab in Windows. 1Piece has this covered with a feature called Window List. You hit option-tab, and get a list of all your open windows along with previews. You can tweak the list by making it show only the windows in a particular app. You can also make it show only minimized windows — plus much more.

Related to this is Desktop Windows. When invoked, it displays an interface showing all the open windows, allowing you to choose the one you want.

Describing all the functions of this app would be a monumental task. I found myself going down many a rabbit hole when I opened the preferences. So I’ll mention just a few more that caught my eye.

Hitting control-option-command-M moves your mouse pointer to the centre of the screen. Hitting control-option-command-H hides it.

You can set up a favourite window, and create a hot key to bring it into focus.

You can open a contextual version of the active app’s menu bar by hitting shift-command-1.

You might be wondering where this app has been all your life. It first came out in 2014, so that’s 10 years of development. As of this writing, the latest version came out on May 27, 2024.

Who is the developer? Other than his name — Takahiro Fujita — there is precious little information. The website has a Japanese translation, so it’s a safe bet that he is based in Japan.

I’m also going to guess he is a fan of anime. It’s too much of a co-incidence that 1Piece bears a name so similar to One Piece, the story of a search for a mythical treasure.

1Piece itself is like a treasure chest overflowing with gems.

May 19, 2024

Why do we put wallpaper on our desktops?

Have a look at the top of your real-life desk. You might see some papers scattered or in piles. There might be a folder. There might be a portable hard drive.

The equivalent on your Mac is the desktop. Most people have at least a few icons representing files and folders on it, and maybe one for a hard drive. Macs even allow you to put your files in the equivalent of stacks.

Let’s get back to your real-life desk. Supposing you were tired of how it looks. Maybe it’s just your basic brown wood.

So you go down to the wallpaper store, find something you like, and glue it down on the desk. Right?

I don’t think so. So why do we ruin the computer desktop metaphor by using the term “wallpaper”?

There was a time when wallpaper on a Mac was known as a “desktop picture.” That made more sense. You were putting a picture on top of your desk. It would be rare to do something like that in real life, but at least it jived with some kind of reality.

Wallpaper goes on walls. Your desktop is not a wall.

But it looks like Apple, which did so much to popularize the graphical interface, has given up.

If you go to Settings in macOS 13 Ventura, and type in “desktop picture,” you’re taken to a section called Wallpaper.

One of the top results of a search in Ecosia for “desktop picture” is “Customize the wallpaper on your Mac”.

If you want to download a Lord of the Rings desktop picture for your Mac, you’ll have to browse one of the many wallpaper websites.

It’s a case where Windows won. Despite using the desktop metaphor like macOS, they have always insisted on using the term “wallpaper”.

I can see why Apple caved. They were probably tired of wasting time supporting new users who couldn’t figure out that desktop picture was the same as wallpaper.

How about we compromise and call it “tablecloth”?

May 12, 2024

You can judge a Mac app by how it helps you

What makes an app a good Mac citizen? For many of us, it could be summed up in this statement on the CotEditor website:

“CotEditor is exactly made for macOS. It looks and behaves just as macOS applications should.”

A big test is the Help menu. Apps made by Apple generally set the standard with “Name-of-app Help”, which opens an in-app browser with instructions on how to use the app.

I was surprised to discover that CotEditor does this, too. I was expecting to have to search for documentation on their website, because this is the norm with other code editors.

Most of them are cross-platform so it’s to be expected. If the help is on their website, they only have to do it once for all the platforms they support.

That doesn’t explain Nova, though. Despite calling itself “The native Mac code editor that's fast and amazing,” the help menu takes you to their website, where you can search through articles. I’m pretty sure this could have been implemented with an in-app browser.

Besides CotEditor, here are some other Mac apps that pass the test of in-app help: iA Writer, Tot, ImageOptim, Photoshop, Affinity Photo, BBEdit, Moom, and Scrivener.

Here are some otherwise great Mac apps that fall short by not offering in-app help: Bear, Little Snitch, NetNewsWire, Reeder, and SnippetsLab.

The worst are the ones that have a help menu with “Name-of-app Help”, but when you click on it you get a window saying, “Help isn’t available for Name-of-app Help.” Why have a help menu at all?

I have a habit tracker called Streaks that has no help menu, likely because it’s an iOS port. It’s not great, but seems a little more respectful of my time.

In-app help is so hit-and-miss that I often don’t think to look there. But I’m going to be doing it more often. And I will be silently judging the apps that don’t have it.

April 9, 2024

How to include HTML files on web pages the good, old-fashioned way

Server-side includes have been around for as long as I can remember — and that goes back to the days of dial-up. After all these years, I finally feel good about using them.

Let me explain.

First of all, SSIs are an easy way to include one html page in another html page. So, for example, if you have a navigation bar that’s the same on all pages, you can create it once in a separate html file, then include it on all the other html pages.

Here’s what the include code looks like:

<!--#include virtual="/nav.html" -->

That way, if you have to make a change to the navigation, you only have to do it in one place, instead of laboriously going through every page copying and pasting.

But there was always a catch, and I never liked it. You had to change the file extensions of all your pages to shtml. I guess the “s” stands for “server-side”.

Anyway, it’s annoying and looks weird.

So what changed for me at long last? I learned about these directives in the htaccess file!

You can add lines to htaccess that make html and htm files act like shtml files.

AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes
AddHandler server-parsed .html .htm

Before you do that, though, make sure it’s OK with your hosting service. As far as I can tell, the worst that could happen is that it simply wouldn’t work. But you never know. In my case, the service provided the instructions so I knew it was OK.

While I appreciate all the YouTubers patiently showing how to do includes with JavaScript, I can’t help but feel that something coming straight from the server is going to be a faster, more seamless experience for visitors.

April 8, 2024

Your Mac's Preview app is free, fast and more powerful than you might think

Here’s a little thing you can do that, as far as I can tell, is unique to Photoshop: size and crop at the same time.

You go to the the crop tool and specify the size you want the image to be. You then make a box for what part of the image you want. Hit enter and you’re done. It’s the right size and the right shape.

I tried doing this in several other photo-editing apps, but couldn’t figure out a way to do it. You can crop. You can size. But you can’t do both at once.

So if that’s the way it’s going to be, why not see if you can do it with a free app that comes with your Mac?

That’s where Preview comes in.

I have a web app where all the pictures are 100 pixels wide by 200 pixels high. The images I use are grabbed from the internet and vary greatly in shape and size.

The first thing I do is crop so that the space above and below the image looks about right. I find that it’s easier to get the height right and play with the width later.

After that, I change the size to 200 pixels high by whatever for the width.

Lastly, I adjust the width to 100 pixels, and hit Command-K.

Yes, it takes three steps in Preview compared with one in Photoshop, but there are advantages.

Preview starts up a lot faster. In the time it takes to wait for Photoshop to start up, I can have the job done in Preview.

Preview, of course, is free. I have Photoshop on my home computer as a perk of a job I recently moved on from. I have a feeling that will end soon, and I will have to pay if I want to keep it.

Preview is worth exploring. It started off as a way to look at PDFs but can now do a lot more. For basic photo editing, it’s certainly worth looking at.

Macworld has a two-part series here and here on the “superpowers” of Preview. It’s dated 2015, but mentions removing the background, which, I’m pretty sure, was just recently added — a feature, by the way, that I find quite handy.

Apple’s user guide is comprehensive.

Hacker News has a surprisingly long thread about the pros and cons of Preview.

I was curious to know about the history of Preview, but there is precious little to be found. Going by memory, it started off as a way to open and view PDFs, but I’m not sure that explains why it’s called Preview.

There is a thread on Quora that may be enlightening. The gist of it is that, back in the days of desktop publishing, the app was used to preview a document to see what it would look like on paper.

Wikipedia has a skimpy entry for Preview with a small section on history. Apparently, it dates back to 1989 and the NeXTSTEP operating system.

ChatGPT, on the other hand, says it was introduced in 2001 with Mac OS X. That would make sense if Preview was brought along when Apple made the switch to OS X, which was based on NeXTSTEP.

That Hacker News thread refers to Preview as “the Mac app people forget about.” Why download stuff when there’s a free app on your Mac that does a lot more than you might think?

March 29, 2024

What if we did social media IRL?

Have you ever seen someone on social media chastise you for spending too much time on the computer? Go outside, they say. Hang out with friends.

Setting the irony aside, this does conjure an image. What if you did hang out with friends, but you were so conditioned by social media that it wound up being an IRL template?

Here’s what it might look like.

Imagine a group of, say, a dozen people sitting in a circle in your living room. These people would be in that circle because they “follow” each other.

They come and go as they please. Some are there all there all the time. Some might be there for a few minutes.

The purpose of this group is to be social so some talking is expected or it won’t work.

Someone holds up a picture of a deer in their back yard. A few give a thumbs up because they like the picture. Others couldn’t care less about deer and don’t react. Some are distracted and don’t notice the picture.

Now things get rolling, and people have lots to say.

Person 1 says something. It’s interesting but before you can react . . .

Person 2 ignores what person 1 said, and says something unconnected. That’s also interesting.

Person 3 and person 4 bring up two other topics at the same time. It’s getting hard to keep up. You ignore what person 4 said because there is only so much you can take in.

Lots of people are saying lots of interesting stuff, but it’s all unrelated. You start thinking about the witty thing that person 5 said, but before you can fully digest it, person 6 has said something profound that deserves some thought.

After awhile, it’s apparent that there are two types of people in the circle. There are the few who talk over each other, hoping to get everyone’s attention. They’re usually nice about it, but sometimes they’ll say something outrageous just to make you look.

The other type of people are those listening for an entertaining tidbit here and there in the din.

Finally someone says something that makes sense. Get on the computer, they say. Social media is better organized. You don’t have to have people in your house.

And off you go.

March 28, 2024

Join the independent web for fun, not profit

I’ve been making personal websites from scratch since the days of dial-up.

Two of those sites are still going. Newsonaut started up in 2010. Thriftmac — a collection of hundreds of links to free Mac apps — has been going since 2006.

The IndieWeb movement started in 2011 — maybe I'm part of it and didn’t know it. But I’m not so sure.

IndieWeb, from what I can gather, refers to creating your own website with your own design so that you are in control — as opposed to a corporation like Facebook that may not have your best interests at heart.

That makes sense to me, but I would more likely be part of a maker web movement if such a thing existed. I make and maintain websites because I enjoy it. Just like other people love to knit, for example. The joy is making something, not in what you can get out of it.

Joan Westerberg wrote a fine article: The creator economy trap: why building on someone else's platform is a dead end. She makes great points about why you should have your own website and use it as the basis for a platform.

But she also says it’s hard. If you’re trying to make money on the internet, then absolutely it’s hard. It’s hard regardless of how you do it. I tried it for a few years and quit after I realized I was making way too little for the effort required.

Now I’m back to doing it for fun.

You can do it for fun, too. Play around with a bit of HTML and CSS on your computer. You don’t need a domain name. You don’t have to publish. Just see what you can do. If you keep at it and find you’re still having fun, then think about publishing. Going live will cost you, but think of it like other pastimes — they all cost something. If you’re having fun, though, it’s worth it.

The idea of an independent web has been around since at least 2001, which, according to Tantek Celik was “perhaps the heyday of independent web”.

From what I can tell, supporters are mainly a bunch of tech nerds like me who enjoy doing web stuff. They should just admit it. What they really want is for other people to join in the fun.