2022-10-06 22:20:08 +09:00
|
|
|
# Install script for AHK key remapping
|
|
|
|
# Be sure to install AutoHotKey first
|
|
|
|
|
|
|
|
|
2023-03-16 22:28:28 +09:00
|
|
|
# change working directory to git root
|
2023-07-14 13:24:40 +09:00
|
|
|
Set-Location (Join-Path $PSScriptRoot "..\..")
|
2022-10-06 22:20:08 +09:00
|
|
|
|
|
|
|
# set Ahk2Exe.exe path
|
|
|
|
# example "C:\Program Files\AutoHotKey\Compiler\Ahk2Exe.exe"
|
|
|
|
$ahk2exe_path = "C:\Program Files\AutoHotKey\Compiler\Ahk2Exe.exe"
|
|
|
|
|
|
|
|
## end config
|
|
|
|
|
|
|
|
if ($null -eq $ahk2exe_path) {
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
|
|
|
# compile
|
|
|
|
& $ahk2exe_path /in .\dotfiles\ahk\key_remaps.ahk /out dotfiles\ahk\key_remaps.exe
|
|
|
|
|
|
|
|
# add to startup folder
|
|
|
|
$startup = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\"
|
|
|
|
Copy-Item .\dotfiles\ahk\key_remaps.exe $startup
|
|
|
|
|
|
|
|
Write-Output "Finished!"
|