From 9c57c14d0060b5b9e8af93e0613fd35fa4ea3294 Mon Sep 17 00:00:00 2001 From: KaasKop- Date: Mon, 25 Dec 2023 13:02:39 +0100 Subject: [PATCH] updates --- config/fish/completions/fisher.fish | 7 + config/fish/config.fish | 3 + config/fish/fish_plugins | 2 + config/fish/fish_variables | 48 ++++ config/fish/functions/df.fish | 7 + config/fish/functions/du.fish | 7 + config/fish/functions/fish_prompt.fish | 90 +++++++ config/fish/functions/fish_right_prompt.fish | 3 + config/fish/functions/fisher.fish | 240 +++++++++++++++++++ config/fish/functions/h.fish | 7 + config/fish/functions/sshnas.fish | 4 + config/fish/functions/sshvps.fish | 4 + config/fish/functions/ssr.fish | 4 + config/fish/functions/sss.fish | 4 + config/fish/functions/theme_gruvbox.fish | 141 +++++++++++ config/nvim/lazy-lock.json | 10 +- config/nvim/lua/config/options.lua | 1 + config/nvim/lua/plugins/lazyvim.lua | 9 + config/nvim/lua/plugins/leap-nvim.lua | 4 + config/nvim/lua/plugins/neo-tree.lua | 9 + config/nvim/lua/plugins/nvim-treesitter.lua | 29 +++ install.sh | 28 +++ 22 files changed, 656 insertions(+), 5 deletions(-) create mode 100644 config/fish/completions/fisher.fish create mode 100644 config/fish/config.fish create mode 100644 config/fish/fish_plugins create mode 100644 config/fish/fish_variables create mode 100644 config/fish/functions/df.fish create mode 100644 config/fish/functions/du.fish create mode 100644 config/fish/functions/fish_prompt.fish create mode 100644 config/fish/functions/fish_right_prompt.fish create mode 100644 config/fish/functions/fisher.fish create mode 100644 config/fish/functions/h.fish create mode 100644 config/fish/functions/sshnas.fish create mode 100644 config/fish/functions/sshvps.fish create mode 100644 config/fish/functions/ssr.fish create mode 100644 config/fish/functions/sss.fish create mode 100644 config/fish/functions/theme_gruvbox.fish create mode 100644 config/nvim/lua/plugins/lazyvim.lua create mode 100644 config/nvim/lua/plugins/leap-nvim.lua create mode 100644 config/nvim/lua/plugins/neo-tree.lua create mode 100644 config/nvim/lua/plugins/nvim-treesitter.lua create mode 100755 install.sh diff --git a/config/fish/completions/fisher.fish b/config/fish/completions/fisher.fish new file mode 100644 index 0000000..6d23ce4 --- /dev/null +++ b/config/fish/completions/fisher.fish @@ -0,0 +1,7 @@ +complete --command fisher --exclusive --long help --description "Print help" +complete --command fisher --exclusive --long version --description "Print version" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" +complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" diff --git a/config/fish/config.fish b/config/fish/config.fish new file mode 100644 index 0000000..d714361 --- /dev/null +++ b/config/fish/config.fish @@ -0,0 +1,3 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end diff --git a/config/fish/fish_plugins b/config/fish/fish_plugins new file mode 100644 index 0000000..54f49bf --- /dev/null +++ b/config/fish/fish_plugins @@ -0,0 +1,2 @@ +jorgebucaran/fisher +jomik/fish-gruvbox diff --git a/config/fish/fish_variables b/config/fish/fish_variables new file mode 100644 index 0000000..b199b1a --- /dev/null +++ b/config/fish/fish_variables @@ -0,0 +1,48 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR EDITOR:nvim +SETUVAR __fish_initialized:3400 +SETUVAR _fisher_jomik_2F_fish_2D_gruvbox_files:\x7e/\x2econfig/fish/functions/theme_gruvbox\x2efish +SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish +SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejomik/fish\x2dgruvbox +SETUVAR _fisher_upgraded_to_4_4:\x1d +SETUVAR fish_color_autosuggestion:585858 +SETUVAR fish_color_cancel:\x2d\x2dreverse +SETUVAR fish_color_command:a1b56c +SETUVAR fish_color_comment:f7ca88 +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:ba8baf +SETUVAR fish_color_error:ab4642 +SETUVAR fish_color_escape:86c1b9 +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:\x1d +SETUVAR fish_color_keyword:\x1d +SETUVAR fish_color_match:7cafc2 +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:7cafc2 +SETUVAR fish_color_option:\x1d +SETUVAR fish_color_param:d8d8d8 +SETUVAR fish_color_quote:f7ca88 +SETUVAR fish_color_redirection:d8d8d8 +SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_greeting:\x1d +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_background:\x1d +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:B3A06D +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_secondary_background:\x1d +SETUVAR fish_pager_color_secondary_completion:\x1d +SETUVAR fish_pager_color_secondary_description:\x1d +SETUVAR fish_pager_color_secondary_prefix:\x1d +SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dbrblack +SETUVAR fish_pager_color_selected_completion:\x1d +SETUVAR fish_pager_color_selected_description:\x1d +SETUVAR fish_pager_color_selected_prefix:\x1d diff --git a/config/fish/functions/df.fish b/config/fish/functions/df.fish new file mode 100644 index 0000000..ef8295a --- /dev/null +++ b/config/fish/functions/df.fish @@ -0,0 +1,7 @@ +function df --wraps=duf --description 'alias to duf. If duf not present executes df.' + if type -q -f duf + duf $argv + else + df $argv + end +end diff --git a/config/fish/functions/du.fish b/config/fish/functions/du.fish new file mode 100644 index 0000000..2245f9d --- /dev/null +++ b/config/fish/functions/du.fish @@ -0,0 +1,7 @@ +function du --wraps=dust --description 'alias to dust If dust not present executes du' + if type -q -f dust + dust $argv + else + du $argv + end +end diff --git a/config/fish/functions/fish_prompt.fish b/config/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..493199f --- /dev/null +++ b/config/fish/functions/fish_prompt.fish @@ -0,0 +1,90 @@ +function fish_prompt + set -l __last_command_exit_status $status + + if not set -q -g __fish_arrow_functions_defined + set -g __fish_arrow_functions_defined + function _git_branch_name + set -l branch (git symbolic-ref --quiet HEAD 2>/dev/null) + if set -q branch[1] + echo (string replace -r '^refs/heads/' '' $branch) + else + echo (git rev-parse --short HEAD 2>/dev/null) + end + end + + function _is_git_dirty + not command git diff-index --cached --quiet HEAD -- &>/dev/null + or not command git diff --no-ext-diff --quiet --exit-code &>/dev/null + end + + function _is_git_repo + type -q git + or return 1 + git rev-parse --git-dir >/dev/null 2>&1 + end + + function _hg_branch_name + echo (hg branch 2>/dev/null) + end + + function _is_hg_dirty + set -l stat (hg status -mard 2>/dev/null) + test -n "$stat" + end + + function _is_hg_repo + fish_print_hg_root >/dev/null + end + + function _repo_branch_name + _$argv[1]_branch_name + end + + function _is_repo_dirty + _is_$argv[1]_dirty + end + + function _repo_type + if _is_hg_repo + echo hg + return 0 + else if _is_git_repo + echo git + return 0 + end + return 1 + end + end + + set -l cyan (set_color -o cyan) + set -l yellow (set_color -o yellow) + set -l red (set_color -o red) + set -l green (set_color -o green) + set -l blue (set_color -o blue) + set -l normal (set_color normal) + + set -l arrow_color "$green" + if test $__last_command_exit_status != 0 + set arrow_color "$red" + end + + set -l arrow "$arrow_color➜ " + if fish_is_root_user + set arrow "$arrow_color# " + end + + set -l cwd $cyan(basename (prompt_pwd)) + + set -l repo_info + if set -l repo_type (_repo_type) + set -l repo_branch $red(_repo_branch_name $repo_type) + set repo_info "$blue $repo_type:($repo_branch$blue)" + + if _is_repo_dirty $repo_type + set -l dirty "$yellow ✗" + set repo_info "$repo_info$dirty" + end + end + + echo -n -s $arrow ' ' (prompt_login) ' ' $cwd $repo_info $normal ' ' +end diff --git a/config/fish/functions/fish_right_prompt.fish b/config/fish/functions/fish_right_prompt.fish new file mode 100644 index 0000000..b3aa11c --- /dev/null +++ b/config/fish/functions/fish_right_prompt.fish @@ -0,0 +1,3 @@ +function fish_right_prompt + echo $status +end diff --git a/config/fish/functions/fisher.fish b/config/fish/functions/fisher.fish new file mode 100644 index 0000000..b1513d3 --- /dev/null +++ b/config/fish/functions/fisher.fish @@ -0,0 +1,240 @@ +function fisher --argument-names cmd --description "A plugin manager for Fish" + set --query fisher_path || set --local fisher_path $__fish_config_dir + set --local fisher_version 4.4.4 + set --local fish_plugins $__fish_config_dir/fish_plugins + + switch "$cmd" + case -v --version + echo "fisher, version $fisher_version" + case "" -h --help + echo "Usage: fisher install Install plugins" + echo " fisher remove Remove installed plugins" + echo " fisher update Update installed plugins" + echo " fisher update Update all installed plugins" + echo " fisher list [] List installed plugins matching regex" + echo "Options:" + echo " -v, --version Print version" + echo " -h, --help Print this help message" + echo "Variables:" + echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~ + case ls list + string match --entire --regex -- "$argv[2]" $_fisher_plugins + case install update remove + isatty || read --local --null --array stdin && set --append argv $stdin + + set --local install_plugins + set --local update_plugins + set --local remove_plugins + set --local arg_plugins $argv[2..-1] + set --local old_plugins $_fisher_plugins + set --local new_plugins + + test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins) + + if ! set --query argv[2] + if test "$cmd" != update + echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1 + else if ! set --query file_plugins + echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1 + end + set arg_plugins $file_plugins + end + + for plugin in $arg_plugins + set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin) + contains -- "$plugin" $new_plugins || set --append new_plugins $plugin + end + + if set --query argv[2] + for plugin in $new_plugins + if contains -- "$plugin" $old_plugins + test "$cmd" = remove && + set --append remove_plugins $plugin || + set --append update_plugins $plugin + else if test "$cmd" = install + set --append install_plugins $plugin + else + echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1 + end + end + else + for plugin in $new_plugins + contains -- "$plugin" $old_plugins && + set --append update_plugins $plugin || + set --append install_plugins $plugin + end + + for plugin in $old_plugins + contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin + end + end + + set --local pid_list + set --local source_plugins + set --local fetch_plugins $update_plugins $install_plugins + set --local fish_path (status fish-path) + + echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal) + + for plugin in $fetch_plugins + set --local source (command mktemp -d) + set --append source_plugins $source + + command mkdir -p $source/{completions,conf.d,themes,functions} + + $fish_path --command " + if test -e $plugin + command cp -Rf $plugin/* $source + else + set temp (command mktemp -d) + set repo (string split -- \@ $plugin) || set repo[2] HEAD + + if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1]) + set name (string split -- / \$path)[-1] + set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz + else + set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2] + end + + echo Fetching (set_color --underline)\$url(set_color normal) + + if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null + command cp -Rf \$temp/*/* $source + else + echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2 + command rm -rf $source + end + + command rm -rf \$temp + end + + set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files + " & + + set --append pid_list (jobs --last --pid) + end + + wait $pid_list 2>/dev/null + + for plugin in $fetch_plugins + if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source + if set --local index (contains --index -- "$plugin" $install_plugins) + set --erase install_plugins[$index] + else + set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)] + end + end + end + + for plugin in $update_plugins $remove_plugins + if set --local index (contains --index -- "$plugin" $_fisher_plugins) + set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files + + if contains -- "$plugin" $remove_plugins + for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var) + emit {$name}_uninstall + end + printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~ + set --erase _fisher_plugins[$index] + end + + command rm -rf (string replace -- \~ ~ $$plugin_files_var) + + functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var) + + for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var) + complete --erase --command $name + end + + set --erase $plugin_files_var + end + end + + if set --query update_plugins[1] || set --query install_plugins[1] + command mkdir -p $fisher_path/{functions,themes,conf.d,completions} + end + + for plugin in $update_plugins $install_plugins + set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] + set --local files $source/{functions,themes,conf.d,completions}/* + + if set --local index (contains --index -- $plugin $install_plugins) + set --local user_files $fisher_path/{functions,themes,conf.d,completions}/* + set --local conflict_files + + for file in (string replace -- $source/ $fisher_path/ $files) + contains -- $file $user_files && set --append conflict_files $file + end + + if set --query conflict_files[1] && set --erase install_plugins[$index] + echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2 + continue + end + end + + for file in (string replace -- $source/ "" $files) + command cp -RLf $source/$file $fisher_path/$file + end + + set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files + + set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~) + + contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin + contains -- $plugin $install_plugins && set --local event install || set --local event update + + printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~ + + for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~) + source $file + if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file) + emit {$name}_$event + end + end + end + + command rm -rf $source_plugins + + if set --query _fisher_plugins[1] + set --local commit_plugins + + for plugin in $file_plugins + contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin + end + + for plugin in $_fisher_plugins + contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin + end + + printf "%s\n" $commit_plugins >$fish_plugins + else + set --erase _fisher_plugins + command rm -f $fish_plugins + end + + set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins) + + test "$total" != "0 0 0" && echo (string join ", " ( + test $total[1] = 0 || echo "Installed $total[1]") ( + test $total[2] = 0 || echo "Updated $total[2]") ( + test $total[3] = 0 || echo "Removed $total[3]") + ) plugin/s + case \* + echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1 + end +end + +if ! set --query _fisher_upgraded_to_4_4 + set --universal _fisher_upgraded_to_4_4 + if functions --query _fisher_list + set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share + command rm -rf $XDG_DATA_HOME/fisher + functions --erase _fisher_{list,plugin_parse} + fisher update >/dev/null 2>/dev/null + else + for var in (set --names | string match --entire --regex '^_fisher_.+_files$') + set $var (string replace -- ~ \~ $$var) + end + functions --erase _fisher_fish_postexec + end +end diff --git a/config/fish/functions/h.fish b/config/fish/functions/h.fish new file mode 100644 index 0000000..426b53f --- /dev/null +++ b/config/fish/functions/h.fish @@ -0,0 +1,7 @@ +function h --wraps='ls -lah --group-directories-first' --description 'alias h=ls -lah' + run +end + +function run + ls -lah --group-directories-first $argv +end diff --git a/config/fish/functions/sshnas.fish b/config/fish/functions/sshnas.fish new file mode 100644 index 0000000..af0d6d7 --- /dev/null +++ b/config/fish/functions/sshnas.fish @@ -0,0 +1,4 @@ +function sshnas --wraps='ssh nas@192.168.1.2' --description 'alias sshnas=ssh nas@192.168.1.2' + ssh nas@192.168.1.2 $argv + +end diff --git a/config/fish/functions/sshvps.fish b/config/fish/functions/sshvps.fish new file mode 100644 index 0000000..5108072 --- /dev/null +++ b/config/fish/functions/sshvps.fish @@ -0,0 +1,4 @@ +function sshvps --wraps='ssh vps@vanhamburg.net' --description 'alias sshvps=ssh vps@vanhamburg.net' + ssh vps@vanhamburg.net $argv + +end diff --git a/config/fish/functions/ssr.fish b/config/fish/functions/ssr.fish new file mode 100644 index 0000000..94d712f --- /dev/null +++ b/config/fish/functions/ssr.fish @@ -0,0 +1,4 @@ +function ssr --wraps='sudo systemctl restart' --description 'alias ssr=sudo systemctl restart' + sudo systemctl restart $argv + +end diff --git a/config/fish/functions/sss.fish b/config/fish/functions/sss.fish new file mode 100644 index 0000000..b2d6aba --- /dev/null +++ b/config/fish/functions/sss.fish @@ -0,0 +1,4 @@ +function sss --wraps='sudo systemctl status' --description 'alias sss=sudo systemctl status' + sudo systemctl status $argv + +end diff --git a/config/fish/functions/theme_gruvbox.fish b/config/fish/functions/theme_gruvbox.fish new file mode 100644 index 0000000..58a3cf2 --- /dev/null +++ b/config/fish/functions/theme_gruvbox.fish @@ -0,0 +1,141 @@ +#!/usr/bin/fish +function theme_gruvbox --description 'Apply gruvbox theme' + set -l mode 'light' + if test (count $argv) -gt 0 + set mode $argv[1] + end + + set -g contrast 'medium' + if test (count $argv) -gt 1 + set contrast $argv[2] + end + + switch $contrast + case 'soft' + case 'medium' + case 'hard' + case '*' + set_color $fish_color_error + echo 'Unknown contrast $contrast, choose soft, medium or hard' + set_color $fish_color_normal + return 1 + end + + switch $mode + case 'light' + __theme_gruvbox_base + __theme_gruvbox_light + case 'dark' + __theme_gruvbox_base + __theme_gruvbox_dark + case '*' + set_color $fish_color_error + echo 'Unknown mode $mode, choose light or dark' + set_color $fish_color_normal + return 1 + end + __theme_gruvbox_palette + return 0 +end + +function __theme_gruvbox_base + __printf_color 1 'cc/24/1d' + __printf_color 2 '98/97/1a' + __printf_color 3 'd7/99/21' + __printf_color 4 '45/85/88' + __printf_color 5 'b1/62/86' + __printf_color 6 '68/9d/6a' +end + +function __theme_gruvbox_light + set -l bg 'fb/f1/c7' + switch $contrast + case "soft" + set bg 'f2/e5/bc' + case "hard" + set bg 'f9/f5/d7' + end + command printf "\033]11;rgb:$bg\007" + + set -l fg '3c/38/36' + command printf "\033]10;rgb:$fg\007" + + __printf_color 0 $bg + __printf_color 7 '7c/6f/64' + __printf_color 8 '92/83/74' + __printf_color 9 '9d/00/06' + __printf_color 10 '79/74/0e' + __printf_color 11 'b5/76/14' + __printf_color 12 '07/66/78' + __printf_color 13 '8f/3f/71' + __printf_color 14 '42/7b/58' + __printf_color 15 $fg +end + +function __theme_gruvbox_dark + set -l bg '28/28/28' + switch $contrast + case "soft" + set bg '32/30/2f' + case "hard" + set bg '1d/20/21' + end + command printf "\033]11;rgb:$bg\007" + + set -l fg 'eb/db/b2' + command printf "\033]10;rgb:$fg\007" + + __printf_color 0 $bg + __printf_color 7 'a8/99/84' + __printf_color 8 '92/83/74' + __printf_color 9 'fb/59/34' + __printf_color 10 'b8/bb/26' + __printf_color 11 'fa/bd/2f' + __printf_color 12 '83/a5/98' + __printf_color 13 'd3/86/9b' + __printf_color 14 '8e/c0/7c' + __printf_color 15 $fg +end + +function __theme_gruvbox_palette + __printf_color 236 '32/30/2f' + __printf_color 234 '1d/20/21' + + __printf_color 235 '28/28/28' + __printf_color 237 '3c/38/36' + __printf_color 239 '50/49/45' + __printf_color 241 '66/5c/54' + __printf_color 243 '7c/6f/64' + + __printf_color 244 '92/83/74' + __printf_color 245 '92/83/74' + + __printf_color 228 'f2/e5/bc' + __printf_color 230 'f9/f5/d7' + + __printf_color 229 'fb/f1/c7' + __printf_color 223 'eb/db/b2' + __printf_color 250 'd5/c4/a1' + __printf_color 248 'bd/ae/93' + __printf_color 246 'a8/99/84' + + __printf_color 167 'fb/49/34' + __printf_color 142 'b8/bb/26' + __printf_color 214 'fa/bd/2f' + __printf_color 109 '83/a5/98' + __printf_color 175 'd3/86/9b' + __printf_color 108 '8e/c0/7c' + __printf_color 208 'fe/80/19' + + __printf_color 88 '9d/00/06' + __printf_color 100 '79/74/0e' + __printf_color 136 'b5/76/14' + __printf_color 24 '07/66/78' + __printf_color 96 '8f/3f/71' + __printf_color 66 '42/7b/58' + __printf_color 130 'af/3a/03' +end + +function __printf_color + command printf "\033]4;$argv[1];rgb:$argv[2]\007" +end diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index cc28ce0..91de2dc 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -7,14 +7,14 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "8b407bb6175846cdc4c499e2a8d28109615a2089" }, + "conform.nvim": { "branch": "master", "commit": "41852493b5abd7b5a0fd61ff007994c777a08ec9" }, "dashboard-nvim": { "branch": "master", "commit": "63df28409d940f9cac0a925df09d3dc369db9841" }, "dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, "gruvbox.nvim": { "branch": "main", "commit": "f0e029a3989691eb38cfa9272b75251c62a00821" }, - "indent-blankline.nvim": { "branch": "master", "commit": "3084950d1b66426d207064a509477cbfa96362c6" }, + "indent-blankline.nvim": { "branch": "master", "commit": "0dca9284bce128e60da18693d92999968d6cb523" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "leap.nvim": { "branch": "main", "commit": "b20691cc8824826571e5298d1402730bb9c721d2" }, "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, @@ -36,12 +36,12 @@ "nvim-lspconfig": { "branch": "master", "commit": "9099871a7c7e1c16122e00d70208a2cd02078d80" }, "nvim-notify": { "branch": "master", "commit": "27a6649ba6b22828ccc67c913f95a5407a2d8bec" }, "nvim-spectre": { "branch": "master", "commit": "d8906855f1949ac97b1e77aaf8d3fe12ed158ddc" }, - "nvim-treesitter": { "branch": "master", "commit": "c4da7945641b2e74915313cd1e608b43877a56b7" }, + "nvim-treesitter": { "branch": "master", "commit": "27f68c0b6a87cbad900b3d016425450af8268026" }, "nvim-treesitter-context": { "branch": "master", "commit": "652ec514d6ba8bc4a3c2de76c855fe668e2c7196" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "4795812635c7b90cec41637314862b0a229d2b24" }, "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, - "nvim-web-devicons": { "branch": "master", "commit": "78d41a9930532f9bba3ea075907aa92892b9a3eb" }, + "nvim-web-devicons": { "branch": "master", "commit": "43aa2ddf476012a2155f5f969ee55ab17174da7a" }, "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, diff --git a/config/nvim/lua/config/options.lua b/config/nvim/lua/config/options.lua index 58f431d..4c19d2d 100644 --- a/config/nvim/lua/config/options.lua +++ b/config/nvim/lua/config/options.lua @@ -4,3 +4,4 @@ vim.opt.smartindent = true vim.opt.relativenumber = true vim.opt.clipboard = "unnamedplus" +vim.opt.shell = "fish" diff --git a/config/nvim/lua/plugins/lazyvim.lua b/config/nvim/lua/plugins/lazyvim.lua new file mode 100644 index 0000000..6a82c5c --- /dev/null +++ b/config/nvim/lua/plugins/lazyvim.lua @@ -0,0 +1,9 @@ +return { + { "ellisonleao/gruvbox.nvim" }, + { + "LazyVim/LazyVim", + opts = { + colorscheme = "gruvbox", + }, + }, +} diff --git a/config/nvim/lua/plugins/leap-nvim.lua b/config/nvim/lua/plugins/leap-nvim.lua new file mode 100644 index 0000000..46845d5 --- /dev/null +++ b/config/nvim/lua/plugins/leap-nvim.lua @@ -0,0 +1,4 @@ +return { + "ggandor/leap.nvim", + dependencies = { "tpope/vim-repeat" }, +} diff --git a/config/nvim/lua/plugins/neo-tree.lua b/config/nvim/lua/plugins/neo-tree.lua new file mode 100644 index 0000000..c4b8f7e --- /dev/null +++ b/config/nvim/lua/plugins/neo-tree.lua @@ -0,0 +1,9 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "MunifTanjim/nui.nvim", + }, +} diff --git a/config/nvim/lua/plugins/nvim-treesitter.lua b/config/nvim/lua/plugins/nvim-treesitter.lua new file mode 100644 index 0000000..947813f --- /dev/null +++ b/config/nvim/lua/plugins/nvim-treesitter.lua @@ -0,0 +1,29 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "c_sharp", + "css", + "scss", + "dockerfile", + "html", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "sql", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "yaml", + "xml", + }, + }, + }, +} diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..022005c --- /dev/null +++ b/install.sh @@ -0,0 +1,28 @@ +#!/usr/bin/bash + +# determine distro check +# install stow, fish, neovim, ranger, mpv(?) + +# Determine the distribution name and version +OS=$(awk '/DISTRIB_ID=/' /etc/*-release | sed 's/DISTRIB_ID=//' | tr -d '"') +VERSION=$(awk '/DISTRIB_RELEASE=/' /etc/*-release | sed 's/DISTRIB_RELEASE=//' | sed 's/[.]0/./') + +echo $OS +# Check the distribution name + +case "$OS" in +"Arch") + echo "Installing for Arch" + /usr/bin/pacman -Sy --needed stow fish neovim ranger mpv pkgfile python-pynvim wl-clipboard ninja unzip atool elinks ffmpegthumbnailer highlight imagemagick libcaca mediainfo poppler + ;; +"Ubuntu" | "Debian") + echo "Installing for Ubuntu or Debian" + /usr/bin/apt-get update + curl -L "https://github.com/neovim/neovim-releases/releases/download/nightly/nvim-linux64.deb" -o /tmp/nvim-linux64.deb + /usr/bin/apt install /tmp/nvim-linux64.deb + /usr/bin/apt install ranger stow fish mpv atool caca-utils elinks highlight mediainfo poppler-util + ;; +*) + echo "Not supported" + ;; +esac