Skip to content

Commit

Permalink
Tray balloon icon
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhamlett committed Dec 18, 2024
1 parent f19d2ee commit b104a81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion electron/watchers/wakatime.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import path from "path";
import { WindowInfo } from "@miniben90/x-win";
import { app, Notification, shell, Tray } from "electron";
import { app, nativeImage, Notification, shell, Tray } from "electron";
import isDev from "electron-is-dev";
import { autoUpdater } from "electron-updater";

Expand Down Expand Up @@ -196,6 +197,9 @@ export class Wakatime {
true,
);
this.tray?.displayBalloon({
icon: nativeImage.createFromPath(
path.join(process.env.VITE_PUBLIC!, "trayIconTemplate.png"),
),
title: "WakaTime Error",
content: `Error when running wakatime-cli: ${err}`,
});
Expand Down

0 comments on commit b104a81

Please sign in to comment.