mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
Do more migration work
This commit is contained in:
parent
0e96760c77
commit
62bc6ab923
14 changed files with 10 additions and 18 deletions
3
legacy/link/gemrc
Normal file
3
legacy/link/gemrc
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
gem: --no-ri --no-rdoc
|
||||
|
||||
1
legacy/link/linux/tmux.conf
Normal file
1
legacy/link/linux/tmux.conf
Normal file
|
|
@ -0,0 +1 @@
|
|||
source "/usr/share/powerline/bindings/tmux/powerline.conf"
|
||||
2
legacy/link/linux/vimrc_os_specific
Normal file
2
legacy/link/linux/vimrc_os_specific
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
" enable powerline
|
||||
set rtp+='/usr/share/vim/addons/plugin/powerline.vim'
|
||||
17
legacy/link/mac/profile
Normal file
17
legacy/link/mac/profile
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
alias ll='ls -G -l'
|
||||
alias ls='ls -G'
|
||||
|
||||
export EDITOR='vim'
|
||||
|
||||
export PATH=$PATH:~/.nexustools
|
||||
export PATH=$PATH:/Applications/Araxis\ Merge.app/Contents/Utilities
|
||||
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
|
||||
|
||||
#export PS1='\u:☕️ \W \$ '
|
||||
if [ -f $(brew --prefix)/etc/bash_completion ]; then
|
||||
source $(brew --prefix)/etc/bash_completion
|
||||
source $(brew --prefix)/etc/bash_completion.d/git-completion.bash
|
||||
source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh
|
||||
fi
|
||||
export GIT_PS1_SHOWDIRTYSTATE=true
|
||||
export PS1='\h:\W \$$(__git_ps1) '
|
||||
8
legacy/link/mac/tmux.conf
Normal file
8
legacy/link/mac/tmux.conf
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
source "/usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"
|
||||
|
||||
# Make mouse useful in copy mode
|
||||
set -g mouse on
|
||||
|
||||
# Scroll History
|
||||
set -g history-limit 30000
|
||||
|
||||
62
legacy/link/nix/config/powershell/PoshThemes/beantest.psm1
Normal file
62
legacy/link/nix/config/powershell/PoshThemes/beantest.psm1
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
#requires -Version 2 -Modules posh-git
|
||||
|
||||
function Write-Theme {
|
||||
param(
|
||||
[bool]
|
||||
$lastCommandFailed,
|
||||
[string]
|
||||
$with
|
||||
)
|
||||
|
||||
$prompt = Write-Prompt -Object "$($sl.PromptSymbols.StartSymbol) " -ForegroundColor $sl.Colors.PromptForegroundColor
|
||||
|
||||
If (!$env:_ -contains 'pwsh') {
|
||||
$prompt += ' '
|
||||
}
|
||||
|
||||
#check the last command state and indicate if failed
|
||||
If ($lastCommandFailed) {
|
||||
$prompt += Write-Prompt -Object "$($sl.PromptSymbols.FailedCommandSymbol) " -ForegroundColor $sl.Colors.CommandFailedIconForegroundColor
|
||||
}
|
||||
|
||||
#check for elevated prompt
|
||||
If (Test-Administrator) {
|
||||
$prompt += Write-Prompt -Object "$($sl.PromptSymbols.ElevatedSymbol) " -ForegroundColor $sl.Colors.AdminIconForegroundColor
|
||||
}
|
||||
|
||||
$computer = [System.Environment]::MachineName
|
||||
$path = Get-FullPath -dir $pwd
|
||||
$prompt += Write-Prompt -Object "$computer" -ForegroundColor $sl.Colors.SessionInfoForegroundColor
|
||||
$prompt += Write-Prompt -Object ": " -ForegroundColor $sl.Colors.SessionInfoForegroundColor
|
||||
|
||||
# Writes the drive portion
|
||||
$prompt += Write-Prompt -Object "$path "
|
||||
|
||||
$status = Get-VCSStatus
|
||||
if ($status) {
|
||||
$themeInfo = Get-VcsInfo -status ($status)
|
||||
$prompt += Write-Prompt -Object " $($themeInfo.VcInfo) " -ForegroundColor $sl.Colors.GitForegroundColor
|
||||
}
|
||||
|
||||
$prompt += Set-Newline
|
||||
|
||||
if ($with) {
|
||||
$prompt += Write-Prompt -Object "$($with.ToUpper()) " -BackgroundColor $sl.Colors.WithBackgroundColor -ForegroundColor $sl.Colors.WithForegroundColor
|
||||
}
|
||||
$prompt += Write-Prompt -Object ($sl.PromptSymbols.PromptIndicator) -ForegroundColor $sl.Colors.PromptBackgroundColor
|
||||
$prompt += ' '
|
||||
$prompt
|
||||
}
|
||||
|
||||
$sl = $global:ThemeSettings #local settings
|
||||
$sl.PromptSymbols.StartSymbol = '☕️'
|
||||
$sl.PromptSymbols.PromptIndicator = [char]::ConvertFromUtf32(0x276F)
|
||||
$sl.PromptSymbols.SegmentForwardSymbol = [char]::ConvertFromUtf32(0xE0B0)
|
||||
$sl.Colors.PromptForegroundColor = [ConsoleColor]::White
|
||||
$sl.Colors.PromptSymbolColor = [ConsoleColor]::White
|
||||
$sl.Colors.PromptHighlightColor = [ConsoleColor]::DarkBlue
|
||||
$sl.Colors.GitForegroundColor = [ConsoleColor]::DarkBlue
|
||||
$sl.Colors.WithForegroundColor = [ConsoleColor]::DarkRed
|
||||
$sl.Colors.WithBackgroundColor = [ConsoleColor]::Magenta
|
||||
$sl.Colors.VirtualEnvBackgroundColor = [System.ConsoleColor]::Red
|
||||
$sl.Colors.VirtualEnvForegroundColor = [System.ConsoleColor]::White
|
||||
234
legacy/link/nix/oh-my-posh.omp.json
Normal file
234
legacy/link/nix/oh-my-posh.omp.json
Normal file
|
|
@ -0,0 +1,234 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
||||
"blocks": [
|
||||
{
|
||||
"alignment": "left",
|
||||
"segments": [
|
||||
{
|
||||
"background": "#c386f1",
|
||||
"foreground": "#ffffff",
|
||||
"leading_diamond": "",
|
||||
"properties": {
|
||||
"display_host": false,
|
||||
"postfix": " "
|
||||
},
|
||||
"style": "diamond",
|
||||
"trailing_diamond": "",
|
||||
"type": "session"
|
||||
},
|
||||
{
|
||||
"background": "#ff479c",
|
||||
"foreground": "#ffffff",
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"folder_separator_icon": " ",
|
||||
"home_icon": "~",
|
||||
"prefix": " ",
|
||||
"style": "folder"
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"background": "#fffb38",
|
||||
"foreground": "#193549",
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"ahead_and_behind_color": "#f26d50",
|
||||
"ahead_color": "#89d1dc",
|
||||
"behind_color": "#f17c37",
|
||||
"display_stash_count": true,
|
||||
"display_upstream_icon": true,
|
||||
"local_changes_color": "#ff9248",
|
||||
"stash_count_icon": " ",
|
||||
"status_colors_enabled": true
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "git"
|
||||
},
|
||||
{
|
||||
"background": "#6CA35E",
|
||||
"foreground": "#ffffff",
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"display_version": true,
|
||||
"prefix": " "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "node"
|
||||
},
|
||||
{
|
||||
"background": "#8ED1F7",
|
||||
"foreground": "#111111",
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"display_version": true,
|
||||
"prefix": " "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "go"
|
||||
},
|
||||
{
|
||||
"background": "#4063D8",
|
||||
"foreground": "#111111",
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"display_version": true,
|
||||
"prefix": " "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "julia"
|
||||
},
|
||||
{
|
||||
"background": "#FFDE57",
|
||||
"foreground": "#111111",
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"display_mode": "files",
|
||||
"display_version": true,
|
||||
"display_virtual_env": false,
|
||||
"prefix": " "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "python"
|
||||
},
|
||||
{
|
||||
"background": "#AE1401",
|
||||
"foreground": "#ffffff",
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"display_mode": "files",
|
||||
"display_version": true,
|
||||
"prefix": " "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "ruby"
|
||||
},
|
||||
{
|
||||
"background": "#FEAC19",
|
||||
"foreground": "#ffffff",
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"display_mode": "files",
|
||||
"display_version": false,
|
||||
"prefix": " "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "azfunc"
|
||||
},
|
||||
{
|
||||
"background_templates": [
|
||||
"{{if contains \"default\" .Profile}}#FFA400{{end}}",
|
||||
"{{if contains \"jan\" .Profile}}#f1184c{{end}}"
|
||||
],
|
||||
"foreground": "#ffffff",
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"display_default": false,
|
||||
"prefix": " "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "aws"
|
||||
},
|
||||
{
|
||||
"background": "#ffff66",
|
||||
"foreground": "#111111",
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"root_icon": ""
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "root"
|
||||
},
|
||||
{
|
||||
"background": "#83769c",
|
||||
"foreground": "#ffffff",
|
||||
"leading_diamond": "",
|
||||
"properties": {
|
||||
"always_enabled": true,
|
||||
"prefix": "<transparent></> 羽"
|
||||
},
|
||||
"style": "plain",
|
||||
"trailing_diamond": "",
|
||||
"type": "executiontime"
|
||||
},
|
||||
{
|
||||
"background": "#2e9599",
|
||||
"foreground": "#ffffff",
|
||||
"leading_diamond": "",
|
||||
"properties": {
|
||||
"always_enabled": true,
|
||||
"color_background": true,
|
||||
"display_exit_code": false,
|
||||
"error_color": "#f1184c",
|
||||
"prefix": "<#83769c></> "
|
||||
},
|
||||
"style": "diamond",
|
||||
"trailing_diamond": "",
|
||||
"type": "exit"
|
||||
}
|
||||
],
|
||||
"type": "prompt"
|
||||
},
|
||||
{
|
||||
"segments": [
|
||||
{
|
||||
"background": "#0077c2",
|
||||
"foreground": "#ffffff",
|
||||
"properties": {
|
||||
"postfix": " <transparent,#0077c2></>",
|
||||
"prefix": "<#0077c2,transparent></> "
|
||||
},
|
||||
"style": "plain",
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"background": "#1BD760",
|
||||
"foreground": "#111111",
|
||||
"invert_powerline": true,
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"paused_icon": " ",
|
||||
"playing_icon": " ",
|
||||
"prefix": " "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "ytm"
|
||||
},
|
||||
{
|
||||
"background": "#f36943",
|
||||
"foreground": "#ffffff",
|
||||
"invert_powerline": true,
|
||||
"powerline_symbol": "",
|
||||
"properties": {
|
||||
"battery_icon": "",
|
||||
"charged_color": "#4caf50",
|
||||
"charged_icon": " ",
|
||||
"charging_color": "#40c4ff",
|
||||
"charging_icon": " ",
|
||||
"color_background": true,
|
||||
"discharging_color": "#ff5722",
|
||||
"discharging_icon": " ",
|
||||
"postfix": " "
|
||||
},
|
||||
"style": "powerline",
|
||||
"type": "battery"
|
||||
},
|
||||
{
|
||||
"background": "#2e9599",
|
||||
"foreground": "#111111",
|
||||
"invert_powerline": true,
|
||||
"leading_diamond": "",
|
||||
"style": "diamond",
|
||||
"trailing_diamond": "",
|
||||
"type": "time"
|
||||
}
|
||||
],
|
||||
"type": "rprompt"
|
||||
}
|
||||
],
|
||||
"console_title": true,
|
||||
"console_title_style": "template",
|
||||
"console_title_template": "{{ .Shell }} in {{ .Folder }}",
|
||||
"final_space": true
|
||||
}
|
||||
80
legacy/link/nix/vimrc
Normal file
80
legacy/link/nix/vimrc
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
set nocompatible " be iMproved, required
|
||||
filetype off " required by Vundle. filetype is reenabled after Vundle starts
|
||||
|
||||
" set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
|
||||
" let Vundle manage Vundle, required for Vundle to work right
|
||||
Plugin 'VundleVim/Vundle.vim'
|
||||
|
||||
Plugin 'ekalinin/Dockerfile.vim' " provides syntax highlighting for Dockerfiles
|
||||
Plugin 'elzr/vim-json' " provides syntax highlighting for JSON files
|
||||
Plugin 'garbas/vim-snipmate' " provides code snippets
|
||||
Plugin 'godlygeek/tabular' " provides a method for lining things up
|
||||
Plugin 'honza/vim-snippets' " provides snippets for use with vim-snipmate
|
||||
Plugin 'LnL7/vim-nix' " support for writing Nix expressions in vim
|
||||
Plugin 'MarcWeber/vim-addon-mw-utils' " a utility used by vim-snipmate
|
||||
Plugin 'mrk21/yaml-vim' " provides indentation and syntax highlighting for yaml
|
||||
Plugin 'rbong/vim-flog' " git branch viewer built on fugitive
|
||||
Plugin 'rodjek/vim-puppet' " provides several niceties for working with Puppet
|
||||
Plugin 'tomtom/tlib_vim' " a utility used by vim-snipmate
|
||||
Plugin 'tpope/vim-fugitive' " all things Git here in Vim
|
||||
Plugin 'vim-airline/vim-airline' " status line alternative to powerline
|
||||
Plugin 'vim-airline/vim-airline-themes' " themes for vim-airline
|
||||
Plugin 'vim-ruby/vim-ruby' " provides syntax highlighting for ruby files
|
||||
Plugin 'vim-syntastic/syntastic' " provides syntax checking
|
||||
|
||||
" All of your Plugins must be added before the following line
|
||||
call vundle#end()
|
||||
filetype plugin indent on " required for plugins to be able to adjust indent
|
||||
|
||||
" Brief help
|
||||
" :PluginList - lists configured plugins
|
||||
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
|
||||
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
|
||||
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
|
||||
"
|
||||
" see :h vundle for more details or wiki for FAQ
|
||||
" Put your non-Plugin stuff after this line
|
||||
syntax on " enable syntax highlighting
|
||||
|
||||
set encoding=utf-8
|
||||
set termencoding=utf-8
|
||||
set t_Co=256 " tell vim we have 256 colors to work with
|
||||
|
||||
set autoindent " automatically indent new lines
|
||||
set background=dark " tell vim your terminal has a dark background
|
||||
set backspace=2 " make backspace work like most other programs
|
||||
set expandtab " converts tabs to spaces
|
||||
set fillchars+=stl:\ ,stlnc:\ " fix added per powerline troubleshooting docs
|
||||
set laststatus=2 " Always display the status line in all windows
|
||||
set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the status line)
|
||||
set smarttab " helps with expanding tabs to spaces (I think)
|
||||
set statusline+=%{FugitiveStatusline()} " get git info via fugitive plugin
|
||||
set statusline+=%#warningmsg# " recommended setting from syntastic plugin
|
||||
set statusline+=%{SyntasticStatuslineFlag()} " recommended setting from syntastic plugin
|
||||
set statusline+=%* " recommended setting from syntastic plugin
|
||||
|
||||
" This has to come after colorscheme, if defined, to not be masked
|
||||
highlight ColorColumn ctermbg=232 " set the color to be used for guidelines
|
||||
let &colorcolumn=join(range(81,999),",") " change the background color of everything beyond 80 characters
|
||||
|
||||
let g:snipMate = { 'snippet_version' : 1 }
|
||||
|
||||
" settings for the syntastic plugin
|
||||
let g:syntastic_always_populate_loc_list = 1
|
||||
let g:syntastic_auto_loc_list = 1
|
||||
let g:syntastic_check_on_open = 1
|
||||
let g:syntastic_check_on_wq = 0
|
||||
let g:syntastic_enable_signs = 1
|
||||
let g:syntastic_ruby_checkers = ['rubocop']
|
||||
let g:syntastic_quiet_messages = {'level': 'warnings'}
|
||||
|
||||
" don't wrap text in markdown files
|
||||
let g:vim_markdown_folding_disabled = 1
|
||||
|
||||
" settings for vim-airline
|
||||
let g:airline_theme='badwolf'
|
||||
let g:airline_powerline_fonts = 1
|
||||
|
||||
269
legacy/link/nix/zshrc
Normal file
269
legacy/link/nix/zshrc
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
# Path to your oh-my-zsh installation.
|
||||
export ZSH=~/.oh-my-zsh
|
||||
|
||||
# Set name of the theme to load. Optionally, if you set this to "random"
|
||||
# it'll load a random theme each time that oh-my-zsh is loaded.
|
||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
||||
#ZSH_THEME="robbyrussell"
|
||||
|
||||
# use oh-my-posh for theme
|
||||
|
||||
# Get Homebrew into the path early so that plugins and such can use
|
||||
# programs installed by it
|
||||
if [[ $(uname) == 'Darwin' ]]; then
|
||||
if [ "$(uname -p)" = 'i386' ] && [ ! -f '/opt/homebrew/bin/brew' ]; then
|
||||
eval "$(/usr/local/bin/brew shellenv)"
|
||||
else
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
fi
|
||||
elif [[ $(uname) == 'Linux' ]]; then
|
||||
if [[ -e /home/linuxbrew/.linuxbrew/bin/brew ]]; then
|
||||
# Don't use the eval so that it doesn't override system python
|
||||
# eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
|
||||
export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar"
|
||||
export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew"
|
||||
export PATH="${PATH}:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin"
|
||||
export MANPATH="/home/linuxbrew/.linuxbrew/share/man${MANPATH+:$MANPATH}:"
|
||||
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH:-}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get Homebrew shell completion bits
|
||||
# https://docs.brew.sh/Shell-Completion
|
||||
if type brew &>/dev/null; then
|
||||
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
|
||||
fi
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion. Case
|
||||
# sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||
# DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
ENABLE_CORRECTION="false"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
COMPLETION_WAITING_DOTS="false"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
ZSH_CUSTOM=~/repos/customized-oh-my-zsh
|
||||
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(bundler gem git github history kubectl macos pip terraform vagrant vscode zsh-autosuggestions)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
[ -f ~/.private-env ] && source ~/.private-env || echo '~/.private-env is missing'
|
||||
|
||||
# Start GPG agent
|
||||
# Some tips from https://hedberg.io/yubikey-for-ssh/ helped simplify this:
|
||||
if [[ $(uname) == 'Darwin' ]]; then
|
||||
# Add GPG Suite binaries to the path:
|
||||
export PATH=/usr/local/MacGPG2/bin:$PATH
|
||||
fi
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
# export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
# gpgconf --launch gpg-agent
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
#alias ll='ls -G -l'
|
||||
#alias ls='ls -G'
|
||||
alias beo='bundle exec onceover run spec --trace --force'
|
||||
alias biv='bundle install --path=vendor/bundle'
|
||||
alias ce='code-exploration'
|
||||
alias gbc='git branch --merged | command grep -vE "^(\*|\s*(main|master|develop|production)\s*$)" | command xargs -n 1 git branch -d'
|
||||
alias gitextract='git log --pretty=email --patch-with-stat --reverse --full-index --binary --'
|
||||
alias gpge='gpg2 --encrypt --sign --armor -r '
|
||||
alias hubpr='hub pull-request --push --browse'
|
||||
alias pssh='ssh -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" -o PubkeyAcceptedKeyTypes=+ssh-rsa -o HostKeyAlgorithms=+ssh-rsa -o KexAlgorithms=+diffie-hellman-group1-sha1 -i ~/.ssh/id_rsa-acceptance'
|
||||
alias sal='ssh-add -L'
|
||||
alias st='open -a SourceTree'
|
||||
alias sz='source ~/.zshrc'
|
||||
alias usegpg='killall ssh-agent; export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) && gpgconf --launch gpg-agent'
|
||||
alias usessh='gpgconf --kill gpg-agent'
|
||||
|
||||
# aliases whose command changes based on OS
|
||||
if [[ `uname` == 'Linux' ]]; then
|
||||
alias uwgconnect='nmcli dev wifi connect SecureWest password'
|
||||
alias uwgforget='nmcli connection delete SecureWest'
|
||||
alias ykey='sudo systemctl restart pcscd && sudo pkill -9 gpg-agent && source ~/.zshrc; ssh-add -L'
|
||||
else
|
||||
alias currentwifi='networksetup -getairportnetwork en0 |cut -d ":" -f2- | cut -d " " -f2-'
|
||||
alias uwgconnect='networksetup -setairportnetwork en0 SecureWest'
|
||||
alias uwgforget='networksetup -removepreferredwirelessnetwork en0 SecureWest'
|
||||
alias ykey='pkill -9 gpg-agent && source ~/.zshrc; ssh-add -L'
|
||||
fi
|
||||
|
||||
## Linux-only aliases
|
||||
if [[ `uname` == 'Linux' ]]; then
|
||||
alias enable-ruby-27='source ~/enable-ruby-27'
|
||||
alias pbcopy='xclip -selection clipboard'
|
||||
alias pbpaste='xclip -selection clipboard -o'
|
||||
|
||||
function popup() {
|
||||
echo 'checking for updates via apt...'
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
echo
|
||||
echo 'checking for updates via flatpak...'
|
||||
flatpak update
|
||||
echo
|
||||
echo 'checking for updates via snap...'
|
||||
sudo snap refresh
|
||||
echo
|
||||
echo 'checking for updates via brew...'
|
||||
brew update
|
||||
brew upgrade
|
||||
echo
|
||||
echo 'checking for updates to Zoom'
|
||||
wget -O /tmp/zoom_amd64.deb https://zoom.us/client/latest/zoom_amd64.deb && sudo apt-get install -y /tmp/zoom_amd64.deb; rm -f /tmp/zoom_amd64.deb
|
||||
echo
|
||||
echo 'checking for firmware updates...'
|
||||
sudo fwupdmgr refresh --force && sudo fwupdmgr get-updates && sudo fwupdmgr update
|
||||
echo
|
||||
echo 'all done :)'
|
||||
}
|
||||
fi
|
||||
|
||||
if [[ `uname` != 'Linux' ]]; then
|
||||
function otpon() {
|
||||
osascript -e 'tell application "yubiswitch" to KeyOn'
|
||||
}
|
||||
function otpoff() {
|
||||
osascript -e 'tell application "yubiswitch" to KeyOff'
|
||||
}
|
||||
fi
|
||||
|
||||
export EDITOR='vim'
|
||||
|
||||
export GOPATH=$HOME/go
|
||||
|
||||
if [[ `uname` == 'Darwin' ]]; then
|
||||
# Bits common to all macOS instances
|
||||
alias flushdns='sudo killall -HUP mDNSResponder'
|
||||
alias localdns='sudo networksetup -setdnsservers Wi-Fi empty && sudo networksetup -setdnsservers Wi-Fi 127.0.0.1 ::1 && flushdns'
|
||||
alias ogk='open -a GitKraken'
|
||||
alias stockdns='sudo networksetup -setdnsservers Wi-Fi empty && flushdns'
|
||||
|
||||
if [ -d "$HOME/.krew" ]; then export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"; fi
|
||||
|
||||
export PATH=$PATH:/usr/local/sbin
|
||||
|
||||
# Araxis needs to come first so that its tools don't get stomped
|
||||
# by ones Homebrew installs to /usr/local/bin. In particular, compare
|
||||
# from ImageMagick breaks using git difftool.
|
||||
if [ -d "/Applications/Araxis Merge.app" ]; then export PATH='/Applications/Araxis Merge.app/Contents/Utilities':$PATH; fi
|
||||
|
||||
eval '/usr/libexec/path_helper -s' > /dev/null
|
||||
|
||||
# Add OVFTool to PATH if it is installed
|
||||
if [ -d "/Applications/VMware OVF Tool" ]; then export PATH=$PATH:'/Applications/VMware OVF Tool'; fi
|
||||
|
||||
# add gems to path
|
||||
GEMBIN="$(gem environment gemdir)/bin"
|
||||
export PATH=$PATH:$GEMBIN
|
||||
|
||||
# added to make pipx work
|
||||
[ -d /Users/gene/.local/bin ] && export PATH=$PATH:/Users/gene/.local/bin
|
||||
|
||||
export OPENFAAS_PREFIX="genebean"
|
||||
|
||||
[ -e "${HOME}/.iterm2_shell_integration.zsh" ] && source "${HOME}/.iterm2_shell_integration.zsh"
|
||||
|
||||
if [ "$(uname -p)" = 'i386' ] && [ ! -f '/opt/homebrew/bin/brew' ]; then
|
||||
|
||||
# optional additions from homebrew
|
||||
[ -d "/usr/local/opt/node@12/bin" ] && export PATH="/usr/local/opt/node@12/bin:$PATH"
|
||||
[ -d /usr/local/opt/qt/bin ] && export PATH=$PATH:/usr/local/opt/qt/bin
|
||||
|
||||
# use homebrew's ruby
|
||||
[ -d /usr/local/opt/ruby/bin ] && export PATH=/usr/local/opt/ruby/bin:$PATH
|
||||
|
||||
# hide ruby 2.7's extra output
|
||||
export RUBYOPT='-W:no-deprecated -W:no-experimental'
|
||||
|
||||
export VAGRANT_DEFAULT_PROVIDER='virtualbox'
|
||||
|
||||
glcoud_zsh_path='/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc'
|
||||
[ -f $glcoud_zsh_path ] && source $glcoud_zsh_path
|
||||
|
||||
gcloud_zsh_completions='/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc'
|
||||
[ -f $gcloud_zsh_completions ] && source $gcloud_zsh_completions
|
||||
else
|
||||
glcoud_zsh_path='/usr/local/google-cloud-sdk/path.zsh.inc'
|
||||
if [ -f $glcoud_zsh_path ]; then source $glcoud_zsh_path; fi
|
||||
|
||||
gcloud_zsh_completions='/usr/local/google-cloud-sdk/completion.zsh.inc'
|
||||
if [ -f $gcloud_zsh_completions ]; then source $gcloud_zsh_completions; fi
|
||||
|
||||
# use homebrew's ruby
|
||||
[ -d "/opt/homebrew/opt/ruby@2.7/bin" ] && export PATH='/opt/homebrew/opt/ruby@2.7/bin':$PATH
|
||||
|
||||
# hide ruby 2.7's extra output
|
||||
export RUBYOPT='-W:no-deprecated -W:no-experimental'
|
||||
fi
|
||||
elif [[ `uname` == 'Linux' ]]; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
# add Pulumi to the PATH
|
||||
if [ -d "$HOME/.pulumi/bin" ] ; then
|
||||
PATH=$PATH:$HOME/.pulumi/bin
|
||||
fi
|
||||
|
||||
if [ -d "$HOME/.local/share/gem/ruby/3.0.0/bin" ] ; then
|
||||
PATH="$HOME/.local/share/gem/ruby/3.0.0/bin:$PATH"
|
||||
fi
|
||||
|
||||
# export CLOUDSDK_PYTHON="/usr/bin/python2"
|
||||
gcloud_zsh_completions='/snap/google-cloud-cli/current/completion.zsh.inc'
|
||||
if [ -f $gcloud_zsh_completions ]; then source $gcloud_zsh_completions; fi
|
||||
|
||||
fi
|
||||
|
||||
if type floaty &>/dev/null; then
|
||||
source $(floaty completion --shell zsh)
|
||||
fi
|
||||
|
||||
eval "$(oh-my-posh init zsh --config ~/repos/my-oh-my-posh-themes/beanbag.omp.json)"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue