diff --git a/.config/fish/completions/lxc-attach.fish b/.config/fish/completions/lxc-attach.fish deleted file mode 100644 index 01eade6..0000000 --- a/.config/fish/completions/lxc-attach.fish +++ /dev/null @@ -1,65 +0,0 @@ -complete -c lxc-attach -f - -# function __private_generate_piped_combinations -# ... -# end -function __private_concat_completions -d "Generate completions that are specified as pipe-separated values from stdin source" - set -l fish_trace on - type -q awk || return - - set -l token (commandline -ct) - breakpoint - # We want to filter out suggestions the user has already entered. - set -l extant (string trim --chars=' \'"' -- $token | string split '|') - set -l filter (printf '^%s$\n' (printf '%s\n' $extant | string escape --style=regex) | string join '|') - # Work around the insanity of trying to read from stdin within a function. Note that we can't place the - # `read` call in between () to capture the output because that breaks its connection to stdin. - while read -l line - echo $line - end | string match -er '.' | string match -rv -- $filter | string replace -r '^' -- (string replace -rf -- '^(.+),.*$' '$1,' $token; or echo "") - - return - # Verified compatible with bsd awk and gnu awk - awk ' - { - lines[NR-1] = $0 - } - END { - n = NR - for (k = 1; k <= n; k++) { - generate_permutations(lines, n, k) - } - } - function generate_permutations(arr, total_len, perm_len, prefix, _i, _swap) { - if (perm_len == 0) { - print prefix - return - } - for (_i = 0; _i < total_len; _i++) { - _swap = arr[total_len-1]; arr[total_len-1] = arr[_i]; arr[_i] = _swap - generate_permutations(arr, total_len-1, perm_len-1, prefix arr[total_len-1] (perm_len == 1 ? "" : "|")) - arr[_i] = arr[total_len-1]; arr[total_len-1] = _swap - } - } - ' -end - - -complete -c lxc-attach -n '__fish_use_subcommand' -s n -l name -r -d 'Name of the container' -a "(lxc-ls --running | string split ' ')" - -# complete -c lxc-attach -n '__fish_use_subcommand' -s e -l elevated-privileges -d 'Use elevated privileges instead of those of the container' -a '(printf "foo\nbar\nbaz" | __private_concat_completions)' - -# Common options -complete -c lxc-attach -n '__fish_use_subcommand' -s o -l logfile -r -F -d 'Output log to FILE instead of stderr' - -complete -c lxc-attach -n '__fish_use_subcommand' -s l -l logpriority -r -d 'Set log priority to LEVEL' -a 'FATAL ALERT CRIT WARN ERROR NOTICE INFO DEBUG TRACE' - -complete -c lxc-attach -n '__fish_use_subcommand' -s q -l quiet -d "Don't produce any output" - -complete -c lxc-attach -n '__fish_use_subcommand' -s P -l lxcpath -r -F -d 'Use specified container path' - -complete -c lxc-attach -n '__fish_use_subcommand' -l help -d 'Show help information' - -complete -c lxc-attach -n '__fish_use_subcommand' -l usage -d 'Show a short usage message' - -complete -c lxc-attach -n '__fish_use_subcommand' -l version -d 'Print the version number' diff --git a/.config/fish/completions/lxc-info.fish b/.config/fish/completions/lxc-info.fish deleted file mode 100644 index 16091de..0000000 --- a/.config/fish/completions/lxc-info.fish +++ /dev/null @@ -1,33 +0,0 @@ -# disable file-completion -complete -c lxc-info -f - -complete -c lxc-info -n '__fish_use_subcommand' -s n -l name -r -d 'Name of the container' -a "(lxc-ls | string split ' ')" - -complete -c lxc-info -n '__fish_use_subcommand' -s c -l config -r -d 'Show configuration variable KEY from running container' - -complete -c lxc-info -n '__fish_use_subcommand' -s i -l ips -d 'Show the IP addresses' - -complete -c lxc-info -n '__fish_use_subcommand' -s p -l pid -d 'Show the process ID of the init container' - -complete -c lxc-info -n '__fish_use_subcommand' -s S -l stats -d 'Show usage statistics' - -complete -c lxc-info -n '__fish_use_subcommand' -s H -l no-humanize -d 'Show stats as raw numbers, not humanized' - -complete -c lxc-info -n '__fish_use_subcommand' -s s -l state -d 'Show the state of the container' - -complete -c lxc-info -n '__fish_use_subcommand' -l rcfile -r -F -d 'Load configuration file FILE' - -# Common options -complete -c lxc-info -n '__fish_use_subcommand' -s o -l logfile -r -F -d 'Output log to FILE instead of stderr' - -complete -c lxc-info -n '__fish_use_subcommand' -s l -l logpriority -r -d 'Set log priority to LEVEL' -a 'FATAL ALERT CRIT WARN ERROR NOTICE INFO DEBUG TRACE' - -complete -c lxc-info -n '__fish_use_subcommand' -s q -l quiet -d "Don't produce any output" - -complete -c lxc-info -n '__fish_use_subcommand' -s P -l lxcpath -r -F -d 'Use specified container path' - -complete -c lxc-info -n '__fish_use_subcommand' -l help -d 'Show help information' - -complete -c lxc-info -n '__fish_use_subcommand' -l usage -d 'Show a short usage message' - -complete -c lxc-info -n '__fish_use_subcommand' -l version -d 'Print the version number' diff --git a/.config/fish/conf.d/_tide_init.fish b/.config/fish/conf.d/_tide_init.fish index dbcdb70..b448002 100644 --- a/.config/fish/conf.d/_tide_init.fish +++ b/.config/fish/conf.d/_tide_init.fish @@ -8,10 +8,10 @@ function _tide_init_install --on-event _tide_init_install if status is-interactive tide bug-report --check || sleep 4 - if contains plttn/tide (string lower $_fisher_plugins) + if contains ilancosman/tide (string lower $_fisher_plugins) set_color bryellow - echo "plttn/tide is a development branch. Please install from a release tag:" - _tide_fish_colorize "fisher install plttn/tide@v7" + echo "ilancosman/tide is a development branch. Please install from a release tag:" + _tide_fish_colorize "fisher install ilancosman/tide@v6" sleep 3 end @@ -26,17 +26,15 @@ end function _tide_init_update --on-event _tide_init_update # Warn users who install from main branch - if contains plttn/tide (string lower $_fisher_plugins) + if contains ilancosman/tide (string lower $_fisher_plugins) set_color bryellow - echo "plttn/tide is a development branch. Please install from a release tag:" - _tide_fish_colorize "fisher install plttn/tide@v7" + echo "ilancosman/tide is a development branch. Please install from a release tag:" + _tide_fish_colorize "fisher install ilancosman/tide@v6" sleep 3 end # Set (disable) the new jobs variable set -q tide_jobs_number_threshold || set -U tide_jobs_number_threshold 1000 - - _tide_migrate_vcs_prompt_items end function _tide_init_uninstall --on-event _tide_init_uninstall diff --git a/.config/fish/conf.d/fish_frozen_key_bindings.fish b/.config/fish/conf.d/fish_frozen_key_bindings.fish deleted file mode 100644 index 495aee9..0000000 --- a/.config/fish/conf.d/fish_frozen_key_bindings.fish +++ /dev/null @@ -1,14 +0,0 @@ -# This file was created by fish when upgrading to version 4.3, to migrate -# the 'fish_key_bindings' variable from its old default scope (universal) -# to its new default scope (global). We recommend you delete this file -# and configure key bindings in ~/.config/fish/config.fish if needed. - -# set --global fish_key_bindings fish_default_key_bindings - -# Prior to version 4.3, fish shipped an event handler that runs -# `set --universal fish_key_bindings fish_default_key_bindings` -# whenever the fish_key_bindings variable is erased. -# This means that as long as any fish < 4.3 is still running on this system, -# we cannot complete the migration. -# As a workaround, erase the universal variable at every shell startup. -set --erase --universal fish_key_bindings diff --git a/.config/fish/conf.d/fish_frozen_theme.fish b/.config/fish/conf.d/fish_frozen_theme.fish deleted file mode 100644 index 0caf65e..0000000 --- a/.config/fish/conf.d/fish_frozen_theme.fish +++ /dev/null @@ -1,37 +0,0 @@ -# This file was created by fish when upgrading to version 4.3, to migrate -# theme variables from universal to global scope. -# Don't edit this file, as it will be written by the web-config tool (`fish_config`). -# To customize your theme, delete this file and see -# help interactive#syntax-highlighting -# or -# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING -# for appropriate commands to add to ~/.config/fish/config.fish instead. -# See also the release notes for fish 4.3.0 (run `help relnotes`). - -set --global fish_color_autosuggestion brblack -set --global fish_color_cancel -r -set --global fish_color_command blue -set --global fish_color_comment red -set --global fish_color_cwd green -set --global fish_color_cwd_root red -set --global fish_color_end green -set --global fish_color_error brred -set --global fish_color_escape brcyan -set --global fish_color_history_current --bold -set --global fish_color_host normal -set --global fish_color_host_remote yellow -set --global fish_color_normal normal -set --global fish_color_operator brcyan -set --global fish_color_param cyan -set --global fish_color_quote yellow -set --global fish_color_redirection cyan --bold -set --global fish_color_search_match white --background=brblack -set --global fish_color_selection white --bold --background=brblack -set --global fish_color_status red -set --global fish_color_user brgreen -set --global fish_color_valid_path --underline -set --global fish_pager_color_completion normal -set --global fish_pager_color_description yellow -i -set --global fish_pager_color_prefix normal --bold --underline -set --global fish_pager_color_progress brwhite --background=cyan -set --global fish_pager_color_selected_background -r diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 7738a34..db36de8 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -17,8 +17,6 @@ if status is-interactive fish_add_path -a /Users/Ivan_Golikov/Library/Python/3.11/bin case kbgw752: fish_add_path -a /usr/local/opt/node@18/bin - case ivan: - fish_add_path -p /home/ivan/.config/guix/current/bin end abbr -a rootnvim sudo -Es nvim diff --git a/.config/fish/fish_plugins b/.config/fish/fish_plugins index 2e0c3ca..7ad2cc7 100644 --- a/.config/fish/fish_plugins +++ b/.config/fish/fish_plugins @@ -1,3 +1,3 @@ jorgebucaran/fisher +ilancosman/tide@v6 lewisacidic/fish-git-abbr -plttn/tide@v7 diff --git a/.config/fish/fishd.tmp.1rBlvw b/.config/fish/fishd.tmp.1rBlvw deleted file mode 100644 index e69de29..0000000 diff --git a/.config/fish/functions/_tide_cache_variables.fish b/.config/fish/functions/_tide_cache_variables.fish index 69eae67..31e3850 100644 --- a/.config/fish/functions/_tide_cache_variables.fish +++ b/.config/fish/functions/_tide_cache_variables.fish @@ -2,8 +2,8 @@ function _tide_cache_variables # Same-color-separator color set_color $tide_prompt_color_separator_same_color | read -gx _tide_color_separator_same_color - # vcs - contains vcs $_tide_left_items $_tide_right_items && set_color $tide_git_color_branch | read -gx _tide_location_color + # git + contains git $_tide_left_items $_tide_right_items && set_color $tide_git_color_branch | read -gx _tide_location_color # private_mode if contains private_mode $_tide_left_items $_tide_right_items && test -n "$fish_private_mode" diff --git a/.config/fish/functions/_tide_internal_jj_git.fish b/.config/fish/functions/_tide_internal_jj_git.fish deleted file mode 100644 index 7ccafc6..0000000 --- a/.config/fish/functions/_tide_internal_jj_git.fish +++ /dev/null @@ -1,16 +0,0 @@ -function _tide_internal_jj_git - # Returns: - # 0: inside a jj repo and jj prompt is enabled - # 1: not inside a jj repo - # 2: inside a jj repo but jj prompt is disabled via .disable-jj-prompt - set -l d $PWD - while test -n "$d" - if test -d "$d/.jj" - test -f "$d/.disable-jj-prompt"; and return 2 - return 0 - end - set d (string replace -r '/[^/]*$' '' -- $d) - end - - return 1 -end diff --git a/.config/fish/functions/_tide_item_bun.fish b/.config/fish/functions/_tide_item_bun.fish deleted file mode 100644 index b39fd72..0000000 --- a/.config/fish/functions/_tide_item_bun.fish +++ /dev/null @@ -1,6 +0,0 @@ -function _tide_item_bun - if path is $_tide_parent_dirs/bun.lockb - bun --version | string match -qr "(?.*)" - _tide_print_item bun $tide_bun_icon' ' $v - end -end diff --git a/.config/fish/functions/_tide_item_character.fish b/.config/fish/functions/_tide_item_character.fish index ab727f3..10bb324 100644 --- a/.config/fish/functions/_tide_item_character.fish +++ b/.config/fish/functions/_tide_item_character.fish @@ -3,9 +3,7 @@ function _tide_item_character set -q add_prefix || echo -ns ' ' - if test "$fish_key_bindings" = fish_default_key_bindings || test -z "$fish_key_bindings" - echo -ns $tide_character_icon - else + test "$fish_key_bindings" = fish_default_key_bindings && echo -ns $tide_character_icon || switch $fish_bind_mode case insert echo -ns $tide_character_icon @@ -16,5 +14,4 @@ function _tide_item_character case visual echo -ns $tide_character_vi_icon_visual end - end end diff --git a/.config/fish/functions/_tide_item_git.fish b/.config/fish/functions/_tide_item_git.fish new file mode 100644 index 0000000..56e1e31 --- /dev/null +++ b/.config/fish/functions/_tide_item_git.fish @@ -0,0 +1,72 @@ +function _tide_item_git + if git branch --show-current 2>/dev/null | string shorten -"$tide_git_truncation_strategy"m$tide_git_truncation_length | read -l location + git rev-parse --git-dir --is-inside-git-dir | read -fL gdir in_gdir + set location $_tide_location_color$location + else if test $pipestatus[1] != 0 + return + else if git tag --points-at HEAD | string shorten -"$tide_git_truncation_strategy"m$tide_git_truncation_length | read location + git rev-parse --git-dir --is-inside-git-dir | read -fL gdir in_gdir + set location '#'$_tide_location_color$location + else + git rev-parse --git-dir --is-inside-git-dir --short HEAD | read -fL gdir in_gdir location + set location @$_tide_location_color$location + end + + # Operation + if test -d $gdir/rebase-merge + # Turn ANY into ALL, via double negation + if not path is -v $gdir/rebase-merge/{msgnum,end} + read -f step <$gdir/rebase-merge/msgnum + read -f total_steps <$gdir/rebase-merge/end + end + test -f $gdir/rebase-merge/interactive && set -f operation rebase-i || set -f operation rebase-m + else if test -d $gdir/rebase-apply + if not path is -v $gdir/rebase-apply/{next,last} + read -f step <$gdir/rebase-apply/next + read -f total_steps <$gdir/rebase-apply/last + end + if test -f $gdir/rebase-apply/rebasing + set -f operation rebase + else if test -f $gdir/rebase-apply/applying + set -f operation am + else + set -f operation am/rebase + end + else if test -f $gdir/MERGE_HEAD + set -f operation merge + else if test -f $gdir/CHERRY_PICK_HEAD + set -f operation cherry-pick + else if test -f $gdir/REVERT_HEAD + set -f operation revert + else if test -f $gdir/BISECT_LOG + set -f operation bisect + end + + # Git status/stash + Upstream behind/ahead + test $in_gdir = true && set -l _set_dir_opt -C $gdir/.. + # Suppress errors in case we are in a bare repo or there is no upstream + set -l stat (git $_set_dir_opt --no-optional-locks status --porcelain 2>/dev/null) + string match -qr '(0|(?.*))\n(0|(?.*))\n(0|(?.*)) +(0|(?.*))\n(0|(?.*))(\n(0|(?.*))\t(0|(?.*)))?' \ + "$(git $_set_dir_opt stash list 2>/dev/null | count + string match -r ^UU $stat | count + string match -r ^[ADMR] $stat | count + string match -r ^.[ADMR] $stat | count + string match -r '^\?\?' $stat | count + git rev-list --count --left-right @{upstream}...HEAD 2>/dev/null)" + + if test -n "$operation$conflicted" + set -g tide_git_bg_color $tide_git_bg_color_urgent + else if test -n "$staged$dirty$untracked" + set -g tide_git_bg_color $tide_git_bg_color_unstable + end + + _tide_print_item git $_tide_location_color$tide_git_icon' ' (set_color white; echo -ns $location + set_color $tide_git_color_operation; echo -ns ' '$operation ' '$step/$total_steps + set_color $tide_git_color_upstream; echo -ns ' ⇣'$behind ' ⇡'$ahead + set_color $tide_git_color_stash; echo -ns ' *'$stash + set_color $tide_git_color_conflicted; echo -ns ' ~'$conflicted + set_color $tide_git_color_staged; echo -ns ' +'$staged + set_color $tide_git_color_dirty; echo -ns ' !'$dirty + set_color $tide_git_color_untracked; echo -ns ' ?'$untracked) +end diff --git a/.config/fish/functions/_tide_item_node.fish b/.config/fish/functions/_tide_item_node.fish index fe63d18..fc57832 100644 --- a/.config/fish/functions/_tide_item_node.fish +++ b/.config/fish/functions/_tide_item_node.fish @@ -1,5 +1,5 @@ function _tide_item_node - if path is $_tide_parent_dirs/package.json and type -q node + if path is $_tide_parent_dirs/package.json node --version | string match -qr "v(?.*)" _tide_print_item node $tide_node_icon' ' $v end diff --git a/.config/fish/functions/_tide_item_rustc.fish b/.config/fish/functions/_tide_item_rustc.fish index dd5f297..b46cd99 100644 --- a/.config/fish/functions/_tide_item_rustc.fish +++ b/.config/fish/functions/_tide_item_rustc.fish @@ -1,10 +1,6 @@ function _tide_item_rustc if path is $_tide_parent_dirs/Cargo.toml - type -q rustc && set -f cmd 'rustc --version' || - begin - type -q rustup && set -f cmd 'rustup show active-toolchain -v' - end && - eval "$cmd" | string match -qr "(?\d+\.\d+\.\d+)" && - _tide_print_item rustc $tide_rustc_icon' ' $v + rustc --version | string match -qr "(?[\d.]+)" + _tide_print_item rustc $tide_rustc_icon' ' $v end end diff --git a/.config/fish/functions/_tide_item_sudo.fish b/.config/fish/functions/_tide_item_sudo.fish deleted file mode 100644 index 69fd5b0..0000000 --- a/.config/fish/functions/_tide_item_sudo.fish +++ /dev/null @@ -1,5 +0,0 @@ -function _tide_item_sudo - if sudo -n true 2>/dev/null - _tide_print_item sudo $tide_sudo_icon - end -end diff --git a/.config/fish/functions/_tide_item_terraform.fish b/.config/fish/functions/_tide_item_terraform.fish index 2fae13b..c079ce3 100644 --- a/.config/fish/functions/_tide_item_terraform.fish +++ b/.config/fish/functions/_tide_item_terraform.fish @@ -1,6 +1,5 @@ function _tide_item_terraform path is $_tide_parent_dirs/.terraform && - type -q terraform && terraform workspace show | string match -v default | read -l w && _tide_print_item terraform $tide_terraform_icon' ' $w end diff --git a/.config/fish/functions/_tide_item_vcs.fish b/.config/fish/functions/_tide_item_vcs.fish deleted file mode 100644 index 7202eff..0000000 --- a/.config/fish/functions/_tide_item_vcs.fish +++ /dev/null @@ -1,290 +0,0 @@ -# full credits to https://github.com/nertzy/fish_jj_prompt -# for a lot of the logic here, modified for Tide -function _tide_item_vcs - _tide_internal_jj_git - set -l jj_repo_status $status - - # Prefer jj formatting only when we're in a jj repo and jj is actually available. - if test $jj_repo_status -eq 0; and command -sq jj - set -l tmpl ' -if(self.contained_in("::trunk() & ~::@"), - "B\n", - if(self.contained_in("@"), - change_id.shortest() ++ - if(divergent, "/" ++ change_offset) ++ - "\t" ++ - if(self.contained_in("mine()"), ".", coalesce(author.email().local(), author.name(), ".")) ++ - "\t" ++ - coalesce( - separate(",", - if(local_bookmarks, local_bookmarks.join(",")), - ), - ".", - ) ++ "\t" ++ - working_copies ++ "\t" ++ - commit_id.shortest() ++ "\t" ++ - separate(" ", - if(conflict, "(conflict)"), - if(divergent, "(divergent)"), - if(hidden, "(hidden)"), - coalesce( - if(empty, "(empty)"), - "*", - ), - ) ++ "\t" ++ - immutable ++ "\t" ++ - if(description, description.first_line(), "(no desc)") ++ "\n" - , - if(self.contained_in("trunk()"), - ".\n", - if(local_bookmarks, - change_id.shortest() ++ "\t" ++ separate(",", - local_bookmarks.join(","), - if(tags, tags.join(",")), - ) ++ "\n", - ) - ) - ) -) -' - - set -l raw_lines (jj log --no-pager --no-graph --ignore-working-copy --color=never \ - -r '@ | trunk()..@ | (::trunk() & ~::@)' \ - -T $tmpl 2>/dev/null) - or return 1 - - # Colors - # if bg color is normal, we can use matching jj colors - if test $tide_jj_bg_color = normal - set -f bold_brmagenta (set_color brmagenta) - set -f magenta (set_color magenta) - set -f bold_brblue (set_color brblue) - set -f bold_brgreen (set_color brgreen) - set -f bold_brred (set_color brred) - set -f bold_yellow (set_color yellow) - set -f gray (set_color brblack) - set -f reset (printf '\e[39m') - else # else we have a background, so we should just use the color controlled by the theme - set -f bold_brmagenta (set_color $tide_jj_color) - set -f magenta (set_color $tide_jj_color) - set -f bold_brblue (set_color $tide_jj_color) - set -f bold_brgreen (set_color $tide_jj_color) - set -f bold_brred (set_color $tide_jj_color) - set -f bold_yellow (set_color $tide_jj_color) - set -f gray (set_color $tide_jj_color) - set -l reset () - end - - set -l use_bold true - set -q fish_jj_prompt_bold; and set use_bold $fish_jj_prompt_bold - set -l bold "" - test "$use_bold" = true; and set bold (printf '\e[1m') - - set -l info "" - set -l has_conflict 0 - set -l has_immutable 0 - set -l behind 0 - set -l ahead 0 - set -l display_bookmarks - - for line in $raw_lines - if test "$line" = B - set behind (math $behind + 1) - continue - end - - set ahead (math $ahead + 1) - set -l parts (string split \t -- $line) - set -l nparts (count $parts) - - if test $nparts -ge 8 - # @ line fields: change_id[1] author[2] bookmarks[3] working_copies[4] commit_id[5] status[6] immutable[7] description[8] - # Separate (divergent) from other status flags for distinct coloring - set -l st $parts[6] - set -l divergent_label "" - set -l cid_color $bold_brmagenta - if string match -q '*(divergent)*' -- "$st" - set -l divergent_esc (printf '\e[38;5;9m') - set divergent_label " $divergent_esc(divergent)$reset" - set cid_color $divergent_esc - set st (string replace ' (divergent)' '' -- $st) - set st (string replace '(divergent) ' '' -- $st) - set st (string replace '(divergent)' '' -- $st) - end - set -l conflict_label "" - if string match -q '*(conflict)*' -- "$st" - set has_conflict 1 - set conflict_label " $bold_brred(conflict)$reset" - set st (string replace ' (conflict)' '' -- $st) - set st (string replace '(conflict) ' '' -- $st) - set st (string replace '(conflict)' '' -- $st) - end - set -l status_color $bold_brgreen - if test "$st" = "*" - set status_color $bold_yellow - end - if test "$parts[7]" = true - set has_immutable 1 - end - - # Bookmarks at @ - set -l at_bookmarks "" - if test "$parts[3]" != "." - set -l at_bm_list - for bookmark in (string split ',' -- $parts[3]) - set full_bookmark (string trim -- $bookmark) - set bm_components (string split "/" -- $full_bookmark) - if test -n "$bm_components[-1]" - set -a at_bm_list "$bold_brmagenta$bm_components[-1]$reset" - end - end - if test (count $at_bm_list) -gt 0 - set at_bookmarks " "(string join ' ' $at_bm_list) - end - end - - # Show workspace if multiple workspaces exist - set -l workspace_label "" - set -l wc_count (jj workspace list --no-pager --color=never --ignore-working-copy 2>/dev/null | count) - if test $wc_count -gt 1; and test -n "$parts[4]" - set -l bold_brgreen_color (set_color brgreen) - set workspace_label " $bold_brgreen_color$parts[4]$reset" - end - - # Description (configurable via tide_jj_show_description and tide_jj_description_length) - set -l show_desc true - set -q tide_jj_show_description; and set show_desc $tide_jj_show_description - set -l desc_length 24 - set -q tide_jj_description_length; and set desc_length $tide_jj_description_length - set -l desc_label "" - if test -n "$parts[8]"; and test "$show_desc" = true - set -l desc $parts[8] - if test $desc_length -gt 0; and test (string length -- $desc) -gt $desc_length - set desc (string sub -l $desc_length -- $desc)"…" - end - if test "$parts[8]" = "(no desc)" - set desc_label " $status_color$desc$reset" - else - set desc_label " $desc" - end - end - - set info "$cid_color$parts[1]$reset$at_bookmarks$workspace_label $bold_brblue$parts[5]$reset$conflict_label $status_color$st$reset$divergent_label$desc_label" - else if test $nparts -eq 2 - # Ancestor with bookmarks: change_id, bookmarks - set -l cid $parts[1] - set -l depth_commits (jj log --no-pager --no-graph --ignore-working-copy --color=never \ - -r "$cid::@ ~ $cid" -T '".\n"' 2>/dev/null) - set -l depth (count $depth_commits) - for bookmark in (string split ',' -- $parts[2]) - set bookmark (string trim -- $bookmark) - if test -n "$bookmark" - set -l nobold (printf '\e[22m') - set -a display_bookmarks "$magenta$bookmark$nobold$magenta↑$depth$reset$bold" - end - end - end - # "." lines (nparts=1, not "B") just count toward ahead - end - - # Assemble prompt - if test -n "$info" - if test (count $display_bookmarks) -gt 0 - set info "$info "(string join ' ' $display_bookmarks) - end - set -l nobold (printf '\e[22m') - if test $ahead -gt 0 - set info "$info $nobold$gray↑$ahead$reset" - end - if test $behind -gt 0 - set info "$info $nobold$gray↓$behind$reset" - end - set -l at_color (set_color green) - if test $has_conflict -eq 1 - set at_color (printf '\e[38;5;1m') - else if test $has_immutable -eq 1 - set at_color (printf '\e[38;5;14m') - end - set -l parentheses_color (set_color $tide_jj_color) - if test $tide_jj_bg_color = normal # prints as normal - set jj_status $( printf '\e[39m%s(%s%s%s%s%s)' "$parentheses_color" "$reset$bold" "$at_color" @ "$reset $info" "$full_reset$parentheses_color" ) - else # prints with bg support - set jj_status (printf '(%s%s)' @ " $info") - end - end - - _tide_print_item jj $tide_jj_icon' ' (echo -ns "$jj_status";) - return - end - - if git branch --show-current 2>/dev/null | string shorten -"$tide_git_truncation_strategy"m$tide_git_truncation_length | read -l location - git rev-parse --git-dir --is-inside-git-dir | read -fL gdir in_gdir - set location $_tide_location_color$location - else if test $pipestatus[1] != 0 - return - else if git tag --points-at HEAD | string shorten -"$tide_git_truncation_strategy"m$tide_git_truncation_length | read location - git rev-parse --git-dir --is-inside-git-dir | read -fL gdir in_gdir - set location '#'$_tide_location_color$location - else - git rev-parse --git-dir --is-inside-git-dir --short HEAD | read -fL gdir in_gdir location - set location @$_tide_location_color$location - end - - # Operation - if test -d $gdir/rebase-merge - # Turn ANY into ALL, via double negation - if not path is -v $gdir/rebase-merge/{msgnum,end} - read -f step <$gdir/rebase-merge/msgnum - read -f total_steps <$gdir/rebase-merge/end - end - test -f $gdir/rebase-merge/interactive && set -f operation rebase-i || set -f operation rebase-m - else if test -d $gdir/rebase-apply - if not path is -v $gdir/rebase-apply/{next,last} - read -f step <$gdir/rebase-apply/next - read -f total_steps <$gdir/rebase-apply/last - end - if test -f $gdir/rebase-apply/rebasing - set -f operation rebase - else if test -f $gdir/rebase-apply/applying - set -f operation am - else - set -f operation am/rebase - end - else if test -f $gdir/MERGE_HEAD - set -f operation merge - else if test -f $gdir/CHERRY_PICK_HEAD - set -f operation cherry-pick - else if test -f $gdir/REVERT_HEAD - set -f operation revert - else if test -f $gdir/BISECT_LOG - set -f operation bisect - end - - # Git status/stash + Upstream behind/ahead - test $in_gdir = true && set -l _set_dir_opt -C $gdir/.. - # Suppress errors in case we are in a bare repo or there is no upstream - set -l stat (git $_set_dir_opt --no-optional-locks status --porcelain 2>/dev/null) - string match -qr '(0|(?.*))\n(0|(?.*))\n(0|(?.*)) -(0|(?.*))\n(0|(?.*))(\n(0|(?.*))\t(0|(?.*)))?' \ - "$(git $_set_dir_opt stash list 2>/dev/null | count - string match -r ^UU $stat | count - string match -r ^[ADMR] $stat | count - string match -r ^.[ADMR] $stat | count - string match -r '^\?\?' $stat | count - git rev-list --count --left-right @{upstream}...HEAD 2>/dev/null)" - - if test -n "$operation$conflicted" - set -g tide_git_bg_color $tide_git_bg_color_urgent - else if test -n "$staged$dirty$untracked" - set -g tide_git_bg_color $tide_git_bg_color_unstable - end - - _tide_print_item git $_tide_location_color$tide_git_icon' ' (set_color white; echo -ns $location - set_color $tide_git_color_operation; echo -ns ' '$operation ' '$step/$total_steps - set_color $tide_git_color_upstream; echo -ns ' ⇣'$behind ' ⇡'$ahead - set_color $tide_git_color_stash; echo -ns ' *'$stash - set_color $tide_git_color_conflicted; echo -ns ' ~'$conflicted - set_color $tide_git_color_staged; echo -ns ' +'$staged - set_color $tide_git_color_dirty; echo -ns ' !'$dirty - set_color $tide_git_color_untracked; echo -ns ' ?'$untracked) -end diff --git a/.config/fish/functions/_tide_migrate_vcs_prompt_items.fish b/.config/fish/functions/_tide_migrate_vcs_prompt_items.fish deleted file mode 100644 index 4b2f97b..0000000 --- a/.config/fish/functions/_tide_migrate_vcs_prompt_items.fish +++ /dev/null @@ -1,25 +0,0 @@ -function _tide_migrate_vcs_prompt_items - for prompt_side in left right - set -l var_name tide_{$prompt_side}_prompt_items - set -l items $$var_name - - contains git $items; or contains jj $items; or continue - - set -l migrated_items - set -l inserted_vcs false - for item in $items - switch $item - case git jj - if test "$inserted_vcs" = false - set -a migrated_items vcs - set inserted_vcs true - end - case '*' - set -a migrated_items $item - end - end - - test "$items" = "$migrated_items"; and continue - set -U $var_name $migrated_items - end -end diff --git a/.config/fish/functions/_tide_parent_dirs.fish b/.config/fish/functions/_tide_parent_dirs.fish index 62f7654..00d8a14 100644 --- a/.config/fish/functions/_tide_parent_dirs.fish +++ b/.config/fish/functions/_tide_parent_dirs.fish @@ -1,6 +1,6 @@ function _tide_parent_dirs --on-variable PWD set -g _tide_parent_dirs ( - string escape -- ( + string escape ( for dir in (string split / -- $PWD) set -fa parts $dir string join / -- $parts diff --git a/.config/fish/functions/_tide_pwd.fish b/.config/fish/functions/_tide_pwd.fish index 579ee45..5447dd4 100644 --- a/.config/fish/functions/_tide_pwd.fish +++ b/.config/fish/functions/_tide_pwd.fish @@ -12,7 +12,7 @@ eval "function _tide_pwd set -f split_output \"$unwritable_icon\$split_pwd[1]\" \$split_pwd[2..] set split_output[-1] \"$color_anchors\$split_output[-1]$reset_to_color_dirs\" else - set -f split_output \"$home_icon$color_anchors~$reset_to_color_dirs\" + set -f split_output \"$home_icon$color_anchors~\" end string join / -- \$split_output | string length -V | read -g _tide_pwd_len diff --git a/.config/fish/functions/_tide_remove_unusable_items.fish b/.config/fish/functions/_tide_remove_unusable_items.fish index cd07a6e..b1d9b28 100644 --- a/.config/fish/functions/_tide_remove_unusable_items.fish +++ b/.config/fish/functions/_tide_remove_unusable_items.fish @@ -1,7 +1,7 @@ -function _tide_remove_unusable_items --on-variable PATH +function _tide_remove_unusable_items # Remove tool-specific items for tools the machine doesn't have installed set -l removed_items - for item in aws bun crystal direnv distrobox docker elixir gcloud go java kubectl nix_shell node php pulumi python ruby rustc terraform toolbox vcs zig + for item in aws bun crystal direnv distrobox docker elixir gcloud git go java kubectl nix_shell node php pulumi python ruby rustc terraform toolbox zig contains $item $tide_left_prompt_items $tide_right_prompt_items || continue set -l cli_names $item @@ -12,8 +12,6 @@ function _tide_remove_unusable_items --on-variable PATH set cli_names nix nix-shell case python set cli_names python python3 - case vcs - set cli_names git end type --query $cli_names || set -a removed_items $item end diff --git a/.config/fish/functions/_tide_sub_bug-report.fish b/.config/fish/functions/_tide_sub_bug-report.fish index acd10ba..82f08c0 100644 --- a/.config/fish/functions/_tide_sub_bug-report.fish +++ b/.config/fish/functions/_tide_sub_bug-report.fish @@ -6,7 +6,7 @@ function _tide_sub_bug-report if set -q _flag_clean HOME=(mktemp -d) $fish_path --init-command "curl --silent \ https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | - source && fisher install plttn/tide@v7" + source && fisher install ilancosman/tide@v6" else if set -q _flag_verbose set --long | string match -r "^_?tide.*" | # Get only tide variables string match -r --invert "^_tide_prompt_var.*" # Remove _tide_prompt_var @@ -15,7 +15,7 @@ function _tide_sub_bug-report _tide_check_version Fish fish-shell/fish-shell "(?[\d.]+)" $fish_version || return tide --version | string match -qr "tide, version (?.*)" - _tide_check_version Tide plttn/tide "v(?[\d.]+)" $tide_version || return + _tide_check_version Tide IlanCosman/tide "v(?[\d.]+)" $tide_version || return if command --query git test (path sort (git --version) "git version 2.22.0")[1] = "git version 2.22.0" diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish index 242cee9..994513d 100644 --- a/.config/fish/functions/fish_prompt.fish +++ b/.config/fish/functions/fish_prompt.fish @@ -13,10 +13,6 @@ set -U $prompt_var # Set var here so if we erase $prompt_var, bg job won't set a set_color normal | read -l color_normal status fish-path | read -l fish_path -if string match -i homebrew/Cellar $fish_path - set fish_path (string replace -r '/Cellar/[^/]+/[^/]+/bin/' '/bin/' $fish_path) -end - # _tide_repaint prevents us from creating a second background job function _tide_refresh_prompt --on-variable $prompt_var --on-variable COLUMNS set -g _tide_repaint @@ -38,22 +34,21 @@ if contains newline $_tide_left_items # two line prompt initialization set -l bot_right_frame "$prompt_and_frame_color─╯" && set column_offset (math $column_offset-2) - eval " + if test "$tide_prompt_transient_enabled" = true + eval " function fish_prompt _tide_status=\$status _tide_pipestatus=\$pipestatus if not set -e _tide_repaint jobs -q && jobs -p | count | read -lx _tide_jobs $fish_path -c \"set _tide_pipestatus \$_tide_pipestatus set _tide_parent_dirs \$_tide_parent_dirs -PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_key_bindings=\$fish_key_bindings fish_bind_mode=\$fish_bind_mode set $prompt_var (_tide_2_line_prompt)\" & +PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_bind_mode=\$fish_bind_mode set $prompt_var (_tide_2_line_prompt)\" & builtin disown command kill \$_tide_last_pid 2>/dev/null set -g _tide_last_pid \$last_pid end - - - if not contains -- --final-rendering \$argv + if not set -q _tide_transient math \$COLUMNS-(string length -V \"\$$prompt_var[1][1]\$$prompt_var[1][3]\")+$column_offset | read -lx dist_btwn_sides echo -n $add_newline'$top_left_frame'(string replace @PWD@ (_tide_pwd) \"\$$prompt_var[1][1]\")'$prompt_and_frame_color' @@ -65,49 +60,111 @@ PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_key_bindings= end function fish_right_prompt - if not contains -- --final-rendering \$argv - string unescape \"\$$prompt_var[1][4]$bot_right_frame$color_normal\" - end + set -e _tide_transient || string unescape \"\$$prompt_var[1][4]$bot_right_frame$color_normal\" end" - -else # one line prompt initialization - test "$tide_prompt_add_newline_before" = true && set -l add_newline '\0' - math 5 -$tide_prompt_min_cols | read -l column_offset - test $column_offset -ge 0 && set column_offset "+$column_offset" - - eval " + else + eval " function fish_prompt - set -lx _tide_status \$status - _tide_pipestatus=\$pipestatus if not set -e _tide_repaint + _tide_status=\$status _tide_pipestatus=\$pipestatus if not set -e _tide_repaint jobs -q && jobs -p | count | read -lx _tide_jobs $fish_path -c \"set _tide_pipestatus \$_tide_pipestatus set _tide_parent_dirs \$_tide_parent_dirs -PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_key_bindings=\$fish_key_bindings fish_bind_mode=\$fish_bind_mode set $prompt_var (_tide_1_line_prompt)\" & +PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_bind_mode=\$fish_bind_mode set $prompt_var (_tide_2_line_prompt)\" & builtin disown command kill \$_tide_last_pid 2>/dev/null set -g _tide_last_pid \$last_pid end - if contains -- --final-rendering \$argv + math \$COLUMNS-(string length -V \"\$$prompt_var[1][1]\$$prompt_var[1][3]\")+$column_offset | read -lx dist_btwn_sides + + echo -ns $add_newline'$top_left_frame'(string replace @PWD@ (_tide_pwd) \"\$$prompt_var[1][1]\")'$prompt_and_frame_color' + string repeat -Nm(math max 0, \$dist_btwn_sides-\$_tide_pwd_len) '$tide_prompt_icon_connection' + echo -ns \"\$$prompt_var[1][3]$top_right_frame\"\n\"$bot_left_frame\$$prompt_var[1][2]$color_normal \" +end + +function fish_right_prompt + string unescape \"\$$prompt_var[1][4]$bot_right_frame$color_normal\" +end" + end +else # one line prompt initialization + test "$tide_prompt_add_newline_before" = true && set -l add_newline '\0' + + math 5 -$tide_prompt_min_cols | read -l column_offset + test $column_offset -ge 0 && set column_offset "+$column_offset" + + if test "$tide_prompt_transient_enabled" = true + eval " +function fish_prompt + set -lx _tide_status \$status + _tide_pipestatus=\$pipestatus if not set -e _tide_repaint + jobs -q && jobs -p | count | read -lx _tide_jobs + $fish_path -c \"set _tide_pipestatus \$_tide_pipestatus +set _tide_parent_dirs \$_tide_parent_dirs +PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_bind_mode=\$fish_bind_mode set $prompt_var (_tide_1_line_prompt)\" & + builtin disown + + command kill \$_tide_last_pid 2>/dev/null + set -g _tide_last_pid \$last_pid + end + + if set -q _tide_transient echo -n \e\[0J add_prefix= _tide_item_character echo -n '$color_normal ' else math \$COLUMNS-(string length -V \"\$$prompt_var[1][1]\$$prompt_var[1][2]\")$column_offset | read -lx dist_btwn_sides - printf '%s' (string replace @PWD@ (_tide_pwd) $add_newline \$$prompt_var[1][1]'$color_normal ') + string replace @PWD@ (_tide_pwd) $add_newline \$$prompt_var[1][1]'$color_normal ' end end function fish_right_prompt - if not contains -- --final-rendering \$argv - string unescape \"\$$prompt_var[1][2]$color_normal\" - end + set -e _tide_transient || string unescape \"\$$prompt_var[1][2]$color_normal\" end" + else + eval " +function fish_prompt + _tide_status=\$status _tide_pipestatus=\$pipestatus if not set -e _tide_repaint + jobs -q && jobs -p | count | read -lx _tide_jobs + $fish_path -c \"set _tide_pipestatus \$_tide_pipestatus +set _tide_parent_dirs \$_tide_parent_dirs +PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_bind_mode=\$fish_bind_mode set $prompt_var (_tide_1_line_prompt)\" & + builtin disown + command kill \$_tide_last_pid 2>/dev/null + set -g _tide_last_pid \$last_pid + end + + math \$COLUMNS-(string length -V \"\$$prompt_var[1][1]\$$prompt_var[1][2]\")$column_offset | read -lx dist_btwn_sides + string replace @PWD@ (_tide_pwd) $add_newline \$$prompt_var[1][1]'$color_normal ' +end + +function fish_right_prompt + string unescape \"\$$prompt_var[1][2]$color_normal\" +end" + end end # Inheriting instead of evaling because here load time is more important than runtime function _tide_on_fish_exit --on-event fish_exit --inherit-variable prompt_var set -e $prompt_var end + +if test "$tide_prompt_transient_enabled" = true + function _tide_enter_transient + # If the commandline will be executed or is empty, and the pager is not open + # Pager open usually means selecting, not running + # Can be untrue, but it's better than the alternative + if commandline --is-valid || test -z "$(commandline)" && not commandline --paging-mode + set -g _tide_transient + set -g _tide_repaint + commandline -f repaint + end + commandline -f execute + end + + bind \r _tide_enter_transient + bind \n _tide_enter_transient + bind -M insert \r _tide_enter_transient + bind -M insert \n _tide_enter_transient +end diff --git a/.config/fish/functions/lxc.fish b/.config/fish/functions/lxc.fish deleted file mode 100644 index 2b7fc25..0000000 --- a/.config/fish/functions/lxc.fish +++ /dev/null @@ -1,99 +0,0 @@ -function lxc-attach --wraps=lxc-attach - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-attach $argv -end - -function lxc-autostart --wraps=lxc-autostart - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-autostart $argv -end - -function lxc-cgroup --wraps=lxc-cgroup - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-cgroup $argv -end - -function lxc-checkconfig --wraps=lxc-checkconfig - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-checkconfig $argv -end - -function lxc-checkpoint --wraps=lxc-checkpoint - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-checkpoint $argv -end - -function lxc-config --wraps=lxc-config - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-config $argv -end - -function lxc-console --wraps=lxc-console - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-console $argv -end - -function lxc-copy --wraps=lxc-copy - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-copy $argv -end - -function lxc-create --wraps=lxc-create - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-create $argv -end - -function lxc-destroy --wraps=lxc-destroy - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-destroy $argv -end - -function lxc-device --wraps=lxc-device - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-device $argv -end - -function lxc-execute --wraps=lxc-execute - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-execute $argv -end - -function lxc-freeze --wraps=lxc-freeze - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-freeze $argv -end - -function lxc-info --wraps=lxc-info - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-info $argv 2>/dev/null -end - -function lxc-ls --wraps=lxc-ls - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-ls $argv -end - -function lxc-monitor --wraps=lxc-monitor - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-monitor $argv -end - -function lxc-snapshot --wraps=lxc-snapshot - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-snapshot $argv -end - -function lxc-start --wraps=lxc-start - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-start $argv -end - -function lxc-stop --wraps=lxc-stop - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-stop $argv -end - -function lxc-top --wraps=lxc-top - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-top $argv -end - -function lxc-unfreeze --wraps=lxc-unfreeze - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-unfreeze $argv -end - -function lxc-unshare --wraps=lxc-unshare - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-unshare $argv -end - -function lxc-update-config --wraps=lxc-update-config - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-update-config $argv -end - -function lxc-usernsexec --wraps=lxc-usernsexec - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-usernsexec $argv -end - -function lxc-wait --wraps=lxc-wait - systemd-run -q --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-wait $argv -end diff --git a/.config/fish/functions/redetect_mouse.fish b/.config/fish/functions/redetect_mouse.fish deleted file mode 100644 index 85e1b2b..0000000 --- a/.config/fish/functions/redetect_mouse.fish +++ /dev/null @@ -1,12 +0,0 @@ -function redetect_mouse - set -l time_taken 30 - while test $time_taken -gt 20 - echo "Reloading usbhid module..." - set -l start_time (date +%s) - sudo rmmod usbhid - sudo modprobe usbhid - set -l end_time (date +%s) - set time_taken (math $end_time - $start_time) - end - kitten notify "Mouse should be working!" -end diff --git a/.config/fish/functions/tide.fish b/.config/fish/functions/tide.fish index 12a18fb..4b115a1 100644 --- a/.config/fish/functions/tide.fish +++ b/.config/fish/functions/tide.fish @@ -2,7 +2,7 @@ function tide --description 'Manage your Tide prompt' argparse --stop-nonopt v/version h/help -- $argv if set -q _flag_version - echo 'tide, version 7.0.15' + echo 'tide, version 6.2.0' else if set -q _flag_help _tide_help else if functions --query _tide_sub_$argv[1] diff --git a/.config/fish/functions/tide/configure/choices/all/finish.fish b/.config/fish/functions/tide/configure/choices/all/finish.fish index 4d6b34d..f670b1e 100644 --- a/.config/fish/functions/tide/configure/choices/all/finish.fish +++ b/.config/fish/functions/tide/configure/choices/all/finish.fish @@ -14,7 +14,7 @@ function finish switch $_tide_selected_option case 'Overwrite your current tide config' _tide_finish - command -q clear && status is-interactive && clear + command -q clear && clear set -q _flag_auto || _tide_print_configure_current_options case 'Exit and print the config you just generated' _tide_exit_configure diff --git a/.config/fish/functions/tide/configure/choices/all/icons.fish b/.config/fish/functions/tide/configure/choices/all/icons.fish index c6590d3..be167bb 100644 --- a/.config/fish/functions/tide/configure/choices/all/icons.fish +++ b/.config/fish/functions/tide/configure/choices/all/icons.fish @@ -13,7 +13,7 @@ function icons case 'Few icons' _disable_icons end - _next_choice all/finish + _next_choice all/transient end function _enable_icons @@ -22,7 +22,6 @@ function _enable_icons set -g fake_tide_pwd_icon_home  set -g fake_tide_cmd_duration_icon  set -g fake_tide_git_icon  - set -g fake_tide_jj_icon  end function _disable_icons @@ -31,5 +30,4 @@ function _disable_icons set fake_tide_pwd_icon_home set fake_tide_cmd_duration_icon set fake_tide_git_icon - set fake_tide_jj_icon end diff --git a/.config/fish/functions/tide/configure/choices/all/transient.fish b/.config/fish/functions/tide/configure/choices/all/transient.fish new file mode 100644 index 0000000..df2b6b6 --- /dev/null +++ b/.config/fish/functions/tide/configure/choices/all/transient.fish @@ -0,0 +1,22 @@ +function transient + _tide_title 'Enable transient prompt?' + + _tide_option 1 No + _tide_display_prompt + _tide_display_prompt + _tide_display_prompt + + _tide_option 2 Yes + _configure_transient= _tide_display_prompt + _configure_transient= _tide_display_prompt + _tide_display_prompt + + _tide_menu (status function) + switch $_tide_selected_option + case No + set fake_tide_prompt_transient_enabled false + case Yes + set fake_tide_prompt_transient_enabled true + end + _next_choice all/finish +end diff --git a/.config/fish/functions/tide/configure/configs/classic.fish b/.config/fish/functions/tide/configure/configs/classic.fish index 475ea33..6f09bba 100644 --- a/.config/fish/functions/tide/configure/configs/classic.fish +++ b/.config/fish/functions/tide/configure/configs/classic.fish @@ -46,15 +46,13 @@ tide_go_bg_color 444444 tide_go_color 00ACD7 tide_java_bg_color 444444 tide_java_color ED8B00 -tide_jj_color $_tide_color_green -tide_jj_bg_color 444444 tide_jobs_bg_color 444444 tide_jobs_color $_tide_color_dark_green tide_jobs_number_threshold 1000 tide_kubectl_bg_color 444444 tide_kubectl_color 326CE5 tide_left_prompt_frame_enabled true -tide_left_prompt_items pwd vcs newline +tide_left_prompt_items pwd git newline tide_left_prompt_prefix '' tide_left_prompt_separator_diff_color  tide_left_prompt_separator_same_color  @@ -81,7 +79,7 @@ tide_pwd_bg_color 444444 tide_pwd_color_anchors $_tide_color_light_blue tide_pwd_color_dirs $_tide_color_dark_blue tide_pwd_color_truncated_dirs 8787AF -tide_pwd_markers .bzr .citc .git .hg .jj .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform bun.lockb Cargo.toml composer.json CVS go.mod package.json build.zig +tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform bun.lockb Cargo.toml composer.json CVS go.mod package.json build.zig tide_python_bg_color 444444 tide_python_color 00AFAF tide_right_prompt_frame_enabled true @@ -103,8 +101,6 @@ tide_status_color $_tide_color_dark_green tide_status_color_failure D70000 tide_terraform_bg_color 444444 tide_terraform_color 844FBA -tide_sudo_bg_color 444444 -tide_sudo_color 87875F tide_time_bg_color 444444 tide_time_color 5F8787 tide_time_format %T diff --git a/.config/fish/functions/tide/configure/configs/classic_16color.fish b/.config/fish/functions/tide/configure/configs/classic_16color.fish index db2a387..fe730c5 100644 --- a/.config/fish/functions/tide/configure/configs/classic_16color.fish +++ b/.config/fish/functions/tide/configure/configs/classic_16color.fish @@ -39,8 +39,6 @@ tide_go_bg_color black tide_go_color brcyan tide_java_bg_color black tide_java_color yellow -tide_jj_color brgreen -tide_jj_bg_color black tide_jobs_bg_color black tide_jobs_color green tide_kubectl_bg_color black @@ -75,8 +73,6 @@ tide_status_bg_color black tide_status_bg_color_failure black tide_status_color green tide_status_color_failure red -tide_sudo_bg_color black -tide_sudo_color brblack tide_terraform_bg_color black tide_terraform_color magenta tide_time_bg_color black diff --git a/.config/fish/functions/tide/configure/configs/lean.fish b/.config/fish/functions/tide/configure/configs/lean.fish index 884c7e5..db3f1d2 100644 --- a/.config/fish/functions/tide/configure/configs/lean.fish +++ b/.config/fish/functions/tide/configure/configs/lean.fish @@ -46,15 +46,13 @@ tide_go_bg_color normal tide_go_color 00ACD7 tide_java_bg_color normal tide_java_color ED8B00 -tide_jj_color $_tide_color_green -tide_jj_bg_color normal tide_jobs_bg_color normal tide_jobs_color $_tide_color_dark_green tide_jobs_number_threshold 1000 tide_kubectl_bg_color normal tide_kubectl_color 326CE5 tide_left_prompt_frame_enabled false -tide_left_prompt_items pwd vcs newline character +tide_left_prompt_items pwd git newline character tide_left_prompt_prefix '' tide_left_prompt_separator_diff_color ' ' tide_left_prompt_separator_same_color ' ' @@ -81,7 +79,7 @@ tide_pwd_bg_color normal tide_pwd_color_anchors $_tide_color_light_blue tide_pwd_color_dirs $_tide_color_dark_blue tide_pwd_color_truncated_dirs 8787AF -tide_pwd_markers .bzr .citc .git .hg .jj .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform bun.lockb Cargo.toml composer.json CVS go.mod package.json build.zig +tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform bun.lockb Cargo.toml composer.json CVS go.mod package.json build.zig tide_python_bg_color normal tide_python_color 00AFAF tide_right_prompt_frame_enabled false @@ -101,8 +99,6 @@ tide_status_bg_color normal tide_status_bg_color_failure normal tide_status_color $_tide_color_dark_green tide_status_color_failure D70000 -tide_sudo_bg_color normal -tide_sudo_color 87875F tide_terraform_bg_color normal tide_terraform_color 844FBA tide_time_bg_color normal diff --git a/.config/fish/functions/tide/configure/configs/lean_16color.fish b/.config/fish/functions/tide/configure/configs/lean_16color.fish index 160a5e5..699ce45 100644 --- a/.config/fish/functions/tide/configure/configs/lean_16color.fish +++ b/.config/fish/functions/tide/configure/configs/lean_16color.fish @@ -39,8 +39,6 @@ tide_go_bg_color normal tide_go_color brcyan tide_java_bg_color normal tide_java_color yellow -tide_jj_bg_color normal -tide_jj_color brgreen tide_jobs_bg_color normal tide_jobs_color green tide_kubectl_bg_color normal @@ -75,8 +73,6 @@ tide_status_bg_color normal tide_status_bg_color_failure normal tide_status_color green tide_status_color_failure red -tide_sudo_bg_color normal -tide_sudo_color brblack tide_terraform_bg_color normal tide_terraform_color magenta tide_time_bg_color normal diff --git a/.config/fish/functions/tide/configure/configs/rainbow.fish b/.config/fish/functions/tide/configure/configs/rainbow.fish index 46b41f8..79e9cb4 100644 --- a/.config/fish/functions/tide/configure/configs/rainbow.fish +++ b/.config/fish/functions/tide/configure/configs/rainbow.fish @@ -49,12 +49,10 @@ tide_java_color 000000 tide_jobs_bg_color 444444 tide_jobs_color 4E9A06 tide_jobs_number_threshold 1000 -tide_jj_color 000000 -tide_jj_bg_color 4E9A06 tide_kubectl_bg_color 326CE5 tide_kubectl_color 000000 tide_left_prompt_frame_enabled true -tide_left_prompt_items pwd vcs newline +tide_left_prompt_items pwd git newline tide_left_prompt_prefix '' tide_left_prompt_separator_diff_color  tide_left_prompt_separator_same_color  @@ -81,7 +79,7 @@ tide_pwd_bg_color 3465A4 tide_pwd_color_anchors E4E4E4 tide_pwd_color_dirs E4E4E4 tide_pwd_color_truncated_dirs BCBCBC -tide_pwd_markers .bzr .citc .git .hg .jj .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform bun.lockb Cargo.toml composer.json CVS go.mod package.json build.zig +tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform bun.lockb Cargo.toml composer.json CVS go.mod package.json build.zig tide_python_bg_color 444444 tide_python_color 00AFAF tide_right_prompt_frame_enabled true @@ -101,8 +99,6 @@ tide_status_bg_color 2E3436 tide_status_bg_color_failure CC0000 tide_status_color 4E9A06 tide_status_color_failure FFFF00 -tide_sudo_bg_color D3D7CF -tide_sudo_color 000000 tide_terraform_bg_color 800080 tide_terraform_color 000000 tide_time_bg_color D3D7CF diff --git a/.config/fish/functions/tide/configure/configs/rainbow_16color.fish b/.config/fish/functions/tide/configure/configs/rainbow_16color.fish index b34b2bd..5d20611 100644 --- a/.config/fish/functions/tide/configure/configs/rainbow_16color.fish +++ b/.config/fish/functions/tide/configure/configs/rainbow_16color.fish @@ -41,8 +41,6 @@ tide_java_bg_color yellow tide_java_color black tide_jobs_bg_color brblack tide_jobs_color green -tide_jj_bg_color green -tide_jj_color black tide_kubectl_bg_color blue tide_kubectl_color black tide_nix_shell_bg_color brblue @@ -75,8 +73,6 @@ tide_status_bg_color black tide_status_bg_color_failure red tide_status_color green tide_status_color_failure bryellow -tide_sudo_bg_color white -tide_sudo_color black tide_terraform_bg_color magenta tide_terraform_color black tide_time_bg_color white diff --git a/.config/fish/functions/tide/configure/functions/_fake_tide_cache_variables.fish b/.config/fish/functions/tide/configure/functions/_fake_tide_cache_variables.fish index 1e8b84a..4661ab1 100644 --- a/.config/fish/functions/tide/configure/functions/_fake_tide_cache_variables.fish +++ b/.config/fish/functions/tide/configure/functions/_fake_tide_cache_variables.fish @@ -4,8 +4,8 @@ function _fake_tide_cache_variables set -gx _fake_tide_color_truncated_dirs "$(set_color $fake_tide_pwd_color_truncated_dirs)" set -gx _fake_tide_reset_to_color_dirs (set_color normal -b $fake_tide_pwd_bg_color; set_color $fake_tide_pwd_color_dirs) - # vcs - contains vcs $fake_tide_left_prompt_items $fake_tide_right_prompt_items && + # git + contains git $fake_tide_left_prompt_items $fake_tide_right_prompt_items && set -gx _fake_tide_location_color "$(set_color $fake_tide_git_color_branch)" # private_mode diff --git a/.config/fish/functions/tide/configure/functions/_fake_tide_item_vcs.fish b/.config/fish/functions/tide/configure/functions/_fake_tide_item_git.fish similarity index 77% rename from .config/fish/functions/tide/configure/functions/_fake_tide_item_vcs.fish rename to .config/fish/functions/tide/configure/functions/_fake_tide_item_git.fish index 74941c8..fb5b957 100644 --- a/.config/fish/functions/tide/configure/functions/_fake_tide_item_vcs.fish +++ b/.config/fish/functions/tide/configure/functions/_fake_tide_item_git.fish @@ -1,3 +1,3 @@ -function _fake_tide_item_vcs +function _fake_tide_item_git _fake_tide_print_item git (set_color $fake_tide_git_color_branch) $fake_tide_git_icon' ' main end diff --git a/.config/fish/functions/tide/configure/icons.fish b/.config/fish/functions/tide/configure/icons.fish index b798ca4..a687bed 100644 --- a/.config/fish/functions/tide/configure/icons.fish +++ b/.config/fish/functions/tide/configure/icons.fish @@ -32,7 +32,6 @@ tide_rustc_icon  tide_shlvl_icon  tide_status_icon ✔ tide_status_icon_failure ✘ -tide_sudo_icon \# tide_terraform_icon 󱁢 tide_toolbox_icon  tide_vi_mode_icon_default D diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 7228912..09c87a5 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,33 +1,33 @@ { - "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" }, - "NvChad": { "branch": "v2.5", "commit": "d042cc975247c2aa55fcb228e5d146dc1dc6c648" }, + "LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" }, + "NvChad": { "branch": "v2.5", "commit": "eb209a4a82aecabe609d8206b865e00a760fb644" }, "base46": { "branch": "v2.5", "commit": "fde7a2cd54599e148d376f82980407c2d24b0fa2" }, - "cmp-async-path": { "branch": "main", "commit": "f8af3f726e07f2e9d37672eaa9102581aefce149" }, + "cmp-async-path": { "branch": "main", "commit": "b8aade3a0626f2bc1d3cd79affcd7da9f47f7ab1" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, "cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, - "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" }, - "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, - "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "mason.nvim": { "branch": "main", "commit": "bb639d4bf385a4d89f478b83af4d770be05ab7eb" }, + "conform.nvim": { "branch": "master", "commit": "ffe26e8df8115c9665d24231f8a49fadb2d611ce" }, + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" }, - "mini.trailspace": { "branch": "main", "commit": "f8083ca969e1b2098480c10f3c3c4d2ce3586680" }, + "mini.trailspace": { "branch": "main", "commit": "39a0460c025a605519fdd6bea1ce870642429996" }, "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, - "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, - "nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" }, - "nvim-lspconfig": { "branch": "master", "commit": "6f76a3eeadc2ee235d74cd7d5319e95a261084af" }, - "nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" }, - "nvim-tree.lua": { "branch": "master", "commit": "07f541fcaa4a5ae019598240362449ab7e9812b3" }, - "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, - "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, + "nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" }, + "nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" }, + "nvim-lspconfig": { "branch": "master", "commit": "7757d54716b26280b1b1785d89364a016a29c445" }, + "nvim-surround": { "branch": "main", "commit": "fcfa7e02323d57bfacc3a141f8a74498e1522064" }, + "nvim-tree.lua": { "branch": "master", "commit": "59088b96a32ea47caf4976e164dbd88b86447fb7" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, "persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" }, - "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "rainbow_csv.nvim": { "branch": "main", "commit": "26de78d8324f7ac6a3e478319d1eb1f17123eb5b" }, - "telescope.nvim": { "branch": "master", "commit": "7d324792b7943e4aa16ad007212e6acc6f9fe335" }, - "ui": { "branch": "v3.0", "commit": "3e67e9d5325fd47fdbc90ca00a147db2f3525754" }, + "telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" }, + "ui": { "branch": "v3.0", "commit": "bea2af0a76c1098fac0988ad296aa028cad2a333" }, "volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } }