macmini ~/.config

This commit is contained in:
2026-01-09 10:18:02 +08:00
commit 9ffcc4caa5
12 changed files with 335 additions and 0 deletions

19
.gitignore vendored Normal file
View File

@@ -0,0 +1,19 @@
.DS_Store
htop/
mole/
linearmouse/
fontforge/
clash/
zed/prompts/
zed/conversations/
fish/completions/
fish/conf.d/
iterm2/

33
fish/config.fish Normal file
View File

@@ -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 || :

4
fish/fish_variables Normal file
View File

@@ -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

View File

@@ -0,0 +1,5 @@
function amnesia --description 'amnesia'
pushd ~/amnesia/
fish s.fish
popd
end

View File

@@ -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

View File

@@ -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

5
helix/config.toml Normal file
View File

@@ -0,0 +1,5 @@
theme = "onelight"
[editor]
line-number = "relative"

30
zed/keymap.json Normal file
View File

@@ -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"
}
}
]

108
zed/settings.json Normal file
View File

@@ -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"]
}
}

59
zed/settings_backup.json Normal file
View File

@@ -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"
}
}

View File

@@ -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": [
"<details>",
"<summary>$1</summary>",
"$0",
"</details>"
],
"description": "details"
}
}

0
zed/tasks.json Normal file
View File