From b025948d903618de46856c903a26d45711a0b402 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Sun, 22 May 2022 16:46:18 +0200 Subject: [PATCH] Add the ability to pick the tray icon --- assets/{ac_plug.png => ac_white_plug_filled.png} | Bin src/tray.ts | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) rename assets/{ac_plug.png => ac_white_plug_filled.png} (100%) diff --git a/assets/ac_plug.png b/assets/ac_white_plug_filled.png similarity index 100% rename from assets/ac_plug.png rename to assets/ac_white_plug_filled.png diff --git a/src/tray.ts b/src/tray.ts index 3e36c9c..aafd99d 100644 --- a/src/tray.ts +++ b/src/tray.ts @@ -25,7 +25,8 @@ app.whenReady().then(async () => { tray.setToolTip("Discord"); tray.setContextMenu(contextMenu); } else { - tray = new Tray(path.join(__dirname, "../", "/assets/ac_plug.png")); + var trayIcon = await getConfig("trayIcon") ?? "ac_plug_colored"; + tray = new Tray(path.join(__dirname, "../", `/assets/${trayIcon}.png`)); const contextMenu = Menu.buildFromTemplate([ { label: "ArmCord"