From 6238742f20ad5d4921ca7a9fdaa7d55174a04d6d Mon Sep 17 00:00:00 2001 From: Rack Lin Date: Fri, 13 Mar 2026 22:45:35 +0800 Subject: [PATCH] added openclaw-vm tunnel Signed-off-by: Rack Lin --- fish/config-osx.fish | 10 +++++ fish/config.fish | 97 +++++++++++++++++++++--------------------- nvim/lazy-lock.json | 2 +- nvim/lazyvim.json | 5 ++- tmux/dot-tmux.conf | 14 +++--- zsh/dot-config-osx.zsh | 14 +++--- 6 files changed, 78 insertions(+), 64 deletions(-) diff --git a/fish/config-osx.fish b/fish/config-osx.fish index 257c6f6..5e91957 100644 --- a/fish/config-osx.fish +++ b/fish/config-osx.fish @@ -3,4 +3,14 @@ if type -q eza alias lsa "ls -a" alias ll "ls -l" alias lla "ll -a" + alias llg "ll --git" end + +if type -q nvim + alias vi nvim + alias vim nvim +end + +# openclaw +alias openclaw-cliproxyapi-tunnel 'ssh -NL 8317:127.0.0.1:8317 node@openclaw-vm' +alias openclaw-tunnel 'ssh -NL 18789:127.0.0.1:18789 node@openclaw-vm' diff --git a/fish/config.fish b/fish/config.fish index d2d56f5..83c98bc 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -20,55 +20,54 @@ if status is-interactive case '*' end -end + # include devenv + source (dirname (status --current-filename))/config-dev.fish -# include devenv -source (dirname (status --current-filename))/config-dev.fish - -# set PATH and load os-specify config -switch (uname) - case Darwin - if test -x /opt/homebrew/bin/brew - eval "$(/opt/homebrew/bin/brew shellenv)" - set -gx PATH ~/bin $PATH - source (dirname (status --current-filename))/config-osx.fish - end - case Linux - source (dirname (status --current-filename))/config-linux.fish - case '*' - source (dirname (status --current-filename))/config-windows.fish -end - -# using less instead of more -export LESS='-R' -alias more='less' - -# set default editor to nvim -set -gx EDITOR nvim - -fzf_configure_bindings - -# ghq functions -if type -q ghq - alias ghqcd="cd \$(ghq list --full-path | fzf)" -end - -if type -q thefuck - thefuck --alias | source -end - - -# init zoxide -if type -q zoxide - zoxide init fish | source -end - -# init yazi -function y - set tmp (mktemp -t "yazi-cwd.XXXXXX") - yazi $argv --cwd-file="$tmp" - if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - builtin cd -- "$cwd" + # set PATH and load os-specify config + switch (uname) + case Darwin + if test -x /opt/homebrew/bin/brew + eval "$(/opt/homebrew/bin/brew shellenv)" + set -gx PATH ~/bin $PATH + source (dirname (status --current-filename))/config-osx.fish + end + case Linux + source (dirname (status --current-filename))/config-linux.fish + case '*' + source (dirname (status --current-filename))/config-windows.fish end - rm -f -- "$tmp" + + # using less instead of more + export LESS='-R' + alias more='less' + + # set default editor to nvim + set -gx EDITOR nvim + + fzf_configure_bindings + + # ghq functions + if type -q ghq + alias ghqcd="cd \$(ghq list --full-path | fzf)" + end + + if type -q thefuck + thefuck --alias | source + end + + # init zoxide + if type -q zoxide + zoxide init fish | source + end + + # init yazi + function y + set tmp (mktemp -t "yazi-cwd.XXXXXX") + yazi $argv --cwd-file="$tmp" + if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] + builtin cd -- "$cwd" + end + rm -f -- "$tmp" + end + end diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 45940b9..ad9cf45 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,5 +1,5 @@ { - "LazyVim": { "branch": "main", "commit": "d1529f650fdd89cb620258bdeca5ed7b558420c7" }, + "LazyVim": { "branch": "main", "commit": "28db03f958d58dfff3c647ce28fdc1cb88ac158d" }, "SchemaStore.nvim": { "branch": "main", "commit": "b850ab25279ba04ada90e8b696ef5d0624af103d" }, "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, diff --git a/nvim/lazyvim.json b/nvim/lazyvim.json index 071932c..ef17519 100644 --- a/nvim/lazyvim.json +++ b/nvim/lazyvim.json @@ -7,8 +7,9 @@ "lazyvim.plugins.extras.lang.toml", "lazyvim.plugins.extras.lang.yaml" ], + "install_version": 7, "news": { - "NEWS.md": "10960" + "NEWS.md": "11866" }, - "version": 7 + "version": 8 } \ No newline at end of file diff --git a/tmux/dot-tmux.conf b/tmux/dot-tmux.conf index 742a09f..aaed7f1 100644 --- a/tmux/dot-tmux.conf +++ b/tmux/dot-tmux.conf @@ -2,9 +2,9 @@ set -g default-terminal "xterm-256color" #set -ga terminal-overrides ",*256col*:Tc" set -ga terminal-overrides ",xterm-256color:Tc" # action key -unbind C-b -set-option -g prefix C-t -set-option -g repeat-time 0 +#unbind C-b +#set-option -g prefix C-t +#set-option -g repeat-time 0 #### Key bindings @@ -18,10 +18,10 @@ bind o run-shell "open #{pane_current_path}" bind -r e kill-pane -a # vim-like pane switching -bind -r k select-pane -U -bind -r j select-pane -D -bind -r h select-pane -L -bind -r l select-pane -R +bind -r k select-pane -U +bind -r j select-pane -D +bind -r h select-pane -L +bind -r l select-pane -R # Moving window bind-key -n C-S-Left swap-window -t -1 \; previous-window diff --git a/zsh/dot-config-osx.zsh b/zsh/dot-config-osx.zsh index d3a79ac..06c2fa0 100644 --- a/zsh/dot-config-osx.zsh +++ b/zsh/dot-config-osx.zsh @@ -2,8 +2,12 @@ [ -x /opt/homebrew/bin/exa ] && alias ll="exa -l -g --icons" # PHP in container -[ -x /usr/local/bin/docker ] && alias composer="docker run --rm --interactive --tty --volume \$PWD:/app --volume \$HOME/.composer:/tmp composer:latest composer" -[ -x /usr/local/bin/docker ] && alias php="docker run --rm --interactive --tty --volume \$PWD:/app --volume /Users:/Users composer:latest php" -[ -x /usr/local/bin/docker ] && alias php8="docker run --rm --interactive --tty --volume \$PWD:/app composer:latest php" -[ -x /usr/local/bin/docker ] && alias php7="docker run --rm --interactive --tty --volume \$PWD:/app --workdir /app php:7.4-cli php" -[ -x /usr/local/bin/docker ] && alias laravel="docker run --rm --interactive --tty --volume \$PWD:/app --volume \$HOME/.composer:/tmp composer:latest /tmp/vendor/bin/laravel" +[ -x /usr/local/bin/docker ] && alias composer="docker run --rm --interactive --tty --volume \$PWD:/app --volume \$HOME/.composer:/tmp composer:latest composer" +[ -x /usr/local/bin/docker ] && alias php="docker run --rm --interactive --tty --volume \$PWD:/app --volume /Users:/Users composer:latest php" +[ -x /usr/local/bin/docker ] && alias php8="docker run --rm --interactive --tty --volume \$PWD:/app composer:latest php" +[ -x /usr/local/bin/docker ] && alias php7="docker run --rm --interactive --tty --volume \$PWD:/app --workdir /app php:7.4-cli php" +[ -x /usr/local/bin/docker ] && alias laravel="docker run --rm --interactive --tty --volume \$PWD:/app --volume \$HOME/.composer:/tmp composer:latest /tmp/vendor/bin/laravel" + +# openclaw +alias openclaw-cliproxyapi-tunnel='ssh -NL 8317:127.0.0.1:8317 node@openclaw-vm' +alias openclaw-tunnel='ssh -NL 18789:127.0.0.1:18789 node@openclaw-vm'