Windows terminal settings

This commit is contained in:
John Doty 2020-02-18 07:21:42 -08:00
parent 70026238c3
commit 2e5208be18
2 changed files with 73 additions and 2 deletions

View file

@ -8,6 +8,7 @@ ignore = {
"readme.md", "readme.md",
".git", ".git",
"vscode", "vscode",
"terminal",
".DS_Store", ".DS_Store",
} }
@ -21,7 +22,7 @@ def link_helper(source, dst):
other_src = os.readlink(dst) other_src = os.readlink(dst)
other_src = os.path.join(os.path.dirname(dst), other_src) other_src = os.path.join(os.path.dirname(dst), other_src)
other_src = os.path.abspath(other_src) other_src = os.path.abspath(other_src)
if other_src != source: if not os.path.samefile(other_src, source):
print(source) print(source)
print( print(
"WARNING: {} is symlink but not into " "WARNING: {} is symlink but not into "
@ -33,7 +34,8 @@ def link_helper(source, dst):
print("Linking: {} -> {}".format(source, dst)) print("Linking: {} -> {}".format(source, dst))
os.symlink(source, dst) os.symlink(source, dst)
# Set up the vast majority of the files here: most things in *this* directory
# go into the home directory directly. (Directly directory?)
home = os.path.expanduser("~") home = os.path.expanduser("~")
source_files = [file for file in os.listdir(os.getcwd()) if file not in ignore] source_files = [file for file in os.listdir(os.getcwd()) if file not in ignore]
for source in source_files: for source in source_files:
@ -66,3 +68,19 @@ else:
possible_vscode_roots possible_vscode_roots
) )
) )
# Also these dumb terminal settings go somewhere else yikes.
terminal_source = os.path.abspath("terminal")
terminal_root = os.path.join(os.getenv("LOCALAPPDATA"), "packages", "Microsoft.WindowsTerminal_8wekyb3d8bbwe", "LocalState")
if os.path.exists(terminal_root):
source_files = [file for file in os.listdir(terminal_source) if file not in ignore]
for source in source_files:
source = os.path.join(terminal_source, source)
dst = os.path.join(terminal_root, os.path.split(source)[1])
link_helper(source, dst)
else:
print(
"WARNING: No viable root for windows terminal config (tried {})".format(
terminal_root
)
)

53
terminal/profiles.json Normal file
View file

@ -0,0 +1,53 @@
// 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": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"profiles": {
"defaults": {
// Put settings here that you want to apply to all profiles
"colorScheme": "One Half Dark",
"fontFace": "Fira Code",
"fontSize": 11,
"useAcrylic": false
},
"list": [
{
// Make changes here to the cmd.exe profile
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "cmd",
"commandline": "cmd.exe",
"hidden": false
},
{
// Make changes here to the powershell.exe profile
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false
},
{
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"hidden": false,
"name": "Ubuntu",
"source": "Windows.Terminal.Wsl"
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
}
]
},
// Add custom color schemes to this array
"schemes": [],
// Add any keybinding overrides to this array.
// To unbind a default keybinding, set the command to "unbound"
"keybindings": []
}