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