feat: update

This commit is contained in:
2025-12-01 19:55:54 +08:00
parent 8de370bdf5
commit 5a78b07c51
7 changed files with 62 additions and 44 deletions
+1
View File
@@ -7,3 +7,4 @@ _set_env.sh
log log
cn.sh cn.sh
__pycache__ __pycache__
Makefile
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
set -e
set -x
# 设置环境变量
export CURSOR_VERSION=
export CURSOR_COMMIT=
export REMOTE_ARCH="x64" # or arm64
export REMOTE_OS="linux"
# 创建目录结构
mkdir -p ${HOME}/.cursor-server/cli/servers/Stable-${CURSOR_COMMIT}/server/
# 下载并解压第一个压缩包 (cli-alpine)
CLI_URL="https://cursor.blob.core.windows.net/remote-releases/${CURSOR_COMMIT}/cli-alpine-${REMOTE_ARCH}.tar.gz"
curl -L "${CLI_URL}" -o ${HOME}/.cursor-server/cursor-cli.tar.gz
tar -xzf ${HOME}/.cursor-server/cursor-cli.tar.gz -C ${HOME}/.cursor-server/
mv ${HOME}/.cursor-server/cursor ${HOME}/.cursor-server/cursor-$CURSOR_COMMIT
# 下载并解压第二个压缩包 (vscode-reh)
VSCODE_URL="https://cursor.blob.core.windows.net/remote-releases/${CURSOR_VERSION}-${CURSOR_COMMIT}/vscode-reh-${REMOTE_OS}-${REMOTE_ARCH}.tar.gz"
curl -L "${VSCODE_URL}" -o ${HOME}/.cursor-server/cursor-vscode-server.tar.gz
tar -xzf ${HOME}/.cursor-server/cursor-vscode-server.tar.gz -C ${HOME}/.cursor-server/cli/servers/Stable-${CURSOR_COMMIT}/server/ --strip-components=1
echo "Cursor server installation completed!"
+4 -10
View File
@@ -1,13 +1,14 @@
# Completions for ff command # Completions for ff command
complete -c ff -f complete -c ff -f
set -l ff_subcommands reload edit cd pon poff pst make script help set -l ff_subcommands reload edit pon poff pst make script help
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "reload" -d "Reload fish configuration" complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "reload" -d "Reload fish configuration"
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "edit" -d "Edit custom fish configuration" complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "edit" -d "Edit custom fish configuration"
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "cd" -d "Change to fish config directory" complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "fish" -d "Change to fish config directory"
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "dotfile" -d "Change to dotfile directory"
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "pon" -d "Enable proxy (proxy on)" complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "pon" -d "Enable proxy (proxy on)"
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "poff" -d "Disable proxy (proxy off)" complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "poff" -d "Disable proxy (proxy off)"
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "pst" -d "Show proxy status" complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "pst" -d "Show proxy status"
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "make" -d "Run dotfile Makefile commands" # complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "make" -d "Run dotfile Makefile commands"
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "script" -d "Run script from script directory" complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "script" -d "Run script from script directory"
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "help" -d "Show this help message" complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "help" -d "Show this help message"
@@ -32,13 +33,6 @@ complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "help" -d
# complete -c ff -n "__fish_seen_subcommand_from make" -a "cursor-init" -d "Initialize Cursor config" # complete -c ff -n "__fish_seen_subcommand_from make" -a "cursor-init" -d "Initialize Cursor config"
# complete -c ff -n "__fish_seen_subcommand_from make" -a "init-default-user" -d "Initialize default user (sudo)" # complete -c ff -n "__fish_seen_subcommand_from make" -a "init-default-user" -d "Initialize default user (sudo)"
# Clean scripts
complete -c ff -n "__fish_seen_subcommand_from make" -a "brew-clean" -d "Clean Homebrew cache"
complete -c ff -n "__fish_seen_subcommand_from make" -a "docker-clean" -d "Clean Docker resources"
# Utils
complete -c ff -n "__fish_seen_subcommand_from make" -a "croncheck" -d "Check cron status"
# script 子命令的补全 - 动态列出 script 目录下的脚本 # script 子命令的补全 - 动态列出 script 目录下的脚本
function __ff_list_scripts function __ff_list_scripts
set -l script_dir ~/.dotfile/script set -l script_dir ~/.dotfile/script
+20 -23
View File
@@ -59,12 +59,12 @@ set -gx HOMEBREW_BOTTLE_DOMAIN "https://mirrors.ustc.edu.cn/homebrew-bottles"
set -gx GOPATH $HOME/go:$HOME/workrepo/go set -gx GOPATH $HOME/go:$HOME/workrepo/go
set -gx GOPROXY "goproxy.cn,direct" set -gx GOPROXY "goproxy.cn,direct"
set -gx GOSUMDB "sum.golang.google.cn" set -gx GOSUMDB "sum.golang.google.cn"
set -gx EDITOR vim
add_to_path $HOME/go/bin add_to_path $HOME/go/bin
add_to_path $HOME/.yarn/bin $HOME/.config/yarn/global/node_modules/.bin add_to_path $HOME/.yarn/bin $HOME/.config/yarn/global/node_modules/.bin
function gtr
################################################################# go test -gcflags=all=-l -v -run=$argv
# node end
add_to_path /usr/local/node/bin
################################################################# #################################################################
# python # python
@@ -77,11 +77,22 @@ end
add_to_path $PYENV_ROOT/bin add_to_path $PYENV_ROOT/bin
################################################################# #################################################################
# nvim # node
add_to_path usr/local/nvim/bin /usr/local/osx-64/nvim/bin # add_to_path /usr/local/node/bin
set -gx EDITOR vim # add_to_path usr/local/nvim/bin /usr/local/osx-64/nvim/bin
function gtr
go test -gcflags=all=-l -v -run=$argv # fnm
set FNM_PATH "$HOME/.local/share/fnm"
if [ -d "$FNM_PATH" ]
set PATH "$FNM_PATH" $PATH
alias nvm="fnm"
fnm env --use-on-cd --shell fish | source
end
# pnpm
set -gx PNPM_HOME $HOME/.pnpm
if not string match -q -- $PNPM_HOME $PATH
set -gx PATH "$PNPM_HOME" $PATH
end end
################################################################# #################################################################
@@ -166,17 +177,3 @@ end
# Added by OrbStack: command-line tools and integration # Added by OrbStack: command-line tools and integration
# This won't be added again if you remove it. # This won't be added again if you remove it.
source ~/.orbstack/shell/init2.fish 2>/dev/null || : source ~/.orbstack/shell/init2.fish 2>/dev/null || :
# pnpm
set -gx PNPM_HOME $HOME/.pnpm
if not string match -q -- $PNPM_HOME $PATH
set -gx PATH "$PNPM_HOME" $PATH
end
# pnpm end
############################################################
if is_command_exists fnm
alias nvm="fnm"
fnm env --use-on-cd --shell fish | source
end
+1 -8
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
source ./script/common/os-arch.sh source $HOME/.dotfile/script/common/os-arch.sh
# 检查并安装 gunzip # 检查并安装 gunzip
function check_gunzip() { function check_gunzip() {
@@ -23,13 +23,6 @@ function install_mihomo() {
local base_url="https://oss-default.yumee.top/bin/mihomo" local base_url="https://oss-default.yumee.top/bin/mihomo"
local url="" local url=""
# 根据不同平台设置下载 URL
# 支持的平台示例:
# darwin-amd64: https://oss-default.yumee.top/bin/mihomo/mihomo-darwin-amd64.gz
# darwin-arm64: https://oss-default.yumee.top/bin/mihomo/mihomo-darwin-arm64.gz
# linux-amd64: https://oss-default.yumee.top/bin/mihomo/mihomo-linux-amd64.gz
# linux-arm64: https://oss-default.yumee.top/bin/mihomo/mihomo-linux-arm64.gz
case $os_arch in case $os_arch in
"darwin-amd64"|"darwin-arm64"|"linux-amd64"|"linux-arm64") "darwin-amd64"|"darwin-arm64"|"linux-amd64"|"linux-arm64")
url="${base_url}/mihomo-${os_arch}.gz" url="${base_url}/mihomo-${os_arch}.gz"
+5
View File
@@ -2,3 +2,8 @@
# https://github.com/Schniz/fnm # https://github.com/Schniz/fnm
curl -fsSL https://fnm.vercel.app/install | bash curl -fsSL https://fnm.vercel.app/install | bash
ff reload
# after install node
# corepack enable pnpm
+4 -2
View File
@@ -160,7 +160,8 @@
"remote.SSH.useLocalServer": false, "remote.SSH.useLocalServer": false,
"remote.SSH.connectTimeout": 30, "remote.SSH.connectTimeout": 30,
"remote.SSH.remotePlatform": { "remote.SSH.remotePlatform": {
"box1": "linux" "box1": "linux",
"hx80": "linux"
}, },
"editor.formatOnSave": true, "editor.formatOnSave": true,
"pylint.enabled": false, "pylint.enabled": false,
@@ -267,5 +268,6 @@
"git.confirmSync": false, "git.confirmSync": false,
"editor.dropIntoEditor.preferences": [], "editor.dropIntoEditor.preferences": [],
"whichkey.bindingOverrides": [], "whichkey.bindingOverrides": [],
"cursor.general.disableHttp2": true "cursor.general.disableHttp2": true,
"remote.SSH.localServerDownload": "always"
} }