aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/wsl
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-03-25 23:38:13 -0500
committerToby Vincent <tobyv13@gmail.com>2022-03-25 23:38:13 -0500
commite6051a38a672182c7f7dfa083ca1e72b97803c94 (patch)
tree734e251bab033169399432fe1c93fc879dfab578 /wsl
parentbb375ba979dfc0c575443f8309ee52d0fd446a26 (diff)
feat: migrated to gnu stow
Diffstat (limited to 'wsl')
-rwxr-xr-xwsl/.config/zsh/gpg.sh (renamed from wsl/gpg.sh)0
-rw-r--r--wsl/.config/zsh/wsl.sh (renamed from wsl/wsl.sh)0
-rwxr-xr-xwsl/.ssh/wsl2-ssh-pageant.exebin0 -> 3613696 bytes
-rwxr-xr-xwsl/install.sh68
-rwxr-xr-xwsl/install/winget.json28
-rw-r--r--wsl/install/wt.json389
6 files changed, 485 insertions, 0 deletions
diff --git a/wsl/gpg.sh b/wsl/.config/zsh/gpg.sh
index ac0bb4c..ac0bb4c 100755
--- a/wsl/gpg.sh
+++ b/wsl/.config/zsh/gpg.sh
diff --git a/wsl/wsl.sh b/wsl/.config/zsh/wsl.sh
index 80d93af..80d93af 100644
--- a/wsl/wsl.sh
+++ b/wsl/.config/zsh/wsl.sh
diff --git a/wsl/.ssh/wsl2-ssh-pageant.exe b/wsl/.ssh/wsl2-ssh-pageant.exe
new file mode 100755
index 0000000..7852088
--- /dev/null
+++ b/wsl/.ssh/wsl2-ssh-pageant.exe
Binary files differ
diff --git a/wsl/install.sh b/wsl/install.sh
new file mode 100755
index 0000000..be920ee
--- /dev/null
+++ b/wsl/install.sh
@@ -0,0 +1,68 @@
+#!/usr/bin/env bash
+
+cd "${BASEDIR:-${HOME}/.dotfiles}"
+
+WINHOME="$(wslpath c:\\Users\\${USER})"
+
+RESET='\033[0m'
+RED='\033[91m'
+GREEN='\033[92m'
+YELLOW='\033[93m'
+BLUE='\033[94m'
+MAGENTA='\033[95m'
+
+mkln="scripts/mkln.sh -f"
+
+function show-warning() {
+ gpgpath=$(wslpath -w "$(command -v gpg.exe)")
+ gitgpg=$(git.exe config --system --get gpg.program)
+ if [ "$gitgpg" = "$gpgpath" ]; then
+ return
+ fi
+ echo
+ echo -e "${BLUE}In order to use gpg with git for windows"
+ echo -e "${BLUE}(and still share gitconfigs), you need to run"
+ echo -e "${BLUE}the following command from an admin terminal:"
+ echo
+ echo "git.exe config --system gpg.program '$(wslpath -w "$(command -v gpg.exe)")'"
+ echo
+}
+
+echo -e "${BLUE}Setting up WSL"
+
+# link WINHOME
+ln -sfn $WINHOME ~/win
+
+# ssh-config
+sed -r 's|(RemoteForward\s+.+\s+)\/home\/tobyv\/\.gnupg\/S\.gpg-agent\.extra|\1127.0.0.1:4321|' ssh/config |
+ sed '/Control/d' >"${WINHOME}/.ssh/config"
+
+# Create windows symlinks to dotfiles
+$mkln $@ "gitconfig" "${WINHOME}/.gitconfig"
+$mkln $@ "gnupg/gpg.conf" "${WINHOME}/AppData/Roaming/gnupg/gpg.conf"
+$mkln $@ "alacritty" "${WINHOME}/AppData/Roaming/alacritty"
+$mkln $@ "gnupg/gpg-agent.conf" "${WINHOME}/AppData/Roaming/gnupg/gpg-agent.conf"
+$mkln $@ "gnupg/scdaemon.conf" "${WINHOME}/AppData/Roaming/gnupg/scdaemon.conf"
+$mkln $@ "wt.json" "${WINHOME}/AppData/Local/Packages/Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe/LocalState/settings.json"
+$mkln $@ "winget.json" "${WINHOME}/AppData/Local/Packages/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe/LocalState/settings.json"
+
+# install xclip/xsel
+curl -sL "https://raw.githubusercontent.com/Konfekt/win-bash-xclip-xsel/master/clip.sh" >"${HOME}/.local/bin/xclip"
+curl -sL "https://raw.githubusercontent.com/Konfekt/win-bash-xclip-xsel/master/clip.sh" >"${HOME}/.local/bin/xsel"
+chmod +x "${HOME}/.local/bin/xclip"
+chmod +x "${HOME}/.local/bin/xsel"
+
+# install hotkeys.exe
+install_dir="${WINHOME}/AppData/Local/Programs/hotkeys"
+mkdir -p "${install_dir}"
+rm -f "${install_dir}/hotkeys.exe"
+curl -sL "https://github.com/tobyvin/hotkeys/releases/latest/download/hotkeys.exe" >"${install_dir}/hotkeys.exe"
+
+# https://github.com/wslutilities/wslu
+if ! command -v wslview &>/dev/null; then
+ echo "wslu is not installed."
+ echo "wslu (wslview) is needed to open browser windows from linux commands."
+ echo "install instructions: https://github.com/wslutilities/wslu#installation"
+fi
+
+echo -e "${GREEN}WSL has been set up"
diff --git a/wsl/install/winget.json b/wsl/install/winget.json
new file mode 100755
index 0000000..b583c03
--- /dev/null
+++ b/wsl/install/winget.json
@@ -0,0 +1,28 @@
+{
+ "$schema": "https://aka.ms/winget-settings.schema.json",
+ "source": {
+ "autoUpdateIntervalInMinutes": 5
+ },
+ "visual": {
+ "progressBar": "accent"
+ },
+ "installBehavior": {
+ "preferences": {
+ "scope": "user",
+ "locale": [
+ "en-US"
+ ]
+ }
+ },
+ "network": {
+ "downloader": "do",
+ "doProgressTimeoutInSeconds": 60
+ },
+ "telemetry": {
+ "disable": true
+ },
+ "experimentalFeatures": {
+ "dependencies": true,
+ "directMSI": true
+ }
+} \ No newline at end of file
diff --git a/wsl/install/wt.json b/wsl/install/wt.json
new file mode 100644
index 0000000..ff53422
--- /dev/null
+++ b/wsl/install/wt.json
@@ -0,0 +1,389 @@
+{
+ "$help": "https://aka.ms/terminal-documentation",
+ "$schema": "https://aka.ms/terminal-profiles-schema",
+ "actions":
+ [
+ {
+ "command":
+ {
+ "action": "closeTab"
+ },
+ "keys": "ctrl+w"
+ },
+ {
+ "command":
+ {
+ "action": "openSettings",
+ "target": "settingsUI"
+ },
+ "keys": "ctrl+comma"
+ },
+ {
+ "command":
+ {
+ "action": "openSettings"
+ },
+ "keys": "ctrl+shift+comma"
+ },
+ {
+ "command": "paste",
+ "keys": "ctrl+v"
+ },
+ {
+ "command":
+ {
+ "action": "openSettings",
+ "target": "defaultsFile"
+ },
+ "keys": "ctrl+alt+comma"
+ },
+ {
+ "command":
+ {
+ "action": "newTab",
+ "profile": "btm"
+ },
+ "keys": "alt+`"
+ },
+ {
+ "command": "unbound",
+ "keys": "ctrl+f"
+ },
+ {
+ "command": "unbound",
+ "keys": "ctrl+t"
+ },
+ {
+ "command":
+ {
+ "action": "commandPalette"
+ },
+ "keys": "f1"
+ }
+ ],
+ "alwaysShowNotificationIcon": true,
+ "confirmCloseAllTabs": false,
+ "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
+ "disabledProfileSources":
+ [
+ "Windows.Terminal.Azure"
+ ],
+ "experimental.rendering.forceFullRepaint": true,
+ "initialCols": 100,
+ "initialRows": 30,
+ "multiLinePasteWarning": false,
+ "profiles":
+ {
+ "defaults":
+ {
+ "bellStyle":
+ [
+ "window",
+ "taskbar"
+ ],
+ "closeOnExit": "always",
+ "colorScheme": "vscode-dark",
+ "cursorColor": "#D4D4D4",
+ "cursorShape": "filledBox",
+ "font":
+ {
+ "face": "FiraCode NF",
+ "size": 11
+ },
+ "padding": "8",
+ "useAcrylic": true
+ },
+ "list":
+ [
+ {
+ "guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
+ "hidden": false,
+ "icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
+ "name": "Debian",
+ "source": "Windows.Terminal.Wsl"
+ },
+ {
+ "commandline": "ssh heimdall",
+ "guid": "{a66d99ed-52b1-4302-9aac-b1b95d81a051}",
+ "icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
+ "name": "Heimdall"
+ },
+ {
+ "commandline": "ssh loki",
+ "guid": "{1dd1a300-37b9-4aff-b7e3-8b029ca796a9}",
+ "icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
+ "name": "Loki"
+ },
+ {
+ "commandline": "C:\\Users\\tobyv\\.ssh\\wsl-ssh.bat door",
+ "guid": "{2d87a771-a5dd-44d5-b32d-ce8688b41f7c}",
+ "hidden": false,
+ "icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
+ "name": "Door"
+ },
+ {
+ "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
+ "hidden": false,
+ "name": "PowerShell",
+ "source": "Windows.Terminal.PowershellCore"
+ },
+ {
+ "commandline": "btm",
+ "guid": "{1a3bcafa-ff3b-46ba-bdf4-582e99ec9dfc}",
+ "hidden": false,
+ "name": "btm"
+ },
+ {
+ "guid": "{b154058b-47bb-56d5-a1b0-06d98908dfa2}",
+ "hidden": false,
+ "name": "Developer Command Prompt for VS 2019 (2)",
+ "source": "Windows.Terminal.VisualStudio"
+ },
+ {
+ "guid": "{f1a99e78-5690-5e40-b3ff-55031ae2cce5}",
+ "hidden": false,
+ "name": "Developer PowerShell for VS 2019 (2)",
+ "source": "Windows.Terminal.VisualStudio"
+ }
+ ]
+ },
+ "schemes":
+ [
+ {
+ "background": "#0C0C0C",
+ "black": "#0C0C0C",
+ "blue": "#0037DA",
+ "brightBlack": "#767676",
+ "brightBlue": "#3B78FF",
+ "brightCyan": "#61D6D6",
+ "brightGreen": "#16C60C",
+ "brightPurple": "#B4009E",
+ "brightRed": "#E74856",
+ "brightWhite": "#F2F2F2",
+ "brightYellow": "#F9F1A5",
+ "cursorColor": "#FFFFFF",
+ "cyan": "#3A96DD",
+ "foreground": "#CCCCCC",
+ "green": "#13A10E",
+ "name": "Campbell",
+ "purple": "#881798",
+ "red": "#C50F1F",
+ "selectionBackground": "#FFFFFF",
+ "white": "#CCCCCC",
+ "yellow": "#C19C00"
+ },
+ {
+ "background": "#012456",
+ "black": "#0C0C0C",
+ "blue": "#0037DA",
+ "brightBlack": "#767676",
+ "brightBlue": "#3B78FF",
+ "brightCyan": "#61D6D6",
+ "brightGreen": "#16C60C",
+ "brightPurple": "#B4009E",
+ "brightRed": "#E74856",
+ "brightWhite": "#F2F2F2",
+ "brightYellow": "#F9F1A5",
+ "cursorColor": "#FFFFFF",
+ "cyan": "#3A96DD",
+ "foreground": "#CCCCCC",
+ "green": "#13A10E",
+ "name": "Campbell Powershell",
+ "purple": "#881798",
+ "red": "#C50F1F",
+ "selectionBackground": "#FFFFFF",
+ "white": "#CCCCCC",
+ "yellow": "#C19C00"
+ },
+ {
+ "background": "#282C34",
+ "black": "#282C34",
+ "blue": "#61AFEF",
+ "brightBlack": "#5A6374",
+ "brightBlue": "#61AFEF",
+ "brightCyan": "#56B6C2",
+ "brightGreen": "#98C379",
+ "brightPurple": "#C678DD",
+ "brightRed": "#E06C75",
+ "brightWhite": "#DCDFE4",
+ "brightYellow": "#E5C07B",
+ "cursorColor": "#FFFFFF",
+ "cyan": "#56B6C2",
+ "foreground": "#DCDFE4",
+ "green": "#98C379",
+ "name": "One Half Dark",
+ "purple": "#C678DD",
+ "red": "#E06C75",
+ "selectionBackground": "#FFFFFF",
+ "white": "#DCDFE4",
+ "yellow": "#E5C07B"
+ },
+ {
+ "background": "#FAFAFA",
+ "black": "#383A42",
+ "blue": "#0184BC",
+ "brightBlack": "#4F525D",
+ "brightBlue": "#61AFEF",
+ "brightCyan": "#56B5C1",
+ "brightGreen": "#98C379",
+ "brightPurple": "#C577DD",
+ "brightRed": "#DF6C75",
+ "brightWhite": "#FFFFFF",
+ "brightYellow": "#E4C07A",
+ "cursorColor": "#4F525D",
+ "cyan": "#0997B3",
+ "foreground": "#383A42",
+ "green": "#50A14F",
+ "name": "One Half Light",
+ "purple": "#A626A4",
+ "red": "#E45649",
+ "selectionBackground": "#FFFFFF",
+ "white": "#FAFAFA",
+ "yellow": "#C18301"
+ },
+ {
+ "background": "#002B36",
+ "black": "#002B36",
+ "blue": "#268BD2",
+ "brightBlack": "#073642",
+ "brightBlue": "#839496",
+ "brightCyan": "#93A1A1",
+ "brightGreen": "#586E75",
+ "brightPurple": "#6C71C4",
+ "brightRed": "#CB4B16",
+ "brightWhite": "#FDF6E3",
+ "brightYellow": "#657B83",
+ "cursorColor": "#FFFFFF",
+ "cyan": "#2AA198",
+ "foreground": "#839496",
+ "green": "#859900",
+ "name": "Solarized Dark",
+ "purple": "#D33682",
+ "red": "#DC322F",
+ "selectionBackground": "#FFFFFF",
+ "white": "#EEE8D5",
+ "yellow": "#B58900"
+ },
+ {
+ "background": "#FDF6E3",
+ "black": "#002B36",
+ "blue": "#268BD2",
+ "brightBlack": "#073642",
+ "brightBlue": "#839496",
+ "brightCyan": "#93A1A1",
+ "brightGreen": "#586E75",
+ "brightPurple": "#6C71C4",
+ "brightRed": "#CB4B16",
+ "brightWhite": "#FDF6E3",
+ "brightYellow": "#657B83",
+ "cursorColor": "#002B36",
+ "cyan": "#2AA198",
+ "foreground": "#657B83",
+ "green": "#859900",
+ "name": "Solarized Light",
+ "purple": "#D33682",
+ "red": "#DC322F",
+ "selectionBackground": "#FFFFFF",
+ "white": "#EEE8D5",
+ "yellow": "#B58900"
+ },
+ {
+ "background": "#000000",
+ "black": "#000000",
+ "blue": "#3465A4",
+ "brightBlack": "#555753",
+ "brightBlue": "#729FCF",
+ "brightCyan": "#34E2E2",
+ "brightGreen": "#8AE234",
+ "brightPurple": "#AD7FA8",
+ "brightRed": "#EF2929",
+ "brightWhite": "#EEEEEC",
+ "brightYellow": "#FCE94F",
+ "cursorColor": "#FFFFFF",
+ "cyan": "#06989A",
+ "foreground": "#D3D7CF",
+ "green": "#4E9A06",
+ "name": "Tango Dark",
+ "purple": "#75507B",
+ "red": "#CC0000",
+ "selectionBackground": "#FFFFFF",
+ "white": "#D3D7CF",
+ "yellow": "#C4A000"
+ },
+ {
+ "background": "#FFFFFF",
+ "black": "#000000",
+ "blue": "#3465A4",
+ "brightBlack": "#555753",
+ "brightBlue": "#729FCF",
+ "brightCyan": "#34E2E2",
+ "brightGreen": "#8AE234",
+ "brightPurple": "#AD7FA8",
+ "brightRed": "#EF2929",
+ "brightWhite": "#EEEEEC",
+ "brightYellow": "#FCE94F",
+ "cursorColor": "#000000",
+ "cyan": "#06989A",
+ "foreground": "#555753",
+ "green": "#4E9A06",
+ "name": "Tango Light",
+ "purple": "#75507B",
+ "red": "#CC0000",
+ "selectionBackground": "#FFFFFF",
+ "white": "#D3D7CF",
+ "yellow": "#C4A000"
+ },
+ {
+ "background": "#000000",
+ "black": "#000000",
+ "blue": "#000080",
+ "brightBlack": "#808080",
+ "brightBlue": "#0000FF",
+ "brightCyan": "#00FFFF",
+ "brightGreen": "#00FF00",
+ "brightPurple": "#FF00FF",
+ "brightRed": "#FF0000",
+ "brightWhite": "#FFFFFF",
+ "brightYellow": "#FFFF00",
+ "cursorColor": "#FFFFFF",
+ "cyan": "#008080",
+ "foreground": "#C0C0C0",
+ "green": "#008000",
+ "name": "Vintage",
+ "purple": "#800080",
+ "red": "#800000",
+ "selectionBackground": "#FFFFFF",
+ "white": "#C0C0C0",
+ "yellow": "#808000"
+ },
+ {
+ "background": "#1E1E1E",
+ "black": "#000000",
+ "blue": "#2472C8",
+ "brightBlack": "#666666",
+ "brightBlue": "#3B8EEA",
+ "brightCyan": "#29B8DB",
+ "brightGreen": "#23D18B",
+ "brightPurple": "#D670D6",
+ "brightRed": "#F14C4C",
+ "brightWhite": "#E5E5E5",
+ "brightYellow": "#F5F543",
+ "cursorColor": "#FFFFFF",
+ "cyan": "#11A8CD",
+ "foreground": "#CCCCCC",
+ "green": "#0DBC79",
+ "name": "vscode-dark",
+ "purple": "#BC3FBC",
+ "red": "#CD3131",
+ "selectionBackground": "#FFFFFF",
+ "white": "#E5E5E5",
+ "yellow": "#E5E510"
+ }
+ ],
+ "startOnUserLogin": false,
+ "tabSwitcherMode": "mru",
+ "tabWidthMode": "equal",
+ "trimBlockSelection": true,
+ "useAcrylicInTabRow": true,
+ "windowingBehavior": "useExisting"
+} \ No newline at end of file