Skip to content

ElectronDock

Unofficial

Performs actions on the app icon in the user’s dock on macOS.

Import:

import type { ElectronDock } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface ElectronDock

Methods

MethodReturnsDescription
bounce(type?)numberBounces the dock icon. When critical is passed, the icon bounces until the app becomes active or the request is canceled; when informational is passed, it bounces for one second. macOS only.
cancelBounce(id)voidCancels the bounce of the given request. macOS only.
downloadFinished(filePath)voidBounces the Downloads stack if the file path is inside the Downloads folder. macOS only.
getBadge()stringReturns the badge string of the dock. macOS only.
getMenu()ElectronMenu | nullReturns the application's dock menu. macOS only.
hide()voidHides the dock icon. macOS only.
isVisible()booleanReturns whether the dock icon is visible. macOS only.
setBadge(text)voidSets the string to be displayed in the dock's badging area. macOS only.
setIcon(image)voidSets the image associated with this dock icon. macOS only.
setMenu(menu)voidSets the application's dock menu. macOS only.
show()Promise<void>Shows the dock icon. macOS only.

Links to this page: