From 6a5209a701eb9198d48958b34a74a695a38e40ad Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Thu, 24 Jun 2021 11:14:14 +0800 Subject: [PATCH 1/3] [misc] disable C-, call out settings pane --- win/WindowsTerminal/settings.json | 4 ++++ 1 file changed, 4 insertions(+) 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", From 6a7d715038c6a16541a46b4d776057bcb3f33e64 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Thu, 24 Jun 2021 11:16:10 +0800 Subject: [PATCH 2/3] [feature] read clipboard --- win/win.ahk | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 From 2b62e0ffcd7aa19767a1e0d39d2d0fc7f16e678c Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Thu, 24 Jun 2021 11:16:22 +0800 Subject: [PATCH 3/3] [feature] open admin cmd in explorer --- win/setup/open-admin-cmd-explorer.reg | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 win/setup/open-admin-cmd-explorer.reg 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