Skip to content

Instantly share code, notes, and snippets.

@rocammo
Created April 25, 2020 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rocammo/a39b2f3451d675f87de255ee22d0f06a to your computer and use it in GitHub Desktop.
Save rocammo/a39b2f3451d675f87de255ee22d0f06a to your computer and use it in GitHub Desktop.
Horizon's color scheme for the Windows Terminal (WSL)
"schemes": [
{
"name" : "Horizon",
"background" : "#1C1E26",
"black" : "#16161C",
"blue" : "#26BBD9",
"cyan" : "#59E1E3",
"foreground" : "#D5D8DA",
"green" : "#29D398",
"purple" : "#EE64AC",
"red" : "#E95678",
"white" : "#FDF0ED",
"yellow" : "#FAB795",
"brightBlack" : "#1A1C23",
"brightBlue" : "#3FC4DE",
"brightCyan" : "#6BE4E6",
"brightGreen" : "#3FDAA4",
"brightPurple" : "#F075B5",
"brightRed" : "#EC6A88",
"brightWhite" : "#FFFFFF",
"brightYellow" : "#FBC3A7"
}
]
@rocammo
Copy link
Author

rocammo commented Nov 21, 2020

PowerShell Core

profile.ps1

Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox

.gitconfig

[user]
    email = rodrigo.casamayor@gmail.com
    name = Rodrigo Casamayor
    signingkey = F211E606E3D70F92

[gpg]
    program = C:/Program Files (x86)/gnupg/bin/gpg.exe

[commit]
    gpgsign = true

[color]
    branch = auto
    diff = auto
    status = auto
[color "branch"]
    current = yellow reverse
    local = yellow
    remote = green
[color "diff"]
    meta = yellow bold
    frag = magenta bold
    old = red bold
    new = green bold
[color "status"]
    added = yellow
    changed = green
    untracked = cyan

WSL

.bashrc

case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]$(__git_ps1) \$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W$(__git_ps1) \$ '
fi

export DOTFILES_PATH=$HOME/.dotfiles
source $DOTFILES_PATH/bash/init.sh

.inputrc

set bell-style none
set completion-ignore-case on

.gitconfig

[user]
    email = rodrigo.casamayor@gmail.com
    name = Rodrigo Casamayor
    signingkey = F211E606E3D70F92

[commit]
    gpgsign = true

[color]
    branch = auto
    diff = auto
    status = auto
[color "branch"]
    current = yellow reverse
    local = yellow
    remote = green
[color "diff"]
    meta = yellow bold
    frag = magenta bold
    old = red bold
    new = green bold
[color "status"]
    added = yellow
    changed = green
    untracked = cyan

Dotfiles

init.sh

# Enable aliases to be sudo’ed
alias sudo='sudo '

# Load configuration
for rc in $DOTFILES_PATH/bash/shell/*.sh; do
    source $rc
done
unset rc

shell/aliases.sh

alias ..="cd .."
alias ...="cd ../.."
alias ll="exa -l --header --git"
alias la="exa -la"
alias tt="exa --tree --level=2 --long"
alias cdc='cd ~/Code'


alias gss="git status -sb"
alias gaa="git add -A"
alias grs="git reset HEAD --"
alias gac="git add --all && git commit --amend --no-edit"
alias gct="git commit"

alias gdf="git diff"
alias glg="git log"
alias gtg="tig --all"

alias gco="git checkout"
alias gbl="git branch"
alias gfp="git fetch --all -p"

alias gps="git push"
alias gpl="git pull --rebase --autostash"

shell/exports.sh

export GPG_TTY=$(tty)

# Golang
export GOPATH=$HOME/.go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

shell/functions.sh

# Optimize shell startup with nvm lazy loading

nvm() {
    unset -f nvm
    export NVM_DIR=~/.nvm
    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
    nvm "$@"
}

node() {
    unset -f node
    export NVM_DIR=~/.nvm
    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
    node "$@"
}

npm() {
    unset -f npm
    export NVM_DIR=~/.nvm
    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
    npm "$@"
}

Windows Terminal

settings.json

// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
// Also, see: https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md
{
    // To learn more about global settings, visit https://aka.ms/terminal-global-settings
    "$schema": "https://aka.ms/terminal-profiles-schema",

    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "theme": "dark",

    "copyOnSelect": false,
    "copyFormatting": false,

    "profiles":
    {
        // To learn more about profiles, visit https://aka.ms/terminal-profile-settings
        "defaults":
        {
            // Put settings here that you want to apply to all profiles.
            "colorScheme": "Horizon",
            "scrollbarState": "hidden",
            "cursorColor": "#7f8c8d",
            "cursorShape": "filledBox",
            "fontSize": 15
        },
        "list":
        [
            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "name": "PowerShell",
                "commandline": "pwsh.exe -nologo",
                "hidden": false,
                "tabTitle": "PowerShell",
                "suppressApplicationTitle": true,
                "fontFace": "Cascadia Mono PL"
            },
            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "name": "Linux",
                "source": "Windows.Terminal.Wsl",
                "hidden": false,
                "startingDirectory" : "//wsl$/Ubuntu/home/rocammo",
                "fontFace": "Consolas"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure",
                "hidden": false
            },
            {
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "Command Prompt",
                "commandline": "cmd.exe",
                "hidden": false
            },
            {
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            }
        ]
    },

    // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
    "schemes": [
        {
            "name" : "Horizon",
            "background" : "#1C1E26",
            "black" : "#21222C",
            "blue" : "#26BBD9",
            "cyan" : "#59E1E3",
            "foreground" : "#D5D8DA",
            "green" : "#29D398",
            "purple" : "#EE64AC",
            "red" : "#E95678",
            "white" : "#FDF0ED",
            "yellow" : "#FAB795",
            "brightBlack" : "#6272A4",
            "brightBlue" : "#3FC4DE",
            "brightCyan" : "#6BE4E6",
            "brightGreen" : "#3FDAA4",
            "brightPurple" : "#F075B5",
            "brightRed" : "#EC6A88",
            "brightWhite" : "#FFFFFF",
            "brightYellow" : "#FBC3A7"
        }
    ],

    // To unbind a key combination from your defaults.json, set the command to "unbound".
    // To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings
    "actions":
    [
        // To learn more about selection, visit https://aka.ms/terminal-selection
        { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
        { "command": "paste", "keys": "ctrl+v" },
        { "command": "find", "keys": "ctrl+shift+f" },

        // To learn more about panes, visit https://aka.ms/terminal-panes
        { "command": { "action": "splitPane", "split": "vertical", "splitMode": "duplicate" }, "keys": "alt+d" },
        { "command": { "action": "splitPane", "split": "horizontal", "splitMode": "duplicate" }, "keys": "alt+shift+d" },
        { "command": "closePane", "keys": "alt+w" }
    ]
}

@rocammo
Copy link
Author

rocammo commented Nov 22, 2020

Looking for Cascadia Code patched font?

Take a look at CascadiaCode Nerd Font.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment