mirror of
https://codeberg.org/qwjyh/dotfiles.git
synced 2025-06-26 19:29:20 +09:00
add: ahk & install script
This commit is contained in:
parent
ad585e1444
commit
10de79427e
3 changed files with 96 additions and 0 deletions
31
bin/windows/install_key_remaps.ps1
Normal file
31
bin/windows/install_key_remaps.ps1
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Install script for AHK key remapping
|
||||
# Be sure to install AutoHotKey first
|
||||
|
||||
|
||||
# check working directory
|
||||
if (!(
|
||||
(Test-Path bin) -and (Test-Path dotfiles)
|
||||
)) {
|
||||
Write-Warning -Message "wrong current path
|
||||
please execute at repo root"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 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!"
|
Loading…
Add table
Add a link
Reference in a new issue