Skip to content

Commit

Permalink
add custom icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Yetenol committed Oct 10, 2022
1 parent a52b827 commit 66d16d8
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 14 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Table of Contents
- [Application shortcuts](#application-shortcuts)
- [Tray Shortcuts](#tray-shortcuts)
- [Build instructions](#build-instructions)
- [Credits](#credits)

# Features
## Application shortcuts
Expand Down Expand Up @@ -44,4 +45,9 @@ Table of Contents
$compiler = "$env:ProgramFiles\AutoHotkey 2\Compiler\Ahk2Exe.exe"
$ahk2 = "$env:ProgramFiles\AutoHotkey 2\AutoHotkey64.exe"
& $compiler /bin $ahk2 /in source/main.ahk /out bin\shortcutFox.exe
```
```

# Credits

- Icons from [Icons8](https://icons8.com/icons/fluency)
- Converted to ICO using [Convertio](https://convertio.co/png-ico/)
2 changes: 1 addition & 1 deletion build.ps1.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ $compiler = "$env:ProgramFiles\AutoHotkey 2\Compiler\Ahk2Exe.exe"
$ahk2 = "$env:ProgramFiles\AutoHotkey 2\AutoHotkey64.exe"

# Get-Process shortcutFox -ErrorAction SilentlyContinue | Stop-Process
& $compiler /bin $ahk2 /in source/main.ahk /out bin\shortcutFox.exe
& $compiler /bin $ahk2 /in source/main.ahk /out bin\shortcutFox.exe /icon icons\shortcut.ico
# Start-Process -FilePath "bin\shortcutFox.exe"
Binary file removed icons/ScreenSketch.ico
Binary file not shown.
Binary file added icons/add-fingerprint.ico
Binary file not shown.
Binary file added icons/bluetooth.ico
Binary file not shown.
Binary file added icons/code-fork.ico
Binary file not shown.
Binary file added icons/face-id.ico
Binary file not shown.
Binary file added icons/shortcut.ico
Binary file not shown.
Binary file added icons/software-installer.ico
Binary file not shown.
Binary file added icons/whiteboard.ico
Binary file not shown.
Binary file added icons/windows-snipping-tool.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion source/core.ahk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
KEEWEB_BIN := "C:\Program Files\KeeWeb\KeeWeb.exe"
NO_ICON := "*"
DEFAULT_ICON := "icons\shortcut.ico"
10 changes: 9 additions & 1 deletion source/packageResources.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ loop parse resourceFolders, "," {
}

; Install resource files
FileInstall("..\icons\ScreenSketch.ico", "icons\ScreenSketch.ico")
FileInstall("..\icons\add-fingerprint.ico", "icons\add-fingerprint.ico")
FileInstall("..\icons\bluetooth.ico", "icons\bluetooth.ico")
FileInstall("..\icons\code-fork.ico", "icons\code-fork.ico")
FileInstall("..\icons\face-id.ico", "icons\face-id.ico")
FileInstall("..\icons\shortcut.ico", "icons\shortcut.ico")
FileInstall("..\icons\software-installer.ico", "icons\software-installer.ico")
FileInstall("..\icons\whiteboard.ico", "icons\whiteboard.ico")
FileInstall("..\icons\windows-snipping-tool.ico", "icons\windows-snipping-tool.ico")

FileInstall("..\scripts\gitUpdateAll.ps1.bat", "scripts\gitUpdateAll.ps1.bat")
FileInstall("..\scripts\wingetUpdateAll.ps1.bat", "scripts\wingetUpdateAll.ps1.bat")
FileInstall("..\scripts\toggleRunAtStartup.ps1.bat", "scripts\toggleRunAtStartup.ps1.bat")
14 changes: 7 additions & 7 deletions source/trayLayout.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,21 @@ TRAY_LAYOUT := {
id: "SETUP_HELLO_FACE",
text: "Setup Hello Face",
run: "explorer ms-settings:signinoptions-launchfaceenrollment",
icon: [A_WinDir "\System32\ddores.dll", 87],
icon: "icons\face-id.ico",
},
{
id: "SETUP_HELLO_FINGERPRINT",
text: "Setup Hello Fingerprint",
run: "explorer ms-settings:signinoptions-launchfingerprintenrollment",
icon: [A_WinDir "\System32\sensorscpl.dll", 11],
icon: "icons\add-fingerprint.ico",
},
]
},
{
id: "BLUETOOTH",
text: "Bluetooth audio and file transfer",
icon: [A_WinDir "\System32\netshell.dll", 104],
maxDisplay: 1,
icon: "icons\bluetooth.ico",
content:
[{
id: "BLUETOOTH_FILE_TRANSFER",
Expand All @@ -98,13 +98,13 @@ TRAY_LAYOUT := {
id: "WINGET_UPDATE",
text: "Update all applications",
run: "scripts\wingetUpdateAll.ps1.bat",
icon: [A_WinDir "\System32\shell32.dll", 239],
icon: "icons\software-installer.ico",
},
{
id: "GIT_UPDATE",
text: "Update all repositories",
run: "scripts\gitUpdateAll.ps1.bat",
icon: [A_WinDir "\System32\shell32.dll", 239],
icon: "icons\code-fork.ico",
},
]
},
Expand All @@ -116,13 +116,13 @@ TRAY_LAYOUT := {
id: "CALIBRATE_DIGITIZER",
text: "Calibrate pen",
run: "tabcal",
icon: [A_WinDir "\System32\ddores.dll", 27],
icon: "icons\whiteboard.ico",
},
{
id: "TAKE_SCREENSHOT",
text: "Take Screenshot",
send: "#+s",
icon: "icons\ScreenSketch.ico",
icon: "icons\windows-snipping-tool.ico",
},
]
},
Expand Down
8 changes: 5 additions & 3 deletions source/trayMenu.ahk
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#Include trayLayout.ahk
#Include core.ahk
#Include trayLayout.ahk
#Include io.ahk

TraySetIcon(DEFAULT_ICON)

class MenuManager {
static ITEM_TYPES := { ; all items need an ID and TEXT
ACTION: 0, ; Do DELAY interval, RUN file, SEND keystrokes, assumed by default
Expand Down Expand Up @@ -267,10 +269,10 @@ _readDefaultAction() {
}

_applyDefaultAction() {
global NO_ICON
global DEFAULT_ICON
action := this._readDefaultAction()
if not action {
TraySetIcon(NO_ICON)
TraySetIcon(DEFAULT_ICON)
return
}
icon := action.icon
Expand Down

0 comments on commit 66d16d8

Please sign in to comment.