Merge branch 'master' of gitee.com:klesh/dotfiles

This commit is contained in:
Klesh Wong 2021-06-24 11:17:50 +08:00
commit bfe541e34d
3 changed files with 25 additions and 0 deletions

View File

@ -36,6 +36,10 @@
"splitMode": "duplicate"
},
"keys": "alt+shift+d"
},
{
"command": null,
"keys": "ctrl+,"
}
],
"copyFormatting": "none",

View File

@ -0,0 +1,11 @@
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="Admin Command Here"
"NoWorkingDirectory"=""
"HasLUAShield"=""
"Position"="Top"
"Icon"="C:\\Windows\\System32\\cmd.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

View File

@ -187,3 +187,13 @@ ToggleActiveWinMaximum() {
WinMaximize, A
}
}
GetSelectedText() {
tmp = %ClipboardAll% ; save clipboard
Clipboard := "" ; clear clipboard
Send, ^c ; simulate Ctrl+C (=selection in clipboard)
ClipWait, 0, 1 ; wait until clipboard contains data
selection = %Clipboard% ; save the content of the clipboard
Clipboard = %tmp% ; restore old content of the clipboard
return selection
}