Apple Script
Hologram can be controlled by apple script to get a list of available themes, or set the active theme.
tell application "Hologram Desktop"
set activeTheme to false
set themeToMakeActive to false
# Loop though each theme, and find the active one, and the one we want to make active
repeat with theTheme in themes
set props to properties of theTheme
# Get the theme name and log it
set themeName to name of props
log themeName
# Is this theme active?
if theTheme is active then
set activeTheme to theTheme
end if
# Find a theme by name. In this case we’re looking for a theme named Beach
if themeName is equal to "Beach" then
set themeToMakeActive to theTheme
end if
end repeat
# Check if there is an active theme
if activeTheme is not false then
# Disable a theme
mark activeTheme as "not active"
end if
# Make a theme active
if themeToMakeActive is not false then
# Make a theme active
mark themeToMakeActive as "active"
end if
end tell
Here's some examples of how to use a interact with Hologram using js Apple Script:
// Get a reference to the Hologram app
app = Application("Hologram Desktop");
// Get a list of available themes
app.themes()
// Get all themes by name
app.themes.name()
// Get the active theme. Only one theme can be active at a time.
theme = app.themes.whose({ active: true })[0]
// Make a theme active
theme.mark({as: "active"});