diff --git a/.dotter/local.toml.example b/.dotter/local.toml.example index fedf856..69ade7d 100644 --- a/.dotter/local.toml.example +++ b/.dotter/local.toml.example @@ -1,9 +1,10 @@ includes = [] -packages = ["shell", "zsh", "vim", "nvim", "zsh_zinit"] +packages = ["shell", "zsh", "nvim", "zsh_zinit"] [variables] js_linter = "\"eslint\"" js_fixer = "\"prettier\"" email = "jay@lawsnote.com" git_username = "jay" +enableTmux = false diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index 308cf44..c382fdb 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -152,7 +152,7 @@ font: #style: Bold Italic # Point size - size: 8.0 + size: 10.0 # Offset is the extra space around each character. `offset.y` can be thought # of as modifying the line spacing, and `offset.x` as modifying the letter diff --git a/install_zinit.sh b/install_zinit.sh new file mode 100755 index 0000000..2ae504a --- /dev/null +++ b/install_zinit.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin diff --git a/ssh/config b/ssh/config index 0227c74..970d37b 100644 --- a/ssh/config +++ b/ssh/config @@ -15,3 +15,7 @@ Host dev Host vpn User root HostName 192.168.201.254 + +Host lndev + User jay + HostName 192.168.88.12 diff --git a/vim_dep.sh b/vim_dep.sh index d7bb698..7bdebca 100755 --- a/vim_dep.sh +++ b/vim_dep.sh @@ -7,10 +7,5 @@ fi if type go > /dev/null; then go install github.com/sourcegraph/go-langserver@latest go install github.com/jstemmer/gotags@latest - go get -u github.com/cweill/gotests/... -fi + go install github.com/cweill/gotests/gotests@latest -if type rustup > /dev/null; then - rustup update - rustup component add rls rust-analysis rust-src -fi diff --git a/zprofile b/zprofile index 09438e9..571977b 100644 --- a/zprofile +++ b/zprofile @@ -31,6 +31,23 @@ function envf { export $(cat $1 | grep -v '^#' | xargs) } +function save-image { + if [ -z "$1" ]; then + echo "usage: save-image " + exit 1 + fi + + imageName=$(echo ${1##*/} | sed 's/:/_/' | xargs -I {} echo "{}.tar") + + lima nerdctl pull $1 + lima nerdctl image save -o $imageName $1 + lima nerdctl image rm $1 +} + +function ttySize { + echo "-e COLUMNS=$(tput cols) -e LINES=$(tput lines)" +} + export HISTORY_SUBSTRING_SEARCH_PREFIXED=1 export GOPATH="$HOME/go" export GOROOT="$HOME/apps/go" @@ -55,3 +72,6 @@ if [ -f '/Users/jay/apps/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/jay/ap # The next line enables shell command completion for gcloud. # if [ -f '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc'; fi + +alias docker="lima nerdctl" +export DOCKER_HOST="unix:///Users/jay/.lima/docker/sock/docker.sock" diff --git a/zshrc_zinit b/zshrc_zinit index 1735208..c77d7b0 100644 --- a/zshrc_zinit +++ b/zshrc_zinit @@ -1,7 +1,8 @@ +{{#if enableTmux}} export ZSH_TMUX_AUTOSTART=true export ZSH_TMUX_AUTOSTART_ONCE=true export ZSH_TMUX_AUTOCONNECT=true - +{{/if}} # install zinit # git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin source ~/.zinit/bin/zinit.zsh @@ -30,8 +31,10 @@ zinit snippet OMZ::plugins/git/git.plugin.zsh # Load OMZ extract folder zinit ice svn zinit snippet OMZ::plugins/extract +{{#if enableTmux}} zinit ice svn zinit snippet OMZ::plugins/tmux +{{/if}} # theme zinit light "tinyRatP/ys" @@ -45,3 +48,4 @@ zinit light "tinyRatP/ys" [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +export PATH="/usr/local/opt/openjdk/bin:$PATH"