s https://jandp.biz/is/apps/macos/automator/
Apple
Automator.app (app)
Script Editor.app (app)
Services, Quick Actions, Shortcuts
Workflows
Folder Actions (Folder Actions Setup.app)
Hammerspoon
- hammerspoon.org/
- hammerspoon.org/#:~:text=At%20its%20core%2C%20Hammerspoon%20is,system%20functionality%2C%20to%20the%20user.
- google.com/search?q=hammerspoon
- Getting Started with Hammerspoon
hammerspoon.org/go/ - Anyone using Hammerspoon?
talk.automators.fm/t/anyone-using-hammerspoon/6588 - Creating A Productive Osx Environment – Hammerspoon
spinscale.de/posts/2016-11-08-creating-a-productive-osx-environment-hammerspoon.html - Category Archives: Hammerspoon
applehelpwriter.com/category/hammerspoon/ - Create custom macOS menu bar apps using Hammerspoon
chris.zarate.org/create-custom-macos-menu-bar-apps-using-hammerspoon - hammerspoon.org/docs/
- hammerspoon.org/docs/hs.menubar.html
- hammerspoon.org/docs/hs.hotkey.html
- simonduff.net/hammerspoon/
Lua programming language
- lua.org/
- lua.org/docs.html
- lua.org/manual/5.4/
- en.wikibooks.org/wiki/Lua_Programming
- en.wikibooks.org/wiki/Lua_Programming/Tables
- lua-users.org/
…
caffeine = hs.menubar.new()
function setCaffeineDisplay(state)
if state then
caffeine:setTitle(“AWAKE”)
else
caffeine:setTitle(“SLEEPY”)
end
end
function caffeineClicked()
setCaffeineDisplay(hs.caffeinate.toggle(“displayIdle”))
end
if caffeine then
caffeine:setClickCallback(caffeineClicked)
setCaffeineDisplay(hs.caffeinate.get(“displayIdle”))
end
— ####
— Example paths to your documents
local documentPaths = {
“‘/Users/johan/Dropbox/J&P/Boats! Boating!/Larson! Cabrio 260 2008/Logbook/0-Logbook-LarsonCabrio260.xlsx'”,
“/Users/johan/Dropbox/”,
“/Users/your_username/Documents/Document2.txt”,
“/Users/your_username/Documents/Document3.txt”,
— Add more documents if needed
}
— Function to open the selected document
local function openDocument(path)
hs.alert.show(“Hello World!” .. path)
hs.execute(“open ” .. path)
end
— Create the menubar item with a dropdown menu
local menu = hs.menubar.new()
local menuData = {}
for i, path in ipairs(documentPaths) do
local menuItem = {
title = “Document ” .. i,
fn = function() openDocument(path) end
— fn = function() hs.alert.show(“Hello World!”) end
}
table.insert(menuData, menuItem)
end