diff --git a/win/WindowsTerminal/settings.json b/win/WindowsTerminal/settings.json index 4bbe15f..6ae173b 100644 --- a/win/WindowsTerminal/settings.json +++ b/win/WindowsTerminal/settings.json @@ -36,6 +36,10 @@ "splitMode": "duplicate" }, "keys": "alt+shift+d" + }, + { + "command": null, + "keys": "ctrl+," } ], "copyFormatting": "none", diff --git a/win/setup/open-admin-cmd-explorer.reg b/win/setup/open-admin-cmd-explorer.reg new file mode 100644 index 0000000..90c7431 --- /dev/null +++ b/win/setup/open-admin-cmd-explorer.reg @@ -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\"" \ No newline at end of file diff --git a/win/win.ahk b/win/win.ahk index b8f9b23..9ad4697 100644 --- a/win/win.ahk +++ b/win/win.ahk @@ -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 +} \ No newline at end of file