commit 9ffcc4caa5ce96a2c3c2da4025903a4da2e49854 Author: Yu Cong Date: Fri Jan 9 10:18:02 2026 +0800 macmini ~/.config diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..38cd93b --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +.DS_Store + +htop/ + +mole/ + +linearmouse/ + +fontforge/ + +clash/ + +zed/prompts/ +zed/conversations/ + +fish/completions/ +fish/conf.d/ + +iterm2/ \ No newline at end of file diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..90a0e84 --- /dev/null +++ b/fish/config.fish @@ -0,0 +1,33 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end +set -g fish_greeting + +# HOMEBREW +# tuna - https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/ +set -x HOMEBREW_BREW_GIT_REMOTE https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git +set -x HOMEBREW_API_DOMAIN https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api +set -x HOMEBREW_BOTTLE_DOMAIN https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles + +# USTC - https://mirrors.ustc.edu.cn/help/brew.git.html +# set -xU HOMEBREW_BREW_GIT_REMOTE https://mirrors.ustc.edu.cn/brew.git + +set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin /Users/congyu/.ghcup/bin $PATH # ghcup-env + + +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +if test -f /opt/homebrew/Caskroom/miniforge/base/bin/conda + eval /opt/homebrew/Caskroom/miniforge/base/bin/conda "shell.fish" "hook" $argv | source +else + if test -f "/opt/homebrew/Caskroom/miniforge/base/etc/fish/conf.d/conda.fish" + . "/opt/homebrew/Caskroom/miniforge/base/etc/fish/conf.d/conda.fish" + else + set -x PATH "/opt/homebrew/Caskroom/miniforge/base/bin" $PATH + end +end +# <<< conda initialize <<< + +# Added by OrbStack: command-line tools and integration +# This won't be added again if you remove it. +source ~/.orbstack/shell/init2.fish 2>/dev/null || : diff --git a/fish/fish_variables b/fish/fish_variables new file mode 100644 index 0000000..fcbc651 --- /dev/null +++ b/fish/fish_variables @@ -0,0 +1,4 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:4300 +SETUVAR fish_user_paths:/opt/homebrew/sbin\x1e/opt/homebrew/bin diff --git a/fish/functions/amnesia.fish b/fish/functions/amnesia.fish new file mode 100644 index 0000000..29d0687 --- /dev/null +++ b/fish/functions/amnesia.fish @@ -0,0 +1,5 @@ +function amnesia --description 'amnesia' + pushd ~/amnesia/ + fish s.fish + popd +end diff --git a/fish/functions/clash_proxy.fish b/fish/functions/clash_proxy.fish new file mode 100644 index 0000000..841e8c0 --- /dev/null +++ b/fish/functions/clash_proxy.fish @@ -0,0 +1,5 @@ +function clash_proxy --description 'use clash proxy in terminal' + export https_proxy=http://127.0.0.1:7890; + export http_proxy=http://127.0.0.1:7890; + export all_proxy=socks5://127.0.0.1:7890 +end \ No newline at end of file diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..db9b75f --- /dev/null +++ b/fish/functions/fish_prompt.fish @@ -0,0 +1,31 @@ +function fish_prompt --description 'Write out the prompt' + set -l last_pipestatus $pipestatus + set -lx __fish_last_status $status # Export for __fish_print_pipestatus. + set -l normal (set_color normal) + set -q fish_color_status + or set -g fish_color_status red + + # Color the prompt differently when we're root + set -l color_cwd $fish_color_cwd + set -l suffix ' >' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + end + set suffix ' #' + end + + # Write pipestatus + # If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it. + set -l bold_flag --bold + set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation + if test $__fish_prompt_status_generation = $status_generation + set bold_flag + end + set __fish_prompt_status_generation $status_generation + set -l status_color (set_color $fish_color_status) + set -l statusb_color (set_color $bold_flag $fish_color_status) + set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) + + echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " " +end diff --git a/helix/config.toml b/helix/config.toml new file mode 100644 index 0000000..2458a4a --- /dev/null +++ b/helix/config.toml @@ -0,0 +1,5 @@ +theme = "onelight" + +[editor] +line-number = "relative" + diff --git a/zed/keymap.json b/zed/keymap.json new file mode 100644 index 0000000..6effe95 --- /dev/null +++ b/zed/keymap.json @@ -0,0 +1,30 @@ +// Zed keymap +// +// For information on binding keys, see the Zed +// documentation: https://zed.dev/docs/key-bindings +// +// To see the default key bindings run `zed: open default keymap` +// from the command palette. +[ + { + "context": "Workspace", + "bindings": { + // "shift shift": "file_finder::Toggle" + } + }, + { + "context": "Editor", + "bindings": { + // "j k": ["workspace::SendKeystrokes", "escape"] + } + }, + { + "context": "VimControl && !menu", + "bindings": { + "j": ["vim::Down", { "display_lines": true }], + "k": ["vim::Up", { "display_lines": true }], + "g j": "vim::Down", + "g k": "vim::Up" + } + } +] diff --git a/zed/settings.json b/zed/settings.json new file mode 100644 index 0000000..77cbd51 --- /dev/null +++ b/zed/settings.json @@ -0,0 +1,108 @@ +// Zed settings +// +// For information on how to configure Zed, see the Zed +// documentation: https://zed.dev/docs/configuring-zed +// +// To see all of Zed's default settings without changing your +// custom settings, run `zed: open default settings` from the +// command palette (cmd-shift-p / ctrl-shift-p) +{ + "drag_and_drop_selection": { + "delay": 0, + "enabled": true + }, + "terminal": { + "font_family": "Iosevka Terminal Wide", + "detect_venv": "off", + "font_size": 14 + }, + "show_wrap_guides": true, + "title_bar": { + "show_sign_in": false + }, + "git_panel": { + "default_width": 320.0 + }, + "outline_panel": { + "default_width": 320.0 + }, + "notification_panel": { + "dock": "right" + }, + "debugger": { + "dock": "bottom" + }, + "edit_predictions": { + "mode": "subtle", + "copilot": { + "proxy": null, + "proxy_no_verify": null + }, + "enabled_in_text_threads": false + }, + "telemetry": { + "diagnostics": false, + "metrics": false + }, + "base_keymap": "VSCode", + "buffer_font_features": { + "calt": false, + "NWID": true + }, + "ui_font_size": 14, + "buffer_font_family": "Iosevka Terminal Wide", + "buffer_font_size": 14, + "buffer_line_height": "comfortable", + "project_panel": { + "default_width": 320.0, + "scrollbar": { + "show": "never" + }, + "entry_spacing": "standard" + }, + "tab_size": 4, + "format_on_save": "off", + "remove_trailing_whitespace_on_save": false, + "ensure_final_newline_on_save": false, + // "preferred_line_length": 80, + "soft_wrap": "editor_width", + "git": { + "inline_blame": { + "enabled": false + } + }, + "collaboration_panel": { + "button": false + }, + "agent": { + "enabled": false + }, + "features": { + // "copilot": false, + "edit_prediction_provider": "none" + }, + // "vim_mode": true, + ////// LSP config ////// + "lsp": { + "texlab": { + "settings": { + "texlab": { + "build": { + "onSave": true, + "forwardSearchAfter": false + } + } + } + }, + "clangd": { + "binary": { + "ignore_system_version": true, + "path": "/opt/homebrew/opt/llvm/bin/clangd", + "arguments": [] + } + } + }, + "file_types": { + "Cython":["sage"] + } +} diff --git a/zed/settings_backup.json b/zed/settings_backup.json new file mode 100644 index 0000000..b8e7d57 --- /dev/null +++ b/zed/settings_backup.json @@ -0,0 +1,59 @@ +// Zed settings +// +// For information on how to configure Zed, see the Zed +// documentation: https://zed.dev/docs/configuring-zed +// +// To see all of Zed's default settings without changing your +// custom settings, run `zed: open default settings` from the +// command palette (cmd-shift-p / ctrl-shift-p) +{ + "edit_predictions": { + "mode": "subtle", + "copilot": { + "proxy": null, + "proxy_no_verify": null + }, + "enabled_in_text_threads": false + }, + "telemetry": { + "diagnostics": false, + "metrics": false + }, + "base_keymap": "VSCode", + "ui_font_size": 16, + "buffer_font_size": 16, + "theme": { + "mode": "system", + "light": "One Light", + "dark": "One Dark" + }, + "buffer_font_family": "CaskaydiaCove Nerd Font", + "toolbar": { + "breadcrumbs": false, + "quick_actions": false + }, + "terminal": { + "toolbar": { + "breadcrumbs": false + } + }, + "format_on_save": "off", + // "preferred_line_length": 80, + "soft_wrap": "editor_width", + "git": { + "inline_blame": { + "enabled": false + } + }, + "collaboration_panel": { + "button": false + }, + "assistant": { + "enabled": false, + "version": "2" + }, + "features": { + "copilot": false, + "inline_completion_provider": "none" + } +} diff --git a/zed/snippets/markdown.json b/zed/snippets/markdown.json new file mode 100644 index 0000000..a531881 --- /dev/null +++ b/zed/snippets/markdown.json @@ -0,0 +1,36 @@ +{ + // Place your snippets for markdown here. Each snippet is defined under a snippet name and has a prefix, body and + // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the + // same ids are connected. + // Example: + // "Print to console": { + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "lp":{ + "prefix": "lp", + "body": [ + "\\begin{equation}", + "\\begin{aligned}", + "$0", + "\\end{aligned}", + "\\end{equation}", + ], + "description": "math env for LP" + }, + "details": { + "prefix": "details", + "body": [ + "
", + "$1", + "$0", + "
" + ], + "description": "details" + } +} \ No newline at end of file diff --git a/zed/tasks.json b/zed/tasks.json new file mode 100644 index 0000000..e69de29