From 7834c84adb13d058abb7fa4110041be02b003261 Mon Sep 17 00:00:00 2001 From: Xueshi Hu Date: Wed, 4 Mar 2026 18:20:35 +0800 Subject: [PATCH 01/38] remove empty anki.md Signed-off-by: Xueshi Hu --- docs/anki.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 docs/anki.md diff --git a/docs/anki.md b/docs/anki.md deleted file mode 100644 index e69de29bb..000000000 From 319c6afc8428b2f1d9196168eb601a27b219de15 Mon Sep 17 00:00:00 2001 From: Xueshi Hu Date: Mon, 9 Mar 2026 09:49:54 +0800 Subject: [PATCH 02/38] opencode Signed-off-by: Xueshi Hu --- nixpkgs/home/tools.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixpkgs/home/tools.nix b/nixpkgs/home/tools.nix index 84f573619..14ed1b473 100644 --- a/nixpkgs/home/tools.nix +++ b/nixpkgs/home/tools.nix @@ -29,6 +29,7 @@ with pkgs; gnumake yarn nodejs + bun starship atuin eza # more powerful ls @@ -83,8 +84,8 @@ with pkgs; termshark dnsmasq # audit # 没啥意义,用不起来 - # tmux - old_tmux + tmux + # old_tmux tmuxp pueue screen @@ -424,7 +425,7 @@ with pkgs; # stylua nasm deno # 用于 markdown 格式化 - opencode + # opencode # 还是用 curl 了安装了,这个迭代的太快了 # efm-langserver # 集成 shellcheck # lua-language-server From ebdcc7675aecaec01736c80e33e15b2cafaa3f94 Mon Sep 17 00:00:00 2001 From: Xueshi Hu Date: Wed, 11 Mar 2026 09:16:45 +0800 Subject: [PATCH 03/38] zellij : update config automatically Signed-off-by: Xueshi Hu --- config/zellij/config.kdl | 540 +++++++++++++++++++++++---------------- 1 file changed, 324 insertions(+), 216 deletions(-) diff --git a/config/zellij/config.kdl b/config/zellij/config.kdl index ad583c707..80dbf2858 100644 --- a/config/zellij/config.kdl +++ b/config/zellij/config.kdl @@ -1,243 +1,215 @@ -// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true" keybinds clear-defaults=true { - normal { - // uncomment this and adjust key if using copy_on_select=false - // bind "Alt c" { Copy; } - } locked { - bind "Ctrl g" { SwitchToMode "Normal"; } + bind "Ctrl g" { SwitchToMode "normal"; } } - pane { - bind "Ctrl b" { SwitchToMode "Normal"; } - bind "Tab" { SwitchFocus; } - bind "n" { NewPane; SwitchToMode "Normal"; } - bind "x" { CloseFocus; SwitchToMode "Normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "Normal"; } - bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;} - - bind "h" "Left" { Resize "Left"; } - bind "j" "Down" { Resize "Down"; } - bind "k" "Up" { Resize "Up"; } - bind "l" "Right" { Resize "Right"; } - bind "=" "+" { Resize "Increase"; } + bind "left" { Resize "Increase left"; } + bind "down" { Resize "Increase down"; } + bind "up" { Resize "Increase up"; } + bind "right" { Resize "Increase right"; } + bind "+" { Resize "Increase"; } bind "-" { Resize "Decrease"; } - + bind "=" { Resize "Increase"; } + bind "C" { SwitchToMode "renametab"; TabNameInput 0; } + bind "H" { MovePane "left"; } + bind "J" { MovePane "down"; } + bind "K" { MovePane "up"; } + bind "L" { MovePane "right"; } bind "N" { MovePane; } - bind "H" { MovePane "Left"; } - bind "J" { MovePane "Down"; } - bind "K" { MovePane "Up"; } - bind "L" { MovePane "Right"; } - - bind "C" { SwitchToMode "RenameTab"; TabNameInput 0; } + bind "Ctrl b" { SwitchToMode "normal"; } + bind "c" { SwitchToMode "renamepane"; PaneNameInput 0; } + bind "h" { Resize "Increase left"; } + bind "j" { Resize "Increase down"; } + bind "k" { Resize "Increase up"; } + bind "l" { Resize "Increase right"; } + bind "n" { NewPane; SwitchToMode "normal"; } bind "t" { ToggleTab; } + bind "x" { CloseFocus; SwitchToMode "normal"; } + bind "z" { TogglePaneFrames; SwitchToMode "normal"; } + bind "tab" { SwitchFocus; } } - - // scroll { - // // bind "Alt c" { Copy; } - // // uncomment this and adjust key if using copy_on_select=false - // bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - // bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } - // bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - // bind "Ctrl s" { SwitchToMode "Normal"; } - // bind "d" { HalfPageScrollDown; } - // bind "e" { EditScrollback; SwitchToMode "Normal"; } - // bind "j" "Down" { ScrollDown; } - // bind "k" "Up" { ScrollUp; } - // bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; } - // bind "u" { HalfPageScrollUp; } - // } - // search { - // bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - // bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } - // bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - // bind "Ctrl s" { SwitchToMode "Normal"; } - // bind "c" { SearchToggleOption "CaseSensitivity"; } - // bind "d" { HalfPageScrollDown; } - // bind "j" "Down" { ScrollDown; } - // bind "k" "Up" { ScrollUp; } - // bind "n" { Search "down"; } - // bind "o" { SearchToggleOption "WholeWord"; } - // bind "p" { Search "up"; } - // bind "u" { HalfPageScrollUp; } - // bind "w" { SearchToggleOption "Wrap"; } - // } - // entersearch { - // bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; } - // bind "Enter" { SwitchToMode "Search"; } - // } - renametab { - bind "Ctrl c" { SwitchToMode "Normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; } - } - renamepane { - bind "Ctrl c" { SwitchToMode "Normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; } - } - // session { - // bind "Ctrl o" { SwitchToMode "Normal"; } - // bind "Ctrl s" { SwitchToMode "Scroll"; } - // } - tmux { - bind "%" { NewPane "Right"; SwitchToMode "Normal"; } - bind "&" { CloseTab; SwitchToMode "Normal"; } - bind "," { SwitchToMode "RenameTab"; } - bind "Ctrl h" { Write 2; SwitchToMode "Normal"; } - bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; } - bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; } - bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; } - bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; } - bind "[" { SwitchToMode "Scroll"; } - bind "\"" { NewPane "Down"; SwitchToMode "Normal"; } - // bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;} - bind "c" { NewTab; SwitchToMode "Normal"; } - bind "d" { Detach; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; } - bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; } - bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; } - bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; } - bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; } - bind "n" { GoToNextTab; SwitchToMode "Normal"; } - bind "o" { FocusNextPane; } - bind "p" { GoToPreviousTab; SwitchToMode "Normal"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "x" { CloseFocus; } - bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; } + shared_except "locked" "tmux" { + bind "Ctrl h" { SwitchToMode "tmux"; } } shared_except "locked" { - bind "Ctrl s" { EditScrollback; SwitchToMode "Normal"; } - bind "Ctrl g" { ToggleFloatingPanes; SwitchToMode "Normal"; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" "Alt +" { Resize "Increase"; } + bind "Alt left" { MoveFocusOrTab "left"; } + bind "Alt down" { MoveFocus "down"; } + bind "Alt up" { MoveFocus "up"; } + bind "Alt right" { MoveFocusOrTab "right"; } + bind "Alt +" { Resize "Increase"; } bind "Alt -" { Resize "Decrease"; } - bind "Alt 1" { GoToTab 1; SwitchToMode "Normal"; } - bind "Alt 2" { GoToTab 2; SwitchToMode "Normal"; } - bind "Alt 3" { GoToTab 3; SwitchToMode "Normal"; } - bind "Alt 4" { GoToTab 4; SwitchToMode "Normal"; } - bind "Alt 5" { GoToTab 5; SwitchToMode "Normal"; } - bind "Alt 6" { GoToTab 6; SwitchToMode "Normal"; } - bind "Alt 7" { GoToTab 7; SwitchToMode "Normal"; } - bind "Alt 8" { GoToTab 8; SwitchToMode "Normal"; } - bind "Alt 9" { GoToTab 9; SwitchToMode "Normal"; } + bind "Alt 1" { GoToTab 1; SwitchToMode "normal"; } + bind "Alt 2" { GoToTab 2; SwitchToMode "normal"; } + bind "Alt 3" { GoToTab 3; SwitchToMode "normal"; } + bind "Alt 4" { GoToTab 4; SwitchToMode "normal"; } + bind "Alt 5" { GoToTab 5; SwitchToMode "normal"; } + bind "Alt 6" { GoToTab 6; SwitchToMode "normal"; } + bind "Alt 7" { GoToTab 7; SwitchToMode "normal"; } + bind "Alt 8" { GoToTab 8; SwitchToMode "normal"; } + bind "Alt 9" { GoToTab 9; SwitchToMode "normal"; } + bind "Alt =" { Resize "Increase"; } bind "Alt [" { PreviousSwapLayout; } bind "Alt ]" { NextSwapLayout; } + bind "Ctrl g" { ToggleFloatingPanes; SwitchToMode "normal"; } + bind "Alt h" { MoveFocusOrTab "left"; } + bind "Alt j" { MoveFocus "down"; } + bind "Alt k" { MoveFocus "up"; } + bind "Alt l" { MoveFocusOrTab "right"; } + bind "Ctrl s" { EditScrollback; SwitchToMode "normal"; } } shared_except "normal" "locked" { - bind "Enter" "Esc" { SwitchToMode "Normal"; } + bind "enter" { SwitchToMode "normal"; } } - // shared_except "pane" "locked" { - // bind "Ctrl b" { SwitchToMode "Pane"; } - // } - // shared_except "resize" "locked" { - // bind "Ctrl n" { SwitchToMode "Resize"; } - // } - // shared_except "scroll" "locked" { - // bind "Ctrl s" { SwitchToMode "Scroll"; } - // } - // shared_except "session" "locked" { - // bind "Ctrl o" { SwitchToMode "Session"; } - // } - // shared_except "tab" "locked" { - // bind "Ctrl l" { SwitchToMode "Tab"; } - // } - // shared_except "move" "locked" { - // bind "Ctrl b" { SwitchToMode "Move"; } - // } - shared_except "tmux" "locked" { - bind "Ctrl h" { SwitchToMode "Tmux"; } + shared_except "normal" "locked" "renametab" "renamepane" { + bind "esc" { SwitchToMode "normal"; } + } + renametab { + bind "esc" { UndoRenameTab; SwitchToMode "tab"; } + } + shared_among "renametab" "renamepane" { + bind "Ctrl c" { SwitchToMode "normal"; } + } + renamepane { + bind "esc" { UndoRenamePane; SwitchToMode "pane"; } + } + tmux { + bind "left" { MoveFocus "left"; SwitchToMode "normal"; } + bind "down" { MoveFocus "down"; SwitchToMode "normal"; } + bind "up" { MoveFocus "up"; SwitchToMode "normal"; } + bind "right" { MoveFocus "right"; SwitchToMode "normal"; } + bind "\"" { NewPane "down"; SwitchToMode "normal"; } + bind "%" { NewPane "right"; SwitchToMode "normal"; } + bind "&" { CloseTab; SwitchToMode "normal"; } + bind "," { SwitchToMode "renametab"; } + bind "[" { SwitchToMode "scroll"; } + bind "c" { NewTab; SwitchToMode "normal"; } + bind "d" { Detach; } + bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } + bind "h" { MoveFocus "left"; SwitchToMode "normal"; } + bind "Ctrl h" { Write 2; SwitchToMode "normal"; } + bind "j" { MoveFocus "down"; SwitchToMode "normal"; } + bind "k" { MoveFocus "up"; SwitchToMode "normal"; } + bind "l" { MoveFocus "right"; SwitchToMode "normal"; } + bind "n" { GoToNextTab; SwitchToMode "normal"; } + bind "o" { FocusNextPane; } + bind "p" { GoToPreviousTab; SwitchToMode "normal"; } + bind "r" { SwitchToMode "renametab"; TabNameInput 0; } + bind "x" { CloseFocus; } + bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } } } +// Plugin aliases - can be used to change the implementation of Zellij +// changing these requires a restart to take effect plugins { - tab-bar { path "tab-bar"; } - status-bar { path "status-bar"; } - compact-bar { path "compact-bar"; } + about location="zellij:about" + compact-bar location="zellij:compact-bar" + configuration location="zellij:configuration" + filepicker location="zellij:strider" { + cwd "/" + } + plugin-manager location="zellij:plugin-manager" + session-manager location="zellij:session-manager" + status-bar location="zellij:status-bar" + strider location="zellij:strider" + tab-bar location="zellij:tab-bar" + welcome-screen location="zellij:session-manager" { + welcome_screen true + } } -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed +// Plugins to load in the background when a new session starts +// eg. "file:/path/to/my-plugin.wasm" +// eg. "https://example.com/my-plugin.wasm" +load_plugins { +} +web_client { + font "monospace" +} + +// Use a simplified UI without special fonts (arrow glyphs) // Options: -// - detach (Default) -// - quit -// -// on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// +// - true +// - false (Default) +// // simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -// default_shell "fish" -// @todo 因为 arm 的原因,这个不行 -// default_shell "nu" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -pane_frames false - -// Define color themes for Zellij -// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes -// Once these themes are defined, one of them should to be selected in the "theme" section of this file -// -// themes { -// dracula { -// fg 248 248 242 -// bg 40 42 54 -// red 255 85 85 -// green 80 250 123 -// yellow 241 250 140 -// blue 98 114 164 -// magenta 255 121 198 -// orange 255 184 108 -// cyan 139 233 253 -// black 0 0 0 -// white 255 255 255 -// } -// } - + // Choose the theme that is specified in the themes section. // Default: default -// +// theme "solarized-dark" - -// The name of the default layout to load on startup -// Default: "default" -// -/* default_layout "compact" */ - -// Choose the mode that zellij uses when starting up. + +// Choose the base input mode of zellij. // Default: normal -// +// // default_mode "locked" - + +// Choose the path to the default shell that zellij will use for opening new panes +// Default: $SHELL +// +// default_shell "fish" + +// Choose the path to override cwd that zellij will use for opening new panes +// +// default_cwd "/tmp" + +// The name of the default layout to load on startup +// Default: "default" +// +// default_layout "compact" + +// The folder in which Zellij will look for layouts +// (Requires restart) +// +layout_dir "/home/martins3/.dotfiles/config/zellij/" + +// The folder in which Zellij will look for themes +// (Requires restart) +// +// theme_dir "/tmp" + // Toggle enabling the mouse mode. // On certain configurations, or terminals this could // potentially interfere with copying text. // Options: // - true (default) // - false -// +// // mouse_mode false - + +// Toggle having pane frames around the panes +// Options: +// - true (default, enabled) +// - false +// +pane_frames false + +// When attaching to an existing session with other users, +// should the session be mirrored (true) +// or should each user have their own cursor (false) +// (Requires restart) +// Default: false +// +// mirror_session true + +// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP +// eg. when terminal window with an active zellij session is closed +// (Requires restart) +// Options: +// - detach (Default) +// - quit +// +// on_force_close "quit" + // Configure the scroll back buffer size // This is the number of lines zellij stores for each pane in the scroll back // buffer. Excess number of lines are discarded in a FIFO fashion. +// (Requires restart) // Valid values: positive integers // Default value: 10000 -// +// // scroll_buffer_size 10000 - + // Provide a command to execute when copying text. The text will be piped to // the stdin of the program to perform the copy. This can be used with // terminal emulators which do not support the OSC 52 ANSI control sequence @@ -247,33 +219,169 @@ theme "solarized-dark" // copy_command "xclip -selection clipboard" // x11 // copy_command "wl-copy" // wayland // copy_command "pbcopy" // osx - +// +// copy_command "pbcopy" + // Choose the destination for copied text // Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. // Does not apply when using copy_command. // Options: // - system (default) // - primary -// +// // copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse + +// Enable automatic copying (and clearing) of selection when releasing mouse // Default: true -// -// copy_on_select false - +// +// copy_on_select true + // Path to the default editor to use to edit pane scrollbuffer // Default: $EDITOR or $VISUAL -// scrollback_editor "nvim" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) + +// A fixed name to always give the Zellij session. +// Consider also setting `attach_to_session true,` +// otherwise this will error if such a session exists. +// Default: +// +session_name "martins3 yyds" + +// When `session_name` is provided, attaches to that session +// if it is already running or creates it otherwise. // Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// -layout_dir "/home/martins3/.dotfiles/config/zellij/" +// +attach_to_session true + +// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible +// Options: +// - true (default) +// - false +// +// auto_layout false + +// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected +// Options: +// - true (default) +// - false +// +// session_serialization false + +// Whether pane viewports are serialized along with the session, default is false +// Options: +// - true +// - false (default) +// +// serialize_pane_viewport false + +// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0 +// defaults to the scrollback size. If this number is higher than the scrollback size, it will +// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true. +// +// scrollback_lines_to_serialize 10000 + +// Enable or disable the rendering of styled and colored underlines (undercurl). +// May need to be disabled for certain unsupported terminals +// (Requires restart) +// Default: true +// +// styled_underlines false + +// How often in seconds sessions are serialized +// +// serialization_interval 10000 + +// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know +// metadata info on this session) +// (Requires restart) +// Default: false +// +// disable_session_metadata false + +// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it) +// (Requires restart) +// Default: true (if the host terminal supports it) +// +// support_kitty_keyboard_protocol false +// Whether to make sure a local web server is running when a new Zellij session starts. +// This web server will allow creating new sessions and attaching to existing ones that have +// opted in to being shared in the browser. +// When enabled, navigate to http://127.0.0.1:8082 +// (Requires restart) +// +// Note: a local web server can still be manually started from within a Zellij session or from the CLI. +// If this is not desired, one can use a version of Zellij compiled without +// `web_server_capability` +// +// Possible values: +// - true +// - false +// Default: false +// +// web_server false +// Whether to allow sessions started in the terminal to be shared through a local web server, assuming one is +// running (see the `web_server` option for more details). +// (Requires restart) +// +// Note: This is an administrative separation and not intended as a security measure. +// +// Possible values: +// - "on" (allow web sharing through the local web server if it +// is online) +// - "off" (do not allow web sharing unless sessions explicitly opt-in to it) +// - "disabled" (do not allow web sharing and do not permit sessions started in the terminal to opt-in to it) +// Default: "off" +// +// web_sharing "off" +// A path to a certificate file to be used when setting up the web client to serve the +// connection over HTTPs +// +// web_server_cert "/path/to/cert.pem" +// A path to a key file to be used when setting up the web client to serve the +// connection over HTTPs +// +// web_server_key "/path/to/key.pem" +/// Whether to enforce https connections to the web server when it is bound to localhost +/// (127.0.0.0/8) +/// +/// Note: https is ALWAYS enforced when bound to non-local interfaces +/// +/// Default: false +// +// enforce_https_for_localhost false + +// Whether to stack panes when resizing beyond a certain size +// Default: true +// +// stacked_resize false + +// Whether to show tips on startup +// Default: true +// +show_startup_tips false + +// Whether to show release notes on first version run +// Default: true +// +// show_release_notes false + +// Whether to enable mouse hover effects and pane grouping functionality +// default is true +// advanced_mouse_actions false + +// The ip address the web server should listen on when it starts +// Default: "127.0.0.1" +// (Requires restart) +// web_server_ip "127.0.0.1" + +// The port the web server should listen on when it starts +// Default: 8082 +// (Requires restart) +// web_server_port 8082 + +// A command to run (will be wrapped with sh -c and provided the RESURRECT_COMMAND env variable) +// after Zellij attempts to discover a command inside a pane when resurrecting sessions, the STDOUT +// of this command will be used instead of the discovered RESURRECT_COMMAND +// can be useful for removing wrappers around commands +// Note: be sure to escape backslashes and similar characters properly +// post_command_discovery_hook "echo $RESURRECT_COMMAND | sed " From 7c9c6613474961f748e2045bf8c2eb9db14776ae Mon Sep 17 00:00:00 2001 From: Xueshi Hu Date: Wed, 11 Mar 2026 09:17:09 +0800 Subject: [PATCH 04/38] fix trim.sh location Signed-off-by: Xueshi Hu --- nvim/lua/usr/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvim/lua/usr/util.lua b/nvim/lua/usr/util.lua index 9ba4e0e65..82eabc6d8 100644 --- a/nvim/lua/usr/util.lua +++ b/nvim/lua/usr/util.lua @@ -108,7 +108,7 @@ function ProcessClipboard() end local project = "/home/martins3/data/vn" - local script_path = project .. "/code/qemu/trim.sh" + local script_path = project .. "/alpine/trim.sh" if vim.fn.filereadable(script_path) == 1 then vim.fn.system(script_path) else From 2ab3c732e7e95499cf19317bd1bdd6e2a9d57504 Mon Sep 17 00:00:00 2001 From: Xueshi Hu Date: Fri, 13 Mar 2026 14:52:28 +0800 Subject: [PATCH 05/38] update Signed-off-by: Xueshi Hu --- nixpkgs/home/tools.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixpkgs/home/tools.nix b/nixpkgs/home/tools.nix index 14ed1b473..c5c6c4a02 100644 --- a/nixpkgs/home/tools.nix +++ b/nixpkgs/home/tools.nix @@ -67,16 +67,15 @@ with pkgs; # 文件浏览器 # xplr - pass # wireguard 作者维护的密码管理工具 + # pass # wireguard 作者维护的密码管理工具 # TODO virt-customize -a bionic-server-cloudimg-amd64.img --root-password password: # libguestfs # libguestfs-appliance # cloud-utils # adoptopenjdk-icedtea-web # 用于打开 impi jnlp 文件 # minicom - typos # 检查代码中 typo + # typos # 检查代码中 typo ,不过 LLM 似乎做的更好? # typst # latex 替代品 - cargo cmake # ov # feature rich pager # zig @@ -84,8 +83,8 @@ with pkgs; termshark dnsmasq # audit # 没啥意义,用不起来 - tmux - # old_tmux + # tmux + old_tmux tmuxp pueue screen @@ -413,6 +412,7 @@ with pkgs; # lsp && formatter black # python formatter + cargo # 似乎不需要在这里安装 rust 的工具 # rust-analyzer # rustfmt From 3bdd198dadee7413730a4eb29cb25a02f362540c Mon Sep 17 00:00:00 2001 From: Xueshi Hu Date: Sat, 14 Mar 2026 07:36:10 +0800 Subject: [PATCH 06/38] disable fs watcher Signed-off-by: Xueshi Hu --- nvim/lua/usr/nvim-tree.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nvim/lua/usr/nvim-tree.lua b/nvim/lua/usr/nvim-tree.lua index ca8325541..07cff6758 100644 --- a/nvim/lua/usr/nvim-tree.lua +++ b/nvim/lua/usr/nvim-tree.lua @@ -29,6 +29,9 @@ require("nvim-tree").setup({ side = "right", }, on_attach = on_attach, + filesystem_watchers = { + enable = false, + }, actions = { open_file = { quit_on_open = false, From 431b6e7468ce028c17cc47df3ee34aa5c2fcd3fa Mon Sep 17 00:00:00 2001 From: Xueshi Hu Date: Tue, 17 Mar 2026 08:56:15 +0800 Subject: [PATCH 07/38] update Signed-off-by: Xueshi Hu --- docs/nvim-advantace.md | 33 +++++++++++++++++++++++++++++++++ docs/tmux.md | 11 ----------- nvim/lua/usr/init.lua | 13 +++++++++++++ 3 files changed, 46 insertions(+), 11 deletions(-) diff --git a/docs/nvim-advantace.md b/docs/nvim-advantace.md index 2378a854e..70f5499aa 100644 --- a/docs/nvim-advantace.md +++ b/docs/nvim-advantace.md @@ -325,3 +325,36 @@ rachartier/tiny-inline-diagnostic.nvim ## tree-sitter 类似的? https://ast-grep.github.io/ + +## 这个拷贝始终没搞懂 +- 有时候,nvim 报告 Clipboard 是 tmux,但是实际上下面的才是正确的 +```txt +## Clipboard (optional) + - OK: Clipboard tool found: xclip +``` +- 登录远程终端,在远程终端中使用 clear 或者 vim 的时候遇到 +```txt +'tmux-256color': unknown terminal type. +``` +https://unix.stackexchange.com/questions/574669/clearing-tmux-terminal-throws-error-tmux-256color-unknown-terminal-type + +配置了: +```lua + vim.g.clipboard = { + name = 'SSH OSC52', + copy = { + ['+'] = require('vim.ui.clipboard.osc52').copy('+'), + ['*'] = require('vim.ui.clipboard.osc52').copy('*'), + }, + paste = { + ['+'] = function() return vim.fn.getreg('+') end, + ['*'] = function() return vim.fn.getreg('*') end, + }, + } +``` +其 provider 修改为: +```txt +Clipboard (optional) ~ +- ✅ OK Clipboard tool found: SSH OSC52 +``` +这个结果之后,在任何环境中都可以复制了。 diff --git a/docs/tmux.md b/docs/tmux.md index 56cc856f1..d58f83482 100644 --- a/docs/tmux.md +++ b/docs/tmux.md @@ -99,17 +99,6 @@ set -g pane-border-format " [ ###P #T ] " bind T command-prompt -p "Set Pane title:" "select-pane -T '%1'" ``` -## 最近遇到的 tmux 问题 -- 有时候,nvim 报告 Clipboard 是 tmux,但是实际上下面的才是正确的 -```txt -## Clipboard (optional) - - OK: Clipboard tool found: xclip -``` -- 登录远程终端,在远程终端中使用 clear 或者 vim 的时候遇到 -```txt -'tmux-256color': unknown terminal type. -``` -https://unix.stackexchange.com/questions/574669/clearing-tmux-terminal-throws-error-tmux-256color-unknown-terminal-type ## 一些试错 diff --git a/nvim/lua/usr/init.lua b/nvim/lua/usr/init.lua index da95ef04d..6ce26d3fe 100644 --- a/nvim/lua/usr/init.lua +++ b/nvim/lua/usr/init.lua @@ -55,3 +55,16 @@ require("persisted").setup({ require('gitsigns').setup { current_line_blame = true, } + +-- ssh 到远端,neovim 可以拷贝到本地 +vim.g.clipboard = { + name = 'SSH OSC52', + copy = { + ['+'] = require('vim.ui.clipboard.osc52').copy('+'), + ['*'] = require('vim.ui.clipboard.osc52').copy('*'), + }, + paste = { + ['+'] = function() return vim.fn.getreg('+') end, + ['*'] = function() return vim.fn.getreg('*') end, + }, +} From aee8f6630e774262688197f612171c30c5a4014d Mon Sep 17 00:00:00 2001 From: Xueshi Hu Date: Thu, 19 Mar 2026 09:03:50 +0800 Subject: [PATCH 08/38] =?UTF-8?q?=E7=BB=88=E4=BA=8E=E8=A7=A3=E5=86=B3=20vi?= =?UTF-8?q?m=20=E5=85=89=E6=A0=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Xueshi Hu --- nvim/lua/usr/mason.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nvim/lua/usr/mason.lua b/nvim/lua/usr/mason.lua index 4c46c2f7f..692003950 100644 --- a/nvim/lua/usr/mason.lua +++ b/nvim/lua/usr/mason.lua @@ -31,9 +31,14 @@ vim.lsp.enable({ 'ccls', 'nixd' }) -- vim.o.winborder = 'rounded' vim.diagnostic.config({ - -- virtual_lines 造成了巨大的视觉干扰,还是 virtual_text 好用 - -- virtual_lines = { current_line = true, }, - virtual_text = { current_line = true, }, + virtual_text = false, -- 关闭右侧文字,只保留悬浮窗 + signs = true, -- 左侧图标保留 + float = { border = 'rounded' }, +}) + +-- 光标停留时自动显示诊断 +vim.api.nvim_create_autocmd('CursorHold', { + callback = function() vim.diagnostic.open_float(nil, { focusable = false }) end, }) local map = vim.keymap.set From e6d1993923fa58acbc200e6e02ab478c4824aa46 Mon Sep 17 00:00:00 2001 From: Xueshi Hu Date: Thu, 19 Mar 2026 18:53:58 +0800 Subject: [PATCH 09/38] sign ! Signed-off-by: Xueshi Hu --- nvim/lua/usr/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/nvim/lua/usr/init.lua b/nvim/lua/usr/init.lua index 6ce26d3fe..fa7609f83 100644 --- a/nvim/lua/usr/init.lua +++ b/nvim/lua/usr/init.lua @@ -57,6 +57,7 @@ require('gitsigns').setup { } -- ssh 到远端,neovim 可以拷贝到本地 +-- FIXME 真的是按下了葫芦起了瓢,现在 ProcessClipboard 不能用了,我靠 vim.g.clipboard = { name = 'SSH OSC52', copy = { From 116be391fac7d344b7c0db13147ce660352fbf4d Mon Sep 17 00:00:00 2001 From: Xueshi Hu Date: Mon, 23 Mar 2026 14:47:29 +0800 Subject: [PATCH 10/38] terminals ! Signed-off-by: Xueshi Hu --- docs/terminals.md | 6 +++++- readme.md | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/terminals.md b/docs/terminals.md index a0c268b77..b1169203e 100644 --- a/docs/terminals.md +++ b/docs/terminals.md @@ -89,7 +89,7 @@ Alacritty 的优点: 那么就立刻换另外一个。 ## 总结 -目前,我推荐的 terminal 是: +如果是在 Linux 下,目前,我推荐的 terminal 是: - kitty - wezterm - alacritty @@ -97,6 +97,10 @@ Alacritty 的优点: 虽然 kitty 很大一部分代码是 Python,但是我估计只是用于控制面的,其性能用 [terminal-benchmark](https://github.com/Dica-Developer/terminal-benchmark) 测试,无明显差距。 +如果在 windows 下,Windows terminal 基本上是唯一的选择了。 + +此外,由于精力有限,ghostty 之类的新秀(2026-03-23) ,广受好评,但是我并没有体验。 +