Skip to content

Instantly share code, notes, and snippets.

@eRQee
Last active September 7, 2020 20:46
Show Gist options
  • Save eRQee/08e602e9d0f4bf70a23c70da994af23b to your computer and use it in GitHub Desktop.
Save eRQee/08e602e9d0f4bf70a23c70da994af23b to your computer and use it in GitHub Desktop.
eRQee's Quake Console for Windows Terminal
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;HOTKEY: Ctrl + Space [do] Pin Window (toggle Always on Top)
^Space::Winset, AlwaysOnTop, , A
;HOTKEY: Win + PageDown [do] Volume Down
#PgDn::SoundSet,-5
;HOTKEY: Win + PageUp [do] Volume Up
#PgUp::SoundSet,+5
;HOTKEY: Win + Shift + PageUp/PageDown [do] Volume Up
#+PgUp::
Gosub,ToggleMute
Return
#+PgDn::
Gosub,ToggleMute
Return
ToggleMute:
SoundSet,+1,,Mute ; toggle the mute setting
Return
;HOTKEY: Win + N [do] Open Notepad
#n::
Run, "C:\Program Files\Notepad2\Notepad2.exe"
Return
;HOTKEY: Win + E [do] Override Windows Explorer (File Manager) with CFi Explorer
#e::
Run, "C:\Program Files\CFi\ShellToys\CFiExplorer.exe"
Return
;HOTKEY: Win + C [do] Open Calculator (SpeedCrunch)
#c::
Run, "C:\Program Files (x86)\SpeedCrunch\speedcrunch.exe"
Return
;HOTKEY: Win + Shift + H [do] edit /etc/hosts Run As Administrator
#+h::
HostsFile = %A_WinDir%\System32\drivers\etc\hosts
Notepad = %A_WinDir%\Notepad.exe
Run *RunAs "%Notepad%" "%HostsFile%"
Return
;HOTKEY: Win + F8 [do] Launch Google Keep
#F8::
param=--profile-directory=Default --app-id=hcfcmgpnmpinpidjdgejehjchlbglpde
Run "C:\Program Files\Google\Chrome\Application\chrome_proxy.exe" %param%""
return
;HOTKEY: Win + H [do] Toggle Show Hidden Files
!#h::
RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden
If HiddenFiles_Status = 2
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1
Else
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2
send {F5}
Return
;HOTKEY: Alt + F1 [do] Open/Raise Windows Terminal in Quake Style
!F1::
terminal := WinExist("ahk_exe WindowsTerminal.exe")
if (terminal)
{
active := WinActive("ahk_id " terminal)
if (active)
WinMinimize, ahk_id %active%
else
WinActivate, ahk_id %terminal%
}
else
Run, wt.exe
Return
;HOTKEY: ScrollLock [do] Suspend AutoHotKey
ScrollLock::Suspend ; Win + scrollLock
return
// This file was initially generated by Windows Terminal 1.2.2381.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
// Launch Settings
"launchMode": "default",
"initialCols": 199,
"initialRows": 25,
"initialPosition": "-6,0", // x,y
"copyOnSelect":false,
"copyFormatting": false,
// A profile specifies a command to execute paired with information about how it should look and feel.
// Each one of them will appear in the 'New Tab' dropdown,
// and can be invoked from the commandline with `wt.exe -p xxx`
// To learn more about profiles, visit https://aka.ms/terminal-profile-settings
"profiles":
{
"defaults":
{
// Put settings here that you want to apply to all profiles.
"historySize": 99999,
"useAcrylic": false,
"acrylicOpacity":0.5,
"backgroundImageOpacity":0.2,
"fontSize": 10,
"fontFace":"Ubuntu Mono"
},
"list":
[
{
"guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
"hidden": false,
"name": "Ubuntu-20.04",
"source": "Windows.Terminal.Wsl",
"backgroundImage":"C:\\Cloud\\OneDrive\\Configurations\\Security-Override.jpg"
},
{
// Make changes here to the powershell.exe profile.
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false,
"backgroundImage":"C:\\Cloud\\OneDrive\\Configurations\\PowerShell.jpg",
"colorScheme": "Campbell"
},
{
// Make changes here to the cmd.exe profile.
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "Command Prompt",
"commandline": "cmd.exe",
"hidden": false,
"backgroundImage":"C:\\Cloud\\OneDrive\\Configurations\\Windows-Terminal.jpg",
"colorScheme": "Solarized Dark"
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": true,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
}
]
},
// Add custom color schemes to this array.
// To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
"schemes": [],
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
// These two lines additionally bind them to Ctrl+C and Ctrl+V.
// To learn more about selection, visit https://aka.ms/terminal-selection
{ "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
{ "command": "paste", "keys": "ctrl+v" },
// Press Ctrl+Shift+F to open the search box
{ "command": "find", "keys": "ctrl+f" },
// Pane Management
{ "command": { "action": "splitPane", "split": "vertical", "splitMode": "duplicate" }, "keys": "ctrl+shift+\\" },
{ "command": { "action": "splitPane", "split": "horizontal", "splitMode": "duplicate" }, "keys": "ctrl+shift+-" },
{ "command": "closePane", "keys": "ctrl+shift+;" },
// Tab Management
{"command":"newTab", "keys": "ctrl+t"},
{"command":"closeTab", "keys": "ctrl+shift+alt+t"}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment