[feature] add windows 10 configuration
This commit is contained in:
parent
0031040189
commit
2dc975215e
18
win/profile.ps1
Normal file
18
win/profile.ps1
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# adminstration powershell:
|
||||||
|
# Set-ExecutionPolicy RemoteSigned
|
||||||
|
# new-item -ItemType SymbolicLink -Target "D:\Nextcloud\klesh\config\win\profile.ps1" -Path $profile
|
||||||
|
|
||||||
|
|
||||||
|
Set-PSReadLineOption -EditMode Emacs
|
||||||
|
|
||||||
|
Function dp ($Word) {
|
||||||
|
Add-Type -AssemblyName presentationCore
|
||||||
|
$tmpPath = Join-Path -Path $env:Temp -ChildPath 'sound.mp3'
|
||||||
|
Invoke-WebRequest -Uri "http://dict.youdao.com/dictvoice?audio=$Word&type=1" -OutFile $tmpPath
|
||||||
|
$mediaPlayer = New-Object system.windows.media.mediaplayer
|
||||||
|
$mediaPlayer.Open($tmpPath)
|
||||||
|
$mediaPlayer.Play()
|
||||||
|
Start-Sleep -Seconds 2
|
||||||
|
$mediaPlayer.Close()
|
||||||
|
}
|
||||||
|
|
11
win/setup.ps1
Normal file
11
win/setup.ps1
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
Set-ExecutionPolicy RemoteSigned
|
||||||
|
|
||||||
|
$dotfiles=(Get-Item $PSScriptRoot).Parent.FullName
|
||||||
|
New-Item -ItemType SymbolicLink -Target $dotfiles\win\profile.ps1 -Path $profile -Force
|
||||||
|
New-Item -ItemType SymbolicLink -Target $dotfiles\config\mpv\mpv.conf -Path $Env:APPDATA\mpv\mpv.conf -Force
|
||||||
|
New-Item -ItemType SymbolicLink -Target $dotfiles\config\mpv\scripts -Path $Env:APPDATA\mpv\scripts -Force
|
||||||
|
|
||||||
|
$sshconf="D:\Nextcloud\klesh\config\ssh\config"
|
||||||
|
if (Test-Path $sshconf -PathType Leaf) {
|
||||||
|
New-Item -ItemType SymbolicLink -Target $sshconf -Path $home\.ssh\config -Force
|
||||||
|
}
|
76
win/win.ahk
Normal file
76
win/win.ahk
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
^Esc:: Send ^{``}
|
||||||
|
*#q:: Send {LAlt down}{F4}{LAlt up}
|
||||||
|
|
||||||
|
|
||||||
|
^BS::
|
||||||
|
Send ^a
|
||||||
|
Send {BS}
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
#=::SoundSet,+5
|
||||||
|
#-::SoundSet,-5
|
||||||
|
|
||||||
|
|
||||||
|
; Ctrl + Shift + v : paste as plain text
|
||||||
|
^!v::
|
||||||
|
Clip0 = %ClipBoardAll%
|
||||||
|
ClipBoard = %ClipBoard% ; Convert to plain text
|
||||||
|
Send ^v
|
||||||
|
Sleep 1000
|
||||||
|
ClipBoard = %Clip0%
|
||||||
|
VarSetCapacity(Clip0, 0) ; Free memory
|
||||||
|
Return
|
||||||
|
|
||||||
|
^+!v::
|
||||||
|
Clip0 = %ClipBoardAll%
|
||||||
|
ClipBoard := StrReplace(ClipBoard, "\", "/") ; Convert to plain text
|
||||||
|
Send ^v
|
||||||
|
Sleep 1000
|
||||||
|
ClipBoard = %Clip0%
|
||||||
|
VarSetCapacity(Clip0, 0) ; Free memory
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
#IfWinActive ahk_class ConsoleWindowClass
|
||||||
|
^+v:: MouseClick, Right
|
||||||
|
^+c:: MouseClick, Right
|
||||||
|
#IfWinActive
|
||||||
|
|
||||||
|
|
||||||
|
#IfWinActive ahk_class mintty
|
||||||
|
^+v::Send +{Ins}
|
||||||
|
^+c::Send ^{Ins}
|
||||||
|
#IfWinActive
|
||||||
|
|
||||||
|
|
||||||
|
#f:: WinMaximize, A
|
||||||
|
#+f:: WinRestore, A
|
||||||
|
#+l:: Send {LWinDown}{Right}{LWinUp}
|
||||||
|
#+h:: Send {LWinDown}{Left}{LWinUp}
|
||||||
|
|
||||||
|
|
||||||
|
Capslock & h:: Send {Left}
|
||||||
|
Capslock & j:: Send {Down}
|
||||||
|
Capslock & k:: Send {Up}
|
||||||
|
Capslock & l:: Send {Right}
|
||||||
|
Capslock & -:: Send {Volume_Down}
|
||||||
|
Capslock & =:: Send {Volume_Up}
|
||||||
|
Capslock & \:: Send {Media_Play_Pause}
|
||||||
|
Capslock & y:: Send {Browser_Back}
|
||||||
|
Capslock & u:: Send ^{PgUp}
|
||||||
|
Capslock & i:: Send ^{PgDn}
|
||||||
|
Capslock & o:: Send {Browser_Forward}
|
||||||
|
Capslock & BackSpace:: Send {Del}
|
||||||
|
|
||||||
|
Capslock & n:: Send {Home}
|
||||||
|
Capslock & m:: Send {PgUp}
|
||||||
|
Capslock & ,:: Send {PgDn}
|
||||||
|
Capslock & .:: Send {End}
|
||||||
|
|
||||||
|
Capslock & Space:: SetCapsLockState % !GetKeyState("CapsLock", "T")
|
||||||
|
+CapsLock::
|
||||||
|
Send {~}
|
||||||
|
SetCapsLockState % !GetKeyState("CapsLock", "T")
|
||||||
|
Return
|
||||||
|
Capslock::return
|
Loading…
Reference in New Issue
Block a user