From e22ed98726b96e16ef963faaa9d168a646ec135a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 20 Apr 2025 13:12:14 +0300 Subject: fix --- dotfiles/fish/conf.d/alternatives.fish | 21 +++++++++++++++++++++ dotfiles/fish/conf.d/editor.fish | 15 --------------- 2 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 dotfiles/fish/conf.d/alternatives.fish diff --git a/dotfiles/fish/conf.d/alternatives.fish b/dotfiles/fish/conf.d/alternatives.fish new file mode 100644 index 0000000..ddf2cc8 --- /dev/null +++ b/dotfiles/fish/conf.d/alternatives.fish @@ -0,0 +1,21 @@ +function alternatives::init + if type -q bat + alias Cat=/usr/bin/cat + alias cat=bat + end + if type -q see + alias ca=see + end + if type -q bit + alias Git=/usr/bin/git + alias git=bit + end + if type -q procs + alias p='procs' + end + if type -q zoxide + zoxide init fish | source + end +end + +alternatives::init diff --git a/dotfiles/fish/conf.d/editor.fish b/dotfiles/fish/conf.d/editor.fish index ae3e77b..59c91df 100644 --- a/dotfiles/fish/conf.d/editor.fish +++ b/dotfiles/fish/conf.d/editor.fish @@ -5,17 +5,6 @@ set -gx HELIX_CONFIG_DIR $HOME/.config/helix set -gx COPILOT_MODEL gpt-4o set -gx HANDLER copilot -function editor::helix::theme::get_random - echo not yet implemented -end - -function editor::helix::theme::set - set -l theme $argv[1] - set -l config_file $HELIX_CONFIG_DIR/config.toml - # sed "/^theme =/ { s/.*/theme = \"$theme\"/; }" $config_file >$config_file.tmp - mv $config_file.tmp $config_file -end - function editor::helix::open_with_lock set -l file $argv[1] set -l lock "$file.lock" @@ -38,9 +27,5 @@ function editor::helix::edit::remote hx $local_path end -if test -f $HELIX_CONFIG_DIR/config.toml - # editor::helix::theme::set (editor::helix::theme::get_random) -end - abbr -a hxl 'editor::helix::open_with_lock' abbr -a rhx 'editor::helix::edit::remote' -- cgit v1.2.3