Tuesday, September 9, 2025

Applescript to load three images, each on a different monitor, fullscreen

I've been wanting to automate this for a while, because it takes all of a minute to set up my screens the way I like when I come to my computer. Heh.

The task is to load three images, each on a different screen, and set them to fullscreen mode. Along the way I found some solutions that suggested using the pixel dimensions of the monitors to align the images, but I found that unnecessarily complicated and I couldn't make it work when the screens are not horizontally aligned.

A comment on one post suggested using the free tool Amethyst, which is a tiling window manager. Amethyst understands the monitor layout, and can move windows between screens with a keystroke. To send a keystroke you can use a key code in AppleScript.

There is a wonderful key code reference that helped figuring out some of the codes I needed.

I found that while I can modify the key code using the shift, option or command keys, I could not modify it using the function key. Fortunately, I was able to use the free key codes utility by Many Tricks to determine that Preview will accept Control-Command-F as well as Fn-F to go fullscreen.

Also note this requires changes to the accessibility control panel to allow keystrokes to be sent from the script. I have not been able to use the script saved as an app due to security limitations. That would be nice because I could tell Siri to launch the script.

So here is my script for posterity.

-- Change these paths to your actual images

set image1 to POSIX file "/Users/me/Pictures/pic1.webp"

set image2 to POSIX file "/Users/me/Pictures/pic2.jpeg"

set image3 to POSIX file "/Users/me/Pictures/pic3.png"


-- Arrange windows on different displays

-- key code 13 / w / screen 1

-- key code 14 / e / screen 2

-- key code 15 / r / screen 3

-- key code 3  f / fullscreen


-- Open Amethyst

tell application "Amethyst"

activate

end tell


-- Open images in Preview

tell application "Preview"

activate

open {image1}

end tell


delay 1 -- wait for Preview to open


tell application "System Events" to key code 13 using {control down, option down, shift down}


delay 1


-- send a key code to Preview

tell application "System Events" to key code 3 using {control down, command down}


delay 1 -- wait before opening next image



tell application "Preview"

activate

open {image2}

delay 1 -- wait for Preview to open

tell application "System Events" to key code 15 using {control down, option down, shift down}

delay 1

tell application "System Events" to key code 3 using {control down, command down}

end tell




delay 1 -- wait before opening next image


tell application "Preview"

activate

open {image3}

delay 1 -- wait for Preview to open

tell application "System Events" to key code 14 using {control down, option down, shift down}

delay 1

tell application "System Events" to key code 3 using {control down, command down}

end tell


quit

Sunday, August 17, 2025

De-fluffing Facebook on a Computer

How to De-fluff Facebook on a Computer...

Run Facebook from a web browser on your computer.  These steps don't work on the Mobile App.

I recommend running Vivaldi, which is based on Google Chrome, but is set up to avoid tracking. You could use most browsers – (F.B. Purity is compatible with the following web browsers: Firefox, Google Chrome, Edge, Safari, Opera and Brave running on Windows, Mac, Linux etc.)

The next steps are about using FBP (FB Purity).

Look up FBP at https://www.fbpurity.com

Download and Install FBP

When it is installed, you’ll see an icon for FBP at the top right of your screen



Click on that to open the settings.
You’ll want to try some things out gradually. Things are pretty well labelled. And there is a user manual linked right here on the top page.


Here is how I have set the newsfeed filters. 

Notice that I set it to default to the FRIENDS sort for the news feed. That’s key for me. 

Another feed type that is useful is MOST RECENT. Both of these feeds are available in regular Facebook, but the app normally defaults to TOP POSTS, which tends to have a lot of extraneous stuff in it. (By design) You can see where I am hiding advertisements, and other fluff. 


Tick open the arrow next to Various Post Types. Here you can filter out extraneous post types…

I’m kind of going scorched-earth. Turning off a lot of things you might like, so try them one by one if you don’t know what they are. In my case I’m hiding all videos, and filtering on a troubling subject. I’ll often put in there things that the algorithm wants to show me, which I don’t want to see in my feed. I’m using Donald as an example here.



If you tick on the arrow by Left Coiumn Links
I’m hiding the entire left column, which has a lot of random stuff. That’s pretty extreme, but I like it a lot. Set up other stuff first. There may be things you want to see here. So make your changes gradually.

I recommend saving your settings using the  SAVE and CLOSE button, but first you might want to EXPORT your settings with the link at the bottom of the page.

A couple things to note. When you want to create a post after setting this up, you may see that the usual Dialog Box is missing at the top of the page. There is now a link on the left to CREATE NEW POST, or you can click BACK TO TOP FEEDS, to show the usual “What’s on your mind” dialog box. It’s in Blue text on my screen which is hard to see…


Good luck! For more information take a look at the documentation here:
https://www.fbpurity.com/user-guide.htm




Tuesday, October 31, 2023

Recovering a Metamask Seed Phrase on a Mac with Chrome

After several upgrades I discovered that I no longer had Metamask installed. Metamask is a crypto wallet and it holds a small sum that I set to explore selling a video NFT.

Naturally, it was a Phishing email (your NFT has an offer!!!) that reminded me to check the wallet. Losing access to the wallet means the funds are lost.

Metamask uses a secret recovery phrase, with which you can import your wallet to a new machine. But I don't have the phrase...

So, Metamask provides a method to recover the phrase from a backup. They note that if the extension is uninstalled from your browser, the database may be wiped out.

The file location shown in MetaMask's support article is not exactly right:

https://support.metamask.io/hc/en-us/articles/360018766351-How-to-recover-your-Secret-Recovery-Phrase

If you have a backup, you can navigate to the Library file location in your user account. There you will find a low numbered database file, like 000005.ldb

You can load that file into the decryptor provided by Metamask, and recover the phrase.

Here's what I found that differs from the support article: The file location is in the user profile:

On a Mac, the location of the folder is: /Users/*username*/Library/Application Support/Google/Chrome/Default/Local Extension Settings/nkbihfbeogaeaoehlefnkodbefgpgknn

If the Library folder is hidden: Select your user account in the Finder window. Hold down Command-Shift-. (period) to show the hidden Library folder under your user account.

I copied the file to my desktop temporarily to make it easy to select from the Github tool.

https://metamask.github.io/vault-decryptor/

Yay!

This process took a long time because I had to find a TimeMachine backup from the old machine. I had to figure out how to open a backup from a different machine, [Hold down the option key and select Browse Other Backup Disks] but doing that was no help because I could not access the hidden files! So, I just navigated into the backup archive to find my files and used the CMD-Shift-. option to show the hidden folders.

Friday, December 30, 2022

When the lights get dim?

We've got a great stove, at least in theory. A Thermidor RDFS30 gas slide in range from the mid 90's. For some time now they have not manufactured replacement parts.

It turns out the LED display on the oven control module (part number 486752) is dim. Hardly readable even in the dark. The time is readable but the oven temperature is not.

I see some of these modules used on EBay for over $600. Yikes! And one post for the wrong part. Scary. We'll need to re-do the kitchen eventually, and we've dodged a fridge replacement so far this year. So, I'd like to get this fixed until we have time to think about a re-do. An equivalent LG model is on sale for $1299.

Online I see two companies who will repair the unit and ship it back for about $200. Also, there is a 'repair kit' available, but the repair kit handles other issues with the control board - not the dim LEDs.

The deal with my partner is, if we can use the cooktop, I can disable the oven for a week.

To access the control module, first I had to turn off the power and unscrew the brass fittings under each burner.

Then the deck can be lifted up.
There is a cover over the top of the front panel to remove, and then screws underneath on each side of the front panel beneath the oven door. The front panel is glass, so be careful removing the screws, as you wouldn't want to drop the panel. I was careful to take pictures and make a chart of the wiring for the control module, so it is easy to put it all back together.

But when I take the control board out, it seems the gas does not flow to the burners. Bummer. I was scratching my head looking at the schematic, there are two gas solenoids but four burners. It turns out that this range has two burners that cycle off and back on to reduce the temperature on an ultra low setting. So those two burners will not work without power, but the other two will.

On the first go-round, I disassembled the cook top and discovered that two of the ignitors were loose. I ordered circlips ($2.50 ea.) to secure the two ignitors. I installed the clips but waited for a convenient moment to remove the control module.

As it is MLK day in the US, we were both home and agreed to fix the oven. We started by installing some screws on the "deflector" in the oven (a plate above the oven's heating element, not the Enterprise!) Then the control board came out, and I sent it off for a two-day turnaround repair. The repair is $219.99. I added an expediting fee and Fedex shipping (not to inconvenience my partner!) totalling $338.04 all in, I could have saved $100 by choosing a slower service. One of the companies is located in Canada, and prefers USPS international shipping. The other has expedited service and prefers FEDEX. As the postal service is close for the Federal holiday, I went with the US company. Hopefully - a three day turnaround rather than a week turnaround time.

Update: The unit came back FEDEX, packaged very well, installed and it works great!

Friday, January 10, 2020

Drinking Coffee, Lacking Motivation

What to do when technical achievements simply become boredom?
Or worse, when even listening to people talk mindlessly becomes painful?
Drink coffee. Maybe cultivate the ability to rock back and forth, standing, with a cup of coffee.

Like this guy. "How are those TPS reports coming?"


Check out this article on office design: "Uninspired Setting? Uninspired Work." - GQ

Perhaps this is a call to clean the office? That helps when I am feeling uninspired!
But first, coffee...



Tuesday, April 9, 2019

Don't be EVIL

EVIL is removing the home page option from Google Chrome on mobile browsers.