mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
chezmoi: windows migration dir
This commit is contained in:
parent
52b70819bf
commit
c24adf35d4
51 changed files with 3403 additions and 3840 deletions
115
misc/autohotkey/Caps.ahk
Normal file
115
misc/autohotkey/Caps.ahk
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
#Requires AutoHotkey v2.0
|
||||
#SingleInstance Force
|
||||
|
||||
; 全局变量声明
|
||||
global g_LastCtrlKeyDownTime := 0
|
||||
global g_AbortSendEsc := false
|
||||
global g_ControlRepeatDetected := false
|
||||
|
||||
*CapsLock:: {
|
||||
global g_ControlRepeatDetected
|
||||
global g_LastCtrlKeyDownTime
|
||||
global g_AbortSendEsc
|
||||
|
||||
if (g_ControlRepeatDetected) {
|
||||
return
|
||||
}
|
||||
|
||||
Send "{Ctrl down}"
|
||||
g_LastCtrlKeyDownTime := A_TickCount
|
||||
g_AbortSendEsc := false
|
||||
g_ControlRepeatDetected := true
|
||||
}
|
||||
|
||||
*CapsLock Up:: {
|
||||
global g_ControlRepeatDetected
|
||||
global g_LastCtrlKeyDownTime
|
||||
global g_AbortSendEsc
|
||||
|
||||
Send "{Ctrl up}"
|
||||
g_ControlRepeatDetected := false
|
||||
if (g_AbortSendEsc) {
|
||||
return
|
||||
}
|
||||
current_time := A_TickCount
|
||||
time_elapsed := current_time - g_LastCtrlKeyDownTime
|
||||
if (time_elapsed <= 250) {
|
||||
SendInput "{Esc}"
|
||||
}
|
||||
}
|
||||
|
||||
; 组合所有 Ctrl 快捷键
|
||||
#HotIf
|
||||
~*^a::
|
||||
~*^b::
|
||||
~*^c::
|
||||
~*^d::
|
||||
~*^e::
|
||||
~*^f::
|
||||
~*^g::
|
||||
~*^h::
|
||||
~*^i::
|
||||
~*^j::
|
||||
~*^k::
|
||||
~*^l::
|
||||
~*^m::
|
||||
~*^n::
|
||||
~*^o::
|
||||
~*^p::
|
||||
~*^q::
|
||||
~*^r::
|
||||
~*^s::
|
||||
~*^t::
|
||||
~*^u::
|
||||
~*^v::
|
||||
~*^w::
|
||||
~*^x::
|
||||
~*^y::
|
||||
~*^z::
|
||||
~*^1::
|
||||
~*^2::
|
||||
~*^3::
|
||||
~*^4::
|
||||
~*^5::
|
||||
~*^6::
|
||||
~*^7::
|
||||
~*^8::
|
||||
~*^9::
|
||||
~*^0::
|
||||
~*^Space::
|
||||
~*^Backspace::
|
||||
~*^Delete::
|
||||
~*^Insert::
|
||||
~*^Home::
|
||||
~*^End::
|
||||
~*^PgUp::
|
||||
~*^PgDn::
|
||||
~*^Tab::
|
||||
~*^Enter::
|
||||
~*^,::
|
||||
~*^.::
|
||||
~*^/::
|
||||
~*^;::
|
||||
~*^'::
|
||||
~*^[::
|
||||
~*^]::
|
||||
~*^\::
|
||||
~*^-::
|
||||
~*^=::
|
||||
~*^`::
|
||||
~*^F1::
|
||||
~*^F2::
|
||||
~*^F3::
|
||||
~*^F4::
|
||||
~*^F5::
|
||||
~*^F6::
|
||||
~*^F7::
|
||||
~*^F8::
|
||||
~*^F9::
|
||||
~*^F10::
|
||||
~*^F11::
|
||||
~*^F12::
|
||||
{
|
||||
global g_AbortSendEsc
|
||||
g_AbortSendEsc := true
|
||||
}
|
||||
43
misc/autohotkey/Tab.ahk
Normal file
43
misc/autohotkey/Tab.ahk
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#Requires AutoHotkey v2.0
|
||||
#SingleInstance Force
|
||||
|
||||
Tab Up:: Send '{Tab ' (A_PriorKey = 'Tab' ? 1 : times) '}'
|
||||
Tab:: global times := ''
|
||||
|
||||
#HotIf GetKeyState('Tab', 'P')
|
||||
h::Left
|
||||
n::Down
|
||||
e::Up
|
||||
i::Right
|
||||
H::Home
|
||||
I::End
|
||||
u::PgUp
|
||||
d::PgDn
|
||||
1::F1
|
||||
2::F2
|
||||
3::F3
|
||||
4::F4
|
||||
5::F5
|
||||
6::F6
|
||||
7::F7
|
||||
8::F8
|
||||
9::F9
|
||||
0::F10
|
||||
-::F11
|
||||
=::F12
|
||||
+:: global times .= ThisHotkey
|
||||
#HotIf
|
||||
|
||||
Enter Up:: Send '{Enter ' (A_PriorKey = 'Enter' ? 1 : times) '}'
|
||||
Enter:: global times := ''
|
||||
|
||||
#HotIf GetKeyState('Enter', 'P')
|
||||
b:: {
|
||||
Run("vivaldi.exe")
|
||||
}
|
||||
t:: {
|
||||
Run("wezterm-gui.exe")
|
||||
}
|
||||
c:: {
|
||||
Run("code.exe")
|
||||
}
|
||||
BIN
misc/autohotkey/bin/Caps.exe
Normal file
BIN
misc/autohotkey/bin/Caps.exe
Normal file
Binary file not shown.
BIN
misc/autohotkey/bin/colemak.exe
Normal file
BIN
misc/autohotkey/bin/colemak.exe
Normal file
Binary file not shown.
29
misc/autohotkey/colemak.ahk
Normal file
29
misc/autohotkey/colemak.ahk
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#Requires AutoHotkey v2.0
|
||||
|
||||
q::q
|
||||
w::w
|
||||
e::f
|
||||
r::p
|
||||
t::g
|
||||
y::j
|
||||
u::l
|
||||
i::u
|
||||
o::y
|
||||
p::;
|
||||
a::a
|
||||
s::r
|
||||
d::s
|
||||
f::t
|
||||
g::d
|
||||
h::h
|
||||
j::n
|
||||
k::e
|
||||
l::i
|
||||
`;::o
|
||||
z::z
|
||||
x::x
|
||||
c::c
|
||||
v::v
|
||||
b::b
|
||||
n::k
|
||||
m::m
|
||||
142
misc/autohotkey/main.ahk
Normal file
142
misc/autohotkey/main.ahk
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
#Requires AutoHotkey v2.0
|
||||
|
||||
#h::
|
||||
{
|
||||
Send("{Left}")
|
||||
}
|
||||
|
||||
#n::
|
||||
{
|
||||
Send("{Down}")
|
||||
}
|
||||
|
||||
#e::
|
||||
{
|
||||
Send("{Up}")
|
||||
}
|
||||
|
||||
#i::
|
||||
{
|
||||
Send("{Right}")
|
||||
}
|
||||
|
||||
{
|
||||
Send("{Home}")
|
||||
}
|
||||
#a:: ; Vim-like navigation: Append
|
||||
{
|
||||
Send("{End}")
|
||||
}
|
||||
|
||||
#q:: ; Simulate cmd+q in macOS
|
||||
{
|
||||
Send("!{F4}")
|
||||
}
|
||||
|
||||
; 定义一个全局状态变量,标记是否触发了组合键
|
||||
global CapsLockState := false
|
||||
|
||||
; 当 CapsLock 作为修饰键与其他键一起使用时
|
||||
CapsLock & s:: {
|
||||
global CapsLockState
|
||||
CapsLockState := true
|
||||
Run("ShareX.exe -RectangleRegion")
|
||||
}
|
||||
|
||||
; 单独按下 CapsLock 时,发送 Esc
|
||||
CapsLock:: {
|
||||
global CapsLockState
|
||||
; 如果之前未使用组合键,则发送 Esc
|
||||
if not CapsLockState {
|
||||
Send("{Esc}")
|
||||
}
|
||||
CapsLockState := false ; 重置状态
|
||||
}
|
||||
|
||||
; 释放 CapsLock 时重置状态
|
||||
*CapsLock Up:: {
|
||||
global CapsLockState
|
||||
CapsLockState := false
|
||||
}
|
||||
|
||||
#HotIf WinActive('ahk_exe' 'QQ.exe')
|
||||
^n::
|
||||
{
|
||||
Send("^{Down}")
|
||||
}
|
||||
^h::
|
||||
{
|
||||
Send("^{Left}")
|
||||
}
|
||||
^i::
|
||||
{
|
||||
Send("^{Enter}")
|
||||
}
|
||||
^e::
|
||||
{
|
||||
Send("^{Up}")
|
||||
}
|
||||
#HotIf WinActive('ahk_exe' 'Weixin.exe')
|
||||
^n::
|
||||
{
|
||||
Send("{Down}")
|
||||
}
|
||||
^e::
|
||||
{
|
||||
Send("{Up}")
|
||||
}
|
||||
#HotIf WinActive('ahk_exe' 'Discord.exe')
|
||||
^n::
|
||||
{
|
||||
Send("^!{Down}")
|
||||
}
|
||||
^e::
|
||||
{
|
||||
Send("^!{Up}")
|
||||
}
|
||||
|
||||
#HotIf WinActive('ahk_exe' 'olk.exe')
|
||||
^n::
|
||||
{
|
||||
Send("{Down}")
|
||||
}
|
||||
^+n::
|
||||
{
|
||||
Send("^.")
|
||||
}
|
||||
^+e::
|
||||
{
|
||||
Send("^,")
|
||||
}
|
||||
^e::
|
||||
{
|
||||
Send("{Up}")
|
||||
}
|
||||
#HotIf WinActive('ahk_exe' 'SumatraPDF.exe')
|
||||
^\::
|
||||
{
|
||||
Send("{F12}")
|
||||
}
|
||||
#HotIf WinActive('ahk_exe' 'Flow.Launcher.exe')
|
||||
^a::
|
||||
{
|
||||
Send("{End}")
|
||||
}
|
||||
^+a::
|
||||
{
|
||||
Send("^a")
|
||||
}
|
||||
^l::
|
||||
{
|
||||
Send("{Home}")
|
||||
}
|
||||
^+BackSpace::
|
||||
{
|
||||
Send("^a{Backspace}")
|
||||
}
|
||||
#HotIf WinActive('ahk_exe' 'Obsidian.exe')
|
||||
^e::
|
||||
{
|
||||
Send("^p")
|
||||
}
|
||||
#HotIf
|
||||
43
misc/autohotkey/spcl.ahk
Normal file
43
misc/autohotkey/spcl.ahk
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#Requires AutoHotkey v2.0
|
||||
#SingleInstance Force
|
||||
|
||||
Space Up:: Send '{Space ' (A_PriorKey = 'Space' ? 1 : times) '}'
|
||||
Space:: global times := ''
|
||||
|
||||
#HotIf GetKeyState('Space', 'P')
|
||||
h::Left
|
||||
n::Down
|
||||
e::Up
|
||||
i::Right
|
||||
k::Home
|
||||
o::End
|
||||
u::PgUp
|
||||
m::PgDn
|
||||
1::F1
|
||||
2::F2
|
||||
3::F3
|
||||
4::F4
|
||||
5::F5
|
||||
6::F6
|
||||
7::F7
|
||||
8::F8
|
||||
9::F9
|
||||
0::F10
|
||||
-::F11
|
||||
=::F12
|
||||
+:: global times .= ThisHotkey
|
||||
#HotIf
|
||||
|
||||
Enter Up:: Send '{Enter ' (A_PriorKey = 'Enter' ? 1 : times) '}'
|
||||
Enter:: global times := ''
|
||||
|
||||
#HotIf GetKeyState('Enter', 'P')
|
||||
b:: {
|
||||
Run("vivaldi.exe")
|
||||
}
|
||||
t:: {
|
||||
Run("wezterm-gui.exe")
|
||||
}
|
||||
c:: {
|
||||
Run("code.exe")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue