Last active
April 22, 2024 20:19
-
-
Save gitfool/3aa0467597e9f49e11a7549e9ac4c4b8 to your computer and use it in GitHub Desktop.
dotfiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export HISTCONTROL='ignorespace:ignoredups' | |
export HISTIGNORE='bg:fg:clear:exit:h:history:l:l[ls]:pwd' | |
export HISTSIZE=10000 | |
export AWS_PAGER= | |
export EDITOR=vi | |
export KUBECONFIG=$(find ~/.kube -maxdepth 1 -type f 2>/dev/null | grep -E 'config[^.]*$' | xargs -I{} -r echo -n ':{}') | |
export PATH=$HOME/.dotnet/tools:$PATH | |
alias h='history' | |
alias l='ls -aF' | |
alias ll='ls -ahlF' | |
alias ls='ls --color=auto --group-directories-first' | |
alias cake='_cake() { local args="$@"; bash -c "dotnet tool restore && dotnet cake --verbosity=verbose $args"; }; _cake' | |
alias cake-docker='_cake() { local args="$@"; docker run -it --rm --user user -w /build -v "$(pwd):/build" -v /var/run/docker.sock:/var/run/docker.sock -v /home/sean/.nuget:/home/user/.nuget -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION dockfool/cake-docker bash -c "dotnet tool restore && dotnet cake --verbosity=verbose $args"; }; _cake' | |
eval "$(starship init bash)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZSH="/home/sean/.oh-my-zsh" | |
ZSH_THEME="" | |
COMPLETION_WAITING_DOTS="true" | |
plugins=( | |
aws | |
docker | |
dotnet | |
# git | |
# kube-ps1 | |
kubectl | |
zsh-autosuggestions | |
zsh-syntax-highlighting | |
history-substring-search | |
) | |
source $ZSH/oh-my-zsh.sh | |
HISTORY_IGNORE='(bg|fg|clear|exit|h|history|l|l[als]|pwd)' | |
HISTSIZE=10000 | |
export AWS_PAGER= | |
export EDITOR=vi | |
export KUBECONFIG=$(find ~/.kube -maxdepth 1 -type f 2>/dev/null | grep -E 'config[^.]*$' | xargs -I{} -r echo -n ':{}') | |
export PATH=$HOME/.dotnet/tools:$PATH | |
alias h='history' | |
alias l='ls -aF' | |
alias ll='ls -ahlF' | |
alias ls='ls --color=auto --group-directories-first' | |
alias cake='_cake() { local args="$@"; bash -c "dotnet tool restore && dotnet cake --verbosity=verbose $args"; }; _cake' | |
alias cake-docker='_cake() { local args="$@"; docker run -it --rm --user user -w /build -v "$(pwd):/build" -v /var/run/docker.sock:/var/run/docker.sock -v /home/sean/.nuget:/home/user/.nuget -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION dockfool/cake-docker bash -c "dotnet tool restore && dotnet cake --verbosity=verbose $args"; }; _cake' | |
setopt SH_WORD_SPLIT | |
eval "$(starship init zsh)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | |
if (Test-Path($ChocolateyProfile)) | |
{ | |
Import-Module "$ChocolateyProfile" | |
} | |
function Cake-Build | |
{ | |
dotnet tool restore && dotnet cake --verbosity=verbose $args | |
} | |
function Git-Clean | |
{ | |
git clean -ffxd | |
} | |
function Which-Command ($command) | |
{ | |
Get-Command -Name $command -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue | |
} | |
$env:KUBECONFIG=$(Get-ChildItem ~/.kube | Where-Object { !$_.PSIsContainer -and $_.Name -match 'config[^.]*$' } | Join-String -Separator ';') | |
New-Alias cake Cake-Build | |
New-Alias clean Git-Clean | |
New-Alias grep 'C:\Program Files\Git\usr\bin\grep.exe' | |
New-Alias less 'C:\Program Files\Git\usr\bin\less.exe' | |
New-Alias l ls | |
New-Alias ll ls | |
New-Alias which Which-Command | |
Set-PSReadLineKeyHandler -Key End -Function AcceptSuggestion | |
Set-PSReadLineKeyHandler -Key Ctrl+u -Function BackwardKillLine | |
Set-PSReadLineKeyHandler -Key Ctrl+w -Function BackwardKillWord | |
Set-PSReadLineKeyHandler -Key Tab -Function Complete | |
Set-PSReadLineKeyHandler -Key Ctrl+d -Function DeleteCharOrExit | |
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward | |
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward | |
Set-PSReadLineKeyHandler -Key Ctrl+k -Function KillLine | |
Set-PSReadLineKeyHandler -Key Alt+d -Function KillWord | |
Set-PSReadLineOption -HistorySearchCursorMovesToEnd | |
Set-PSReadLineOption -PredictionSource History | |
Invoke-Expression (&starship init powershell) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://starship.rs/config | |
format = "$all" | |
add_newline = true | |
[aws] | |
# format = "on [$symbol($profile )(\($region\) )(\[$duration\])]($style)" | |
symbol = " " | |
disabled = true | |
[character] | |
# format = "$symbol " | |
success_symbol = "[❯](bold green)" | |
# error_symbol = "[✗](bold red)" | |
[directory] | |
# format = "[$path]($style)[$read_only]($read_only_style) " | |
style = "bold blue" | |
read_only = "" | |
read_only_style = "dimmed red" | |
truncation_length = 4 | |
truncation_symbol = "… " | |
truncate_to_repo = true | |
[dotnet] | |
# format = "via [$symbol($version )(🎯 $tfm )]($style)" | |
# symbol = " " | |
symbol = "dotnet " | |
style = "blue" | |
heuristic = true | |
[git_branch] | |
# format = "on [$symbol$branch]($style) " | |
symbol = " " | |
[git_status] | |
# format = "([\[$all_status$ahead_behind\]]($style) )" | |
style = "bold purple" | |
ahead = "⇡${count}" | |
behind = "⇣${count}" | |
diverged = "⇡${ahead_count}⇣${behind_count}" | |
[helm] | |
# format = "via [$symbol($version )]($style)" | |
symbol = "⎈ " | |
[java] | |
# format = "via [${symbol}(${version} )]($style)" | |
style = "dimmed purple" | |
[jobs] | |
# format = "[$symbol$number]($style) " | |
threshold = 1 | |
[kubernetes] | |
# format = "[$symbol$context( \($namespace\))]($style) in " | |
symbol = "⎈ " | |
[line_break] | |
disabled = false | |
[nodejs] | |
# format = "via [$symbol($version )]($style)" | |
style = "dimmed green" | |
[package] | |
# format = "is [$symbol$version]($style) " | |
style = "dimmed white" | |
[rust] | |
# format = "via [$symbol($version )]($style)" | |
style = "dimmed red" |
Using Scoop instead of Chocolatey (comparison)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
- Install aria2
scoop install aria2
# scoop config aria2-enabled false
# scoop config aria2-warning-enabled false
scoop install gsudo
sudo status
- Install FiraCode Nerd Font
scoop bucket add nerd-fonts
scoop install nerd-fonts/FiraCode-NF
- Update scoop and apps
scoop status
scoop update && scoop update --all && scoop cleanup --all
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Windows Prerequisites
Download patched Fira Code v3.2.1, extract and install all the TrueType fonts, matching name
FiraCodeNerdFont-*.ttf
, for all users. CurrentlyBold
,Light
,Medium
,Regular
,Retina
andSemiBold
variants.