From a20b1deb2b1800aea3f4a0264e3ebdf757bcda8c Mon Sep 17 00:00:00 2001 From: gillchristian Date: Wed, 31 Aug 2022 11:15:12 +0200 Subject: [PATCH] Add tool/tool.toml --- notes.md | 3 ++- tool/tool.toml | 11 +++++++++++ zsh/functions.zsh | 25 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tool/tool.toml diff --git a/notes.md b/notes.md index 14aa6ba..be03585 100644 --- a/notes.md +++ b/notes.md @@ -8,5 +8,6 @@ Things missing - [ ] antibody installation (installs in the current dir, on ./bin) - [ ] purs installation - [ ] PureScript installation -- [ ] Nix installation (Neuron?) +- [ ] Nix installation? - [ ] Cleanup of things that aren't used anymore (k8s, minikube, etc) +- [ ] `tool-sync` installation and link of config file diff --git a/tool/tool.toml b/tool/tool.toml new file mode 100644 index 0000000..9eab538 --- /dev/null +++ b/tool/tool.toml @@ -0,0 +1,11 @@ +store_directory = "~/.local/bin" + +[bat] +[difftastic] +[exa] +[fd] +[ripgrep] + +# TODO: xD +# https://github.com/dalance/amber +# https://github.com/brigand/glint diff --git a/zsh/functions.zsh b/zsh/functions.zsh index cf290fa..1d212c4 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -223,3 +223,28 @@ function denv { ;; esac } + +# Sym links made easier +function slink { + if [ "$1" = "--help" ]; then + echo 'Usage' + echo '$ link "/full/origin/path" "/full/target/path"' + echo '' + echo 'Example:' + echo '$ link "$DOTFILES_DIR/tool/tool.toml" ~/.tool.toml' + else + if [[ -e "$2" ]]; then + echo "$2 already exists, if it is a symlink it will be deleted" + if [[ -h "$2" ]]; then + rm -rf "$2" + ln -s $1 $2 + else + echo "Not a symlink, renaming and linking" + mv -f "$2" "$2_old" + ln -s $1 $2 + fi + else + ln -s $1 $2 + fi + fi +}