commit 82fe7ff36518e3d6aa388c2dc4a5009622b0204a parent 804f50ab6f1a3b784efd37d752354bb55746a49d Author: mms <michal@sapka.me> Date: Thu, 3 Aug 2023 16:09:43 +0200 feat: remove unused software Diffstat:
32 files changed, 0 insertions(+), 1979 deletions(-)
diff --git a/fish/.config/fish/.gitignore b/fish/.config/fish/.gitignore @@ -1,2 +0,0 @@ -fish_variables -config-local.fish diff --git a/fish/.config/fish/completions/fzf_configure_bindings.fish b/fish/.config/fish/completions/fzf_configure_bindings.fish @@ -1,7 +0,0 @@ -complete fzf_configure_bindings --no-files -complete fzf_configure_bindings --long help --short h --description "Print help" -complete fzf_configure_bindings --long directory --description "Change the key binding for searching directory" -complete fzf_configure_bindings --long git_log --description "Change the key binding for searching git log" -complete fzf_configure_bindings --long git_status --description "Change the key binding for searching git status" -complete fzf_configure_bindings --long history --description "Change the key binding for searching history" -complete fzf_configure_bindings --long variables --description "Change the key binding for searching variables" diff --git a/fish/.config/fish/completions/gh.fish b/fish/.config/fish/completions/gh.fish @@ -1,176 +0,0 @@ -# fish completion for gh -*- shell-script -*- - -function __gh_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __gh_perform_completion - __gh_debug "Starting __gh_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __gh_debug "args: $args" - __gh_debug "last arg: $lastArg" - - set -l requestComp "$args[1] __complete $args[2..-1] $lastArg" - - __gh_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __gh_debug "Comps: $comps" - __gh_debug "DirectiveLine: $directiveLine" - __gh_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# This function does two things: -# - Obtain the completions and store them in the global __gh_comp_results -# - Return false if file completion should be performed -function __gh_prepare_completions - __gh_debug "" - __gh_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __gh_comp_results - - set -l results (__gh_perform_completion) - __gh_debug "Completion results: $results" - - if test -z "$results" - __gh_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $results[-1]) - set --global __gh_comp_results $results[1..-2] - - __gh_debug "Completions are: $__gh_comp_results" - __gh_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __gh_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __gh_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __gh_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __gh_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__gh_comp_results) - set --global __gh_comp_results $completions - __gh_debug "Filtered completions are: $__gh_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__gh_comp_results) - __gh_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__gh_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __gh_debug "Adding second completion to perform nospace directive" - set --global __gh_comp_results $split[1] $split[1]. - __gh_debug "Completions are now: $__gh_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __gh_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "gh" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "gh " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c gh -e - -# The call to __gh_prepare_completions will setup __gh_comp_results -# which provides the program's completion choices. -complete -c gh -n '__gh_prepare_completions' -f -a '$__gh_comp_results' - diff --git a/fish/.config/fish/completions/ghq.fish b/fish/.config/fish/completions/ghq.fish @@ -1,66 +0,0 @@ -function __fish_ghq_needs_command - set cmd (commandline -opc) - if [ (count $cmd) -eq 1 -a $cmd[1] = "ghq" ] - return 0 - end - return 1 -end - -function __fish_ghq_using_command - set cmd (commandline -opc) - if [ (count $cmd) -gt 1 ] - if [ $argv[1] = $cmd[2] ] - return 0 - end - end - return 1 -end - -# Help -function __fish_ghq_help_topics - for c in get list root create - printf "%s\thelp topic\n" $c - end -end - -function __fish_ghq_vcs - for c in git subversion git-svn mercurial darcs - printf "%s\tVCS\n" $c - end - printf "github\tAlias for git\n" - printf "svn\tAlias for subversion\n" - printf "hg\tAlias for mercurial\n" -end - -complete -f -c ghq -n "__fish_ghq_needs_command" -a help -d "Shows a list of commands or help for one command" -complete -f -c ghq -n "__fish_ghq_using_command help" -a "(__fish_ghq_help_topics)" - -complete -f -c ghq -n "__fish_ghq_needs_command" -a get -d "Clone/sync with a remote repository" -complete -f -c ghq -n "__fish_ghq_using_command get" -l update -s u -d "Update local repository if cloned already" -complete -f -c ghq -n "__fish_ghq_using_command get" -s p -d "Clone with SSH" -complete -f -c ghq -n "__fish_ghq_using_command get" -l shallow -d "Do a shallow clone" -complete -f -c ghq -n "__fish_ghq_using_command get" -l look -s l -d "Look after get" -complete -f -c ghq -n "__fish_ghq_using_command get" -l vcs -d "Specify VCS backend for cloning" -r -a "(__fish_ghq_vcs)" -complete -f -c ghq -n "__fish_ghq_using_command get" -l silent -s s -d "Clone or update silently" -complete -f -c ghq -n "__fish_ghq_using_command get" -l no-recursive -d "Prevent recursive fetching" -complete -f -c ghq -n "__fish_ghq_using_command get" -l branch -s b -d "Specify branch name. This flag implies --single-branch on Git" -complete -f -c ghq -n "__fish_ghq_using_command get" -l parallel -s P -d "Import parallely" -complete -f -c ghq -n "__fish_ghq_using_command get" -l help -s h -d "Show help" - -complete -f -c ghq -n "__fish_ghq_needs_command" -a list -d "List local repositories" -complete -f -c ghq -n "__fish_ghq_using_command list" -l exact -s e -d "Perform an exact match" -complete -f -c ghq -n "__fish_ghq_using_command list" -l vcs -d "Specify VCS backend for matching" -r -a "(__fish_ghq_vcs)" -complete -f -c ghq -n "__fish_ghq_using_command list" -l full-path -s p -d "Print full paths" -complete -f -c ghq -n "__fish_ghq_using_command list" -l unique -d "Print unique subpaths" -complete -f -c ghq -n "__fish_ghq_using_command list" -l help -s h -d "Show help" - -complete -f -c ghq -n "__fish_ghq_needs_command" -a root -d "Show repositories' root" -complete -f -c ghq -n "__fish_ghq_using_command root" -l all -d "Show all roots" -complete -f -c ghq -n "__fish_ghq_using_command root" -l help -s h -d "Show help" - -complete -f -c ghq -n "__fish_ghq_needs_command" -a create -d "Create a new repository" -complete -f -c ghq -n "__fish_ghq_using_command create" -l vcs -d "Specify VCS backend explicitly" -r -a "(__fish_ghq_vcs)" -complete -f -c ghq -n "__fish_ghq_using_command create" -l help -s h -d "Show help" - -complete -f -c ghq -n "__fish_ghq_needs_command" -l help -s h -d "Show help" -complete -f -c ghq -n "__fish_ghq_needs_command" -l version -s v -d "Print the version" diff --git a/fish/.config/fish/conf.d/fzf.fish b/fish/.config/fish/conf.d/fzf.fish @@ -1,28 +0,0 @@ -# fzf.fish is only meant to be used in interactive mode. If not in interactive mode and not in CI, skip the config to speed up shell startup -if not status is-interactive && test "$CI" != true - exit -end - -# Because of scoping rules, to capture the shell variables exactly as they are, we must read -# them before even executing _fzf_search_variables. We use psub to store the -# variables' info in temporary files and pass in the filenames as arguments. -# This variable is global so that it can be referenced by fzf_configure_bindings and in tests -set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)' - - -# Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings -fzf_configure_bindings - -# Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased -function _fzf_uninstall --on-event fzf_uninstall - _fzf_uninstall_bindings - - set --erase _fzf_search_vars_command - functions --erase _fzf_uninstall _fzf_migration_message _fzf_uninstall_bindings fzf_configure_bindings - complete --erase fzf_configure_bindings - - set_color cyan - echo "fzf.fish uninstalled." - echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings." - set_color normal -end diff --git a/fish/.config/fish/conf.d/ghq_key_bindings.fish b/fish/.config/fish/conf.d/ghq_key_bindings.fish @@ -1,4 +0,0 @@ -bind \cg '__ghq_repository_search' -if bind -M insert >/dev/null 2>/dev/null - bind -M insert \cg '__ghq_repository_search' -end diff --git a/fish/.config/fish/conf.d/z.fish b/fish/.config/fish/conf.d/z.fish @@ -1,63 +0,0 @@ -if test -z "$Z_DATA" - if test -z "$XDG_DATA_HOME" - set -U Z_DATA_DIR "$HOME/.local/share/z" - else - set -U Z_DATA_DIR "$XDG_DATA_HOME/z" - end - set -U Z_DATA "$Z_DATA_DIR/data" -end - -if test ! -e "$Z_DATA" - if test ! -e "$Z_DATA_DIR" - mkdir -p -m 700 "$Z_DATA_DIR" - end - touch "$Z_DATA" -end - -if test -z "$Z_CMD" - set -U Z_CMD z -end - -set -U ZO_CMD "$Z_CMD"o - -if test ! -z $Z_CMD - function $Z_CMD -d "jump around" - __z $argv - end -end - -if test ! -z $ZO_CMD - function $ZO_CMD -d "open target dir" - __z -d $argv - end -end - -if not set -q Z_EXCLUDE - set -U Z_EXCLUDE "^$HOME\$" -else if contains $HOME $Z_EXCLUDE - # Workaround: migrate old default values to a regex (see #90). - set Z_EXCLUDE (string replace -r -- "^$HOME\$" '^'$HOME'$$' $Z_EXCLUDE) -end - -# Setup completions once first -__z_complete - -function __z_on_variable_pwd --on-variable PWD - __z_add -end - -function __z_uninstall --on-event z_uninstall - functions -e __z_on_variable_pwd - functions -e $Z_CMD - functions -e $ZO_CMD - - if test ! -z "$Z_DATA" - printf "To completely erase z's data, remove:\n" >/dev/stderr - printf "%s\n" "$Z_DATA" >/dev/stderr - end - - set -e Z_CMD - set -e ZO_CMD - set -e Z_DATA - set -e Z_EXCLUDE -end diff --git a/fish/.config/fish/config-linux.fish b/fish/.config/fish/config-linux.fish @@ -1,5 +0,0 @@ -alias tmux="tmux -u" - -source ~/.asdf/asdf.fish -starship init fish - diff --git a/fish/.config/fish/config-osx.fish b/fish/.config/fish/config-osx.fish @@ -1,3 +0,0 @@ -set -gx PATH /opt/homebrew/bin $PATH -source /opt/homebrew/opt/asdf/asdf.fish - diff --git a/fish/.config/fish/config-zendesk.fish b/fish/.config/fish/config-zendesk.fish @@ -1,4 +0,0 @@ -# magic used to make my work life easier -alias grid="docker run -it --rm -v ~/.grid.yml:/root/.grid.yml -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" -v ~/.ssh:/root/.ssh -v ~/.aws/credentials:/root/.aws/credentials -v ~/.goship.yaml:/root/.goship.yaml -v ~/.saml2aws:/root/.saml2aws -e TIMEZONE=Europe/Warsaw 724670621497.dkr.ecr.us-east-1.amazonaws.com/grid:stable grid $argv" - -set FUTURE_KISS_CONFIG_PROFILE "local" diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish @@ -1,56 +0,0 @@ -set fish_greeting "My terminal? I like to keep it where my heart used to be." -set -gx TERM xterm-256color - -# nvim for all -command -qv nvim && alias vim nvim && alias vi nvim -set -gx EDITOR nvim - -fish_vi_key_bindings - -# exa -alias ll="exa -l --icons" -alias lla="exa -la --icons" - -# git aliases as muscle memory die hard -alias ga "git add" -alias gaa "git add --all" -alias gc "git commit" -alias gp "git push" -alias gst "git status" -alias gco "git checkout" -alias gs "gst" - -# ruby aliases -alias be "bundle exec" -alias rspec "bundle exec rspec" -alias rspecf "bundle exec rspec --only-failures" - -# paths -set -gx PATH bin $PATH -set -gx PATH ~/bin $PATH -set -gx PATH ~/.local/bin $PATH - - -# theme -set -g theme_color_scheme terminal-dark -set -g fish_prompt_pwd_dir_length 1 -set -g theme_display_user yes -set -g theme_hide_hostname no -set -g theme_hostname always - -# OS specific configurations -switch (uname) - case Darwin - source (dirname (status --current-filename))/config-osx.fish - case Linux - source (dirname (status --current-filename))/config-linux.fish -end -source (dirname (status --current-filename))/config-zendesk.fish - -# local config, not versionated at is contains secrets -set LOCAL_CONFIG (dirname (status --current-filename))/config-local.fish -if test -f $LOCAL_CONFIG - source $LOCAL_CONFIG -end -# prompt config -starship init fish | source diff --git a/fish/.config/fish/fish_plugins b/fish/.config/fish/fish_plugins @@ -1,3 +0,0 @@ -jethrokuan/z -/Users/msapka/install -decors/fish-ghq diff --git a/fish/.config/fish/functions/__ghq_repository_search.fish b/fish/.config/fish/functions/__ghq_repository_search.fish @@ -1,22 +0,0 @@ -function __ghq_repository_search -d 'Repository search' - set -l selector - [ -n "$GHQ_SELECTOR" ]; and set selector $GHQ_SELECTOR; or set selector fzf - set -l selector_options - [ -n "$GHQ_SELECTOR_OPTS" ]; and set selector_options $GHQ_SELECTOR_OPTS - - if not type -qf $selector - printf "\nERROR: '$selector' not found.\n" - return 1 - end - - set -l query (commandline -b) - [ -n "$query" ]; and set flags --query="$query"; or set flags - switch "$selector" - case fzf fzf-tmux peco percol fzy sk - ghq list --full-path | "$selector" $selector_options $flags | read select - case \* - printf "\nERROR: plugin-ghq is not support '$selector'.\n" - end - [ -n "$select" ]; and cd "$select" - commandline -f repaint -end diff --git a/fish/.config/fish/functions/__z.fish b/fish/.config/fish/functions/__z.fish @@ -1,174 +0,0 @@ -function __z -d "Jump to a recent directory." - function __print_help -d "Print z help." - printf "Usage: $Z_CMD [-celrth] string1 string2...\n\n" - printf " -c --clean Removes directories that no longer exist from $Z_DATA\n" - printf " -d --dir Opens matching directory using system file manager.\n" - printf " -e --echo Prints best match, no cd\n" - printf " -l --list List matches and scores, no cd\n" - printf " -p --purge Delete all entries from $Z_DATA\n" - printf " -r --rank Search by rank\n" - printf " -t --recent Search by recency\n" - printf " -x --delete Removes the current directory from $Z_DATA\n" - printf " -h --help Print this help\n\n" - end - function __z_legacy_escape_regex - # taken from escape_string_pcre2 in fish - # used to provide compatibility with fish 2 - for c in (string split '' $argv) - if contains $c (string split '' '.^$*+()?[{}\\|-]') - printf \\ - end - printf '%s' $c - end - end - - set -l options h/help c/clean e/echo l/list p/purge r/rank t/recent d/directory x/delete - - argparse $options -- $argv - - if set -q _flag_help - __print_help - return 0 - else if set -q _flag_clean - __z_clean - printf "%s cleaned!\n" $Z_DATA - return 0 - else if set -q _flag_purge - echo >$Z_DATA - printf "%s purged!\n" $Z_DATA - return 0 - else if set -q _flag_delete - sed -i -e "\:^$PWD|.*:d" $Z_DATA - return 0 - end - - set -l typ - - if set -q _flag_rank - set typ rank - else if set -q _flag_recent - set typ recent - end - - set -l z_script ' - function frecent(rank, time) { - dx = t-time - if( dx < 3600 ) return rank*4 - if( dx < 86400 ) return rank*2 - if( dx < 604800 ) return rank/2 - return rank/4 - } - - function output(matches, best_match, common) { - # list or return the desired directory - if( list ) { - cmd = "sort -nr" - for( x in matches ) { - if( matches[x] ) { - printf "%-10s %s\n", matches[x], x | cmd - } - } - } else { - if( common ) best_match = common - print best_match - } - } - - function common(matches) { - # find the common root of a list of matches, if it exists - for( x in matches ) { - if( matches[x] && (!short || length(x) < length(short)) ) { - short = x - } - } - if( short == "/" ) return - for( x in matches ) if( matches[x] && index(x, short) != 1 ) { - return - } - return short - } - - BEGIN { - hi_rank = ihi_rank = -9999999999 - } - { - if( typ == "rank" ) { - rank = $2 - } else if( typ == "recent" ) { - rank = $3 - t - } else rank = frecent($2, $3) - if( $1 ~ q ) { - matches[$1] = rank - } else if( tolower($1) ~ tolower(q) ) imatches[$1] = rank - if( matches[$1] && matches[$1] > hi_rank ) { - best_match = $1 - hi_rank = matches[$1] - } else if( imatches[$1] && imatches[$1] > ihi_rank ) { - ibest_match = $1 - ihi_rank = imatches[$1] - } - } - - END { - # prefer case sensitive - if( best_match ) { - output(matches, best_match, common(matches)) - } else if( ibest_match ) { - output(imatches, ibest_match, common(imatches)) - } - } - ' - - set -l qs - for arg in $argv - set -l escaped $arg - if string escape --style=regex '' >/dev/null 2>&1 # use builtin escape if available - set escaped (string escape --style=regex $escaped) - else - set escaped (__z_legacy_escape_regex $escaped) - end - # Need to escape twice, see https://www.math.utah.edu/docs/info/gawk_5.html#SEC32 - set escaped (string replace --all \\ \\\\ $escaped) - set qs $qs $escaped - end - set -l q (string join '.*' $qs) - - if set -q _flag_list - # Handle list separately as it can print common path information to stderr - # which cannot be captured from a subcommand. - command awk -v t=(date +%s) -v list="list" -v typ="$typ" -v q="$q" -F "|" $z_script "$Z_DATA" - return - end - - set target (command awk -v t=(date +%s) -v typ="$typ" -v q="$q" -F "|" $z_script "$Z_DATA") - - if test "$status" -gt 0 - return - end - - if test -z "$target" - printf "'%s' did not match any results\n" "$argv" - return 1 - end - - if set -q _flag_echo - printf "%s\n" "$target" - else if set -q _flag_directory - if test -n "$ZO_METHOD" - type -q "$ZO_METHOD"; and "$ZO_METHOD" "$target"; and return $status - echo "Cannot open with ZO_METHOD set to $ZO_METHOD"; and return 1 - else if test "$OS" = Windows_NT - # Be careful, in msys2, explorer always return 1 - type -q explorer; and explorer "$target" - return 0 - echo "Cannot open file explorer" - return 1 - else - type -q xdg-open; and xdg-open "$target"; and return $status - type -q open; and open "$target"; and return $status - echo "Not sure how to open file manager"; and return 1 - end - else - pushd "$target" - end -end diff --git a/fish/.config/fish/functions/__z_add.fish b/fish/.config/fish/functions/__z_add.fish @@ -1,49 +0,0 @@ -function __z_add -d "Add PATH to .z file" - test -n "$fish_private_mode"; and return 0 - - for i in $Z_EXCLUDE - if string match -r $i $PWD >/dev/null - return 0 #Path excluded - end - end - - set -l tmpfile (mktemp $Z_DATA.XXXXXX) - - if test -f $tmpfile - set -l path (string replace --all \\ \\\\ $PWD) - command awk -v path=$path -v now=(date +%s) -F "|" ' - BEGIN { - rank[path] = 1 - time[path] = now - } - $2 >= 1 { - if( $1 == path ) { - rank[$1] = $2 + 1 - time[$1] = now - } - else { - rank[$1] = $2 - time[$1] = $3 - } - count += $2 - } - END { - if( count > 1000 ) { - for( i in rank ) print i "|" 0.9*rank[i] "|" time[i] # aging - } - else for( i in rank ) print i "|" rank[i] "|" time[i] - } - ' $Z_DATA 2>/dev/null >$tmpfile - - if test ! -z "$Z_OWNER" - chown $Z_OWNER:(id -ng $Z_OWNER) $tmpfile - end - # - # Don't use redirection here as it can lead to a race condition where $Z_DATA is clobbered. - # Note: There is a still a possible race condition where an old version of $Z_DATA is - # read by one instance of Fish before another instance of Fish writes its copy. - # - command mv $tmpfile $Z_DATA - or command rm $tmpfile - end -end diff --git a/fish/.config/fish/functions/__z_clean.fish b/fish/.config/fish/functions/__z_clean.fish @@ -1,11 +0,0 @@ -function __z_clean -d "Clean up .z file to remove paths no longer valid" - set -l tmpfile (mktemp $Z_DATA.XXXXXX) - - if test -f $tmpfile - while read line - set -l path (string split '|' $line)[1] - test -d $path; and echo $line - end <$Z_DATA >$tmpfile - command mv -f $tmpfile $Z_DATA - end -end diff --git a/fish/.config/fish/functions/__z_complete.fish b/fish/.config/fish/functions/__z_complete.fish @@ -1,13 +0,0 @@ -function __z_complete -d "add completions" - complete -c $Z_CMD -a "(__z -l | string replace -r '^\\S*\\s*' '')" -f -k - complete -c $ZO_CMD -a "(__z -l | string replace -r '^\\S*\\s*' '')" -f -k - - complete -c $Z_CMD -s c -l clean -d "Cleans out $Z_DATA" - complete -c $Z_CMD -s e -l echo -d "Prints best match, no cd" - complete -c $Z_CMD -s l -l list -d "List matches, no cd" - complete -c $Z_CMD -s p -l purge -d "Purges $Z_DATA" - complete -c $Z_CMD -s r -l rank -d "Searches by rank, cd" - complete -c $Z_CMD -s t -l recent -d "Searches by recency, cd" - complete -c $Z_CMD -s h -l help -d "Print help" - complete -c $Z_CMD -s x -l delete -d "Removes the current directory from $Z_DATA" -end diff --git a/fish/.config/fish/functions/_fzf_configure_bindings_help.fish b/fish/.config/fish/functions/_fzf_configure_bindings_help.fish @@ -1,43 +0,0 @@ -function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings." - echo "\ -USAGE: - fzf_configure_bindings [--FEATURE[=KEY_SEQUENCE]...] - -DESCRIPTION - By default, fzf_configure_bindings installs mnemonic key bindings for fzf.fish's features. Each - feature's binding can be customized through a corresponding namesake option: - FEATURE | MNEMONIC KEY SEQUENCE | CORRESPONDING OPTION - Search directory | Ctrl+Alt+F (F for file) | --directory - Search git log | Ctrl+Alt+L (L for log) | --git_log - Search git status | Ctrl+Alt+S (S for status) | --git_status - Search history | Ctrl+R (R for reverse) | --history - Search variables | Ctrl+V (V for variable) | --variables - Search processes | Ctrl+Alt+P (P for process) | --processes - An option with a key sequence value overrides the binding for its feature, while an option - without a value disables the binding. A feature that is not customized retains its default - menomonic binding specified above. Key bindings are installed for default and insert modes. - - In terms of validation, fzf_configure_bindings fails if passed unknown options. Furthermore, it - expects an equals sign between an option's name and value. However, it does not validate key - sequences. Rather, consider using fish_key_reader to manually validate them. - - In terms of experimentation, fzf_configure_bindings erases any bindings it previously installed - before installing new ones so it can be repeatedly executed in the same fish session without - problem. Once the desired fzf_configure_bindings command has been found, add it to config.fish - in order to persist the bindings. - - The -h and --help options print this help message. - -EXAMPLES - Install the default mnemonic bindings - \$ fzf_configure_bindings - Install the default bindings but override git log's binding to Ctrl+G - \$ fzf_configure_bindings --git_log=\cg - Install the default bindings but leave search history unbound - \$ fzf_configure_bindings --history - Alternative style of disabling search history - \$ fzf_configure_bindings --history= - An agglomeration of all the options - \$ fzf_configure_bindings --git_status=\cg --history=\ch --variables --directory --git_log -" -end diff --git a/fish/.config/fish/functions/_fzf_extract_var_info.fish b/fish/.config/fish/functions/_fzf_extract_var_info.fish @@ -1,15 +0,0 @@ -# helper function for _fzf_search_variables -function _fzf_extract_var_info --argument-names variable_name set_show_output --description "Extract and reformat lines pertaining to \$variable_name from \$set_show_output." - # Extract only the lines about the variable, all of which begin with either - # $variable_name: ...or... $variable_name[ - string match --regex "^\\\$$variable_name(?::|\[).*" <$set_show_output | - - # Strip the variable name prefix, including ": " for scope info lines - string replace --regex "^\\\$$variable_name(?:: )?" '' | - - # Distill the lines of values, replacing... - # [1]: |value| - # ...with... - # [1] value - string replace --regex ": \|(.*)\|" ' $1' -end diff --git a/fish/.config/fish/functions/_fzf_preview_changed_file.fish b/fish/.config/fish/functions/_fzf_preview_changed_file.fish @@ -1,30 +0,0 @@ -# helper for _fzf_search_git_status -# arg should be a line from git status --short, e.g. -# MM functions/_fzf_preview_changed_file.fish -# D README.md -# R LICENSE.md -> LICENSE -function _fzf_preview_changed_file --description "Show the untracked, staged, and/or unstaged changes in the given file." - set -l path (string split ' ' $argv)[-1] - # first letter of short format shows index, second letter shows working tree - # https://git-scm.com/docs/git-status/2.35.0#_output - set -l index_status (string sub --length 1 $argv) - set -l working_tree_status (string sub --start 2 --length 1 $argv) - - if test $index_status = '?' - _fzf_report_diff_type Untracked - _fzf_preview_file $path - else - # no-prefix because the file is always being compared to itself so is unecessary - set diff_opts --color=always --no-prefix - - if test $index_status != ' ' - _fzf_report_diff_type Staged - git diff --staged $diff_opts -- $path - end - - if test $working_tree_status != ' ' - _fzf_report_diff_type Unstaged - git diff $diff_opts -- $path - end - end -end diff --git a/fish/.config/fish/functions/_fzf_preview_file.fish b/fish/.config/fish/functions/_fzf_preview_file.fish @@ -1,43 +0,0 @@ -# helper function for _fzf_search_directory and _fzf_search_git_status -function _fzf_preview_file --description "Print a preview for the given file based on its file type." - # because there's no way to guarantee that _fzf_search_directory passes the path to _fzf_preview_file - # as one argument, we collect all the arguments into one single variable and treat that as the path - set file_path $argv - - if test -L "$file_path" # symlink - # notify user and recurse on the target of the symlink, which can be any of these file types - set -l target_path (realpath "$file_path") - - set_color yellow - echo "'$file_path' is a symlink to '$target_path'." - set_color normal - - _fzf_preview_file "$target_path" - else if test -f "$file_path" # regular file - if set --query fzf_preview_file_cmd - # need to escape quotes to make sure eval receives file_path as a single arg - eval "$fzf_preview_file_cmd '$file_path'" - else - bat --style=numbers --color=always "$file_path" - end - else if test -d "$file_path" # directory - if set --query fzf_preview_dir_cmd - # see above - eval "$fzf_preview_dir_cmd '$file_path'" - else - # -A list hidden files as well, except for . and .. - # -F helps classify files by appending symbols after the file name - command ls -A -F "$file_path" - end - else if test -c "$file_path" - _fzf_report_file_type "$file_path" "character device file" - else if test -b "$file_path" - _fzf_report_file_type "$file_path" "block device file" - else if test -S "$file_path" - _fzf_report_file_type "$file_path" socket - else if test -p "$file_path" - _fzf_report_file_type "$file_path" "named pipe" - else - echo "$file_path doesn't exist." >&2 - end -end diff --git a/fish/.config/fish/functions/_fzf_report_diff_type.fish b/fish/.config/fish/functions/_fzf_report_diff_type.fish @@ -1,16 +0,0 @@ -# helper for _fzf_preview_changed_file -# prints out something like -# +--------+ -# | Staged | -# +--------+ -function _fzf_report_diff_type --argument-names diff_type --description "Print a distinct colored header meant to preface a git patch." - # number of "-" to draw is the length of the string to box + 2 for padding - set repeat_count (math 2 + (string length $diff_type)) - set horizontal_border +(string repeat --count $repeat_count -)+ - - set_color yellow - echo $horizontal_border - echo "| $diff_type |" - echo $horizontal_border - set_color normal -end diff --git a/fish/.config/fish/functions/_fzf_report_file_type.fish b/fish/.config/fish/functions/_fzf_report_file_type.fish @@ -1,6 +0,0 @@ -# helper function for _fzf_preview_file -function _fzf_report_file_type --argument-names file_path file_type --description "Explain the file type for a file." - set_color red - echo "Cannot preview '$file_path': it is a $file_type." - set_color normal -end diff --git a/fish/.config/fish/functions/_fzf_search_directory.fish b/fish/.config/fish/functions/_fzf_search_directory.fish @@ -1,44 +0,0 @@ -function _fzf_search_directory --description "Search the current directory. Replace the current token with the selected file paths." - # --string-cwd-prefix prevents fd >= 8.3.0 from prepending ./ to relative paths - set fd_opts --color=always --strip-cwd-prefix $fzf_fd_opts - - set fzf_arguments --multi --ansi $fzf_dir_opts - set token (commandline --current-token) - # expand any variables or leading tilde (~) in the token - set expanded_token (eval echo -- $token) - # unescape token because it's already quoted so backslashes will mess up the path - set unescaped_exp_token (string unescape -- $expanded_token) - - # If the current token is a directory and has a trailing slash, - # then use it as fd's base directory. - if string match --quiet -- "*/" $unescaped_exp_token && test -d "$unescaped_exp_token" - set --append fd_opts --base-directory=$unescaped_exp_token - # use the directory name as fzf's prompt to indicate the search is limited to that directory - set --prepend fzf_arguments --prompt="$unescaped_exp_token" --preview="_fzf_preview_file $expanded_token{}" - set file_paths_selected $unescaped_exp_token(fd $fd_opts 2>/dev/null | _fzf_wrapper $fzf_arguments) - else - set --prepend fzf_arguments --query="$unescaped_exp_token" --preview='_fzf_preview_file {}' - set file_paths_selected (fd $fd_opts 2>/dev/null | _fzf_wrapper $fzf_arguments) - end - - - if test $status -eq 0 - # Fish will cd implicitly if a directory name ending in a slash is provided. - # To help the user leverage this feature, we automatically append / to the selected path if - # - only one path was selected, - # - the user was in the middle of inputting the first token, - # - the path is a directory - # Then, the user only needs to hit Enter once more to cd into that directory. - if test (count $file_paths_selected) = 1 - set commandline_tokens (commandline --tokenize) - if test "$commandline_tokens" = "$token" -a -d "$file_paths_selected" \ - -a (fd --version | string replace --regex --all '[^\d]' '') -lt 840 - set file_paths_selected $file_paths_selected/ - end - end - - commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ') - end - - commandline --function repaint -end diff --git a/fish/.config/fish/functions/_fzf_search_git_log.fish b/fish/.config/fish/functions/_fzf_search_git_log.fish @@ -1,28 +0,0 @@ -function _fzf_search_git_log --description "Search the output of git log and preview commits. Replace the current token with the selected commit hash." - if not git rev-parse --git-dir >/dev/null 2>&1 - echo '_fzf_search_git_log: Not in a git repository.' >&2 - else - # see documentation for git format placeholders at https://git-scm.com/docs/git-log#Documentation/git-log.txt-emnem - # %h gives you the abbreviated commit hash, which is useful for saving screen space, but we will have to expand it later below - set log_fmt_str '%C(bold blue)%h%C(reset) - %C(cyan)%ad%C(reset) %C(yellow)%d%C(reset) %C(normal)%s%C(reset) %C(dim normal)[%an]%C(reset)' - set selected_log_lines ( - git log --color=always --format=format:$log_fmt_str --date=short | \ - _fzf_wrapper --ansi \ - --multi \ - --tiebreak=index \ - --preview='git show --color=always --stat --patch {1}' \ - --query=(commandline --current-token) \ - $fzf_git_log_opts - ) - if test $status -eq 0 - for line in $selected_log_lines - set abbreviated_commit_hash (string split --field 1 " " $line) - set full_commit_hash (git rev-parse $abbreviated_commit_hash) - set --append commit_hashes $full_commit_hash - end - commandline --current-token --replace (string join ' ' $commit_hashes) - end - end - - commandline --function repaint -end diff --git a/fish/.config/fish/functions/_fzf_search_git_status.fish b/fish/.config/fish/functions/_fzf_search_git_status.fish @@ -1,34 +0,0 @@ -function _fzf_search_git_status --description "Search the output of git status. Replace the current token with the selected file paths." - if not git rev-parse --git-dir >/dev/null 2>&1 - echo '_fzf_search_git_status: Not in a git repository.' >&2 - else - set selected_paths ( - # Pass configuration color.status=always to force status to use colors even though output is sent to a pipe - git -c color.status=always status --short | - _fzf_wrapper --ansi \ - --multi \ - --query=(commandline --current-token) \ - --preview='_fzf_preview_changed_file {}' \ - $fzf_git_status_opts - ) - if test $status -eq 0 - # git status --short automatically escapes the paths of most files for us so not going to bother trying to handle - # the few edges cases of weird file names that should be extremely rare (e.g. "this;needs;escaping") - set cleaned_paths - - for path in $selected_paths - if test (string sub --length 1 $path) = R - # path has been renamed and looks like "R LICENSE -> LICENSE.md" - # extract the path to use from after the arrow - set --append cleaned_paths (string split -- "-> " $path)[-1] - else - set --append cleaned_paths (string sub --start=4 $path) - end - end - - commandline --current-token --replace -- (string join ' ' $cleaned_paths) - end - end - - commandline --function repaint -end diff --git a/fish/.config/fish/functions/_fzf_search_history.fish b/fish/.config/fish/functions/_fzf_search_history.fish @@ -1,30 +0,0 @@ -function _fzf_search_history --description "Search command history. Replace the command line with the selected command." - # history merge incorporates history changes from other fish sessions - # it errors out if called in private mode - if test -z "$fish_private_mode" - builtin history merge - end - - # Delinate commands throughout pipeline using null rather than newlines because commands can be multi-line - set commands_selected ( - # Reference https://devhints.io/strftime to understand strftime format symbols - builtin history --null --show-time="%m-%d %H:%M:%S │ " | - _fzf_wrapper --read0 \ - --print0 \ - --multi \ - --tiebreak=index \ - --query=(commandline) \ - --preview="echo -- {4..} | fish_indent --ansi" \ - --preview-window="bottom:3:wrap" \ - $fzf_history_opts | - string split0 | - # remove timestamps from commands selected - string replace --regex '^\d\d-\d\d \d\d:\d\d:\d\d │ ' '' - ) - - if test $status -eq 0 - commandline --replace -- $commands_selected - end - - commandline --function repaint -end diff --git a/fish/.config/fish/functions/_fzf_search_processes.fish b/fish/.config/fish/functions/_fzf_search_processes.fish @@ -1,28 +0,0 @@ -function _fzf_search_processes --description "Search all running processes. Replace the current token with the pid of the selected process." - # use all caps to be consistent with ps default format - # snake_case because ps doesn't seem to allow spaces in the field names - set ps_preview_fmt (string join ',' 'pid' 'ppid=PARENT' 'user' '%cpu' 'rss=RSS_IN_KB' 'start=START_TIME' 'command') - set processes_selected ( - ps -A -opid,command | \ - _fzf_wrapper --multi \ - --query (commandline --current-token) \ - --ansi \ - # first line outputted by ps is a header, so we need to mark it as so - --header-lines=1 \ - # ps uses exit code 1 if the process was not found, in which case show an message explaining so - --preview="ps -o '$ps_preview_fmt' -p {1} || echo 'Cannot preview {1} because it exited.'" \ - --preview-window="bottom:4:wrap" \ - $fzf_processes_opts - ) - - if test $status -eq 0 - for process in $processes_selected - set --append pids_selected (string split --no-empty --field=1 -- " " $process) - end - - # string join to replace the newlines outputted by string split with spaces - commandline --current-token --replace -- (string join ' ' $pids_selected) - end - - commandline --function repaint -end diff --git a/fish/.config/fish/functions/_fzf_search_variables.fish b/fish/.config/fish/functions/_fzf_search_variables.fish @@ -1,46 +0,0 @@ -# This function expects the following two arguments: -# argument 1 = output of (set --show | psub), i.e. a file with the scope info and values of all variables -# argument 2 = output of (set --names | psub), i.e. a file with all variable names -function _fzf_search_variables --argument-names set_show_output set_names_output --description "Search and preview shell variables. Replace the current token with the selected variable." - if test -z "$set_names_output" - printf '%s\n' '_fzf_search_variables requires 2 arguments.' >&2 - - commandline --function repaint - return 22 # 22 means invalid argument in POSIX - end - - # Exclude the history variable from being piped into fzf because - # 1. it's not included in $set_names_output - # 2. it tends to be a very large value => increases computation time - # 3._fzf_search_history is a much better way to examine history anyway - set all_variable_names (string match --invert history <$set_names_output) - - set current_token (commandline --current-token) - # Use the current token to pre-populate fzf's query. If the current token begins - # with a $, remove it from the query so that it will better match the variable names - set cleaned_curr_token (string replace -- '$' '' $current_token) - - set variable_names_selected ( - printf '%s\n' $all_variable_names | - _fzf_wrapper --preview "_fzf_extract_var_info {} $set_show_output" \ - --preview-window="wrap" \ - --multi \ - --query=$cleaned_curr_token \ - $fzf_shell_vars_opts - ) - - if test $status -eq 0 - # If the current token begins with a $, do not overwrite the $ when - # replacing the current token with the selected variable. - # Uses brace expansion to prepend $ to each variable name. - commandline --current-token --replace ( - if string match --quiet -- '$*' $current_token - string join " " \${$variable_names_selected} - else - string join " " $variable_names_selected - end - ) - end - - commandline --function repaint -end diff --git a/fish/.config/fish/functions/_fzf_wrapper.fish b/fish/.config/fish/functions/_fzf_wrapper.fish @@ -1,20 +0,0 @@ -function _fzf_wrapper --description "Prepares some environment variables before executing fzf." - # Make sure fzf uses fish to execute preview commands, some of which - # are autoloaded fish functions so don't exist in other shells. - # Use --local so that it doesn't clobber SHELL outside of this function. - set --local --export SHELL (command --search fish) - - # If FZF_DEFAULT_OPTS is not set, then set some sane defaults. - # See https://github.com/junegunn/fzf#environment-variables - if not set --query FZF_DEFAULT_OPTS - # cycle allows jumping between the first and last results, making scrolling faster - # layout=reverse lists results top to bottom, mimicking the familiar layouts of git log, history, and env - # border shows where the fzf window begins and ends - # height=90% leaves space to see the current command and some scrollback, maintaining context of work - # preview-window=wrap wraps long lines in the preview window, making reading easier - # marker=* makes the multi-select marker more distinguishable from the pointer (since both default to >) - set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"' - end - - fzf $argv -end diff --git a/fish/.config/fish/functions/fzf_configure_bindings.fish b/fish/.config/fish/functions/fzf_configure_bindings.fish @@ -1,46 +0,0 @@ -# Always installs bindings for insert and default mode for simplicity and b/c it has almost no side-effect -# https://gitter.im/fish-shell/fish-shell?at=60a55915ee77a74d685fa6b1 -function fzf_configure_bindings --description "Installs the default key bindings for fzf.fish with user overrides passed as options." - # no need to install bindings if not in interactive mode or running tests - status is-interactive || test "$CI" = true; or return - - set options_spec h/help 'directory=?' 'git_log=?' 'git_status=?' 'history=?' 'variables=?' 'processes=?' - argparse --max-args=0 --ignore-unknown $options_spec -- $argv 2>/dev/null - if test $status -ne 0 - echo "Invalid option or a positional argument was provided." >&2 - _fzf_configure_bindings_help - return 22 - else if set --query _flag_help - _fzf_configure_bindings_help - return - else - # Initialize with default key sequences and then override or disable them based on flags - # index 1 = directory, 2 = git_log, 3 = git_status, 4 = history, 5 = variables, 6 = processes - set key_sequences \e\cf \e\cl \e\cs \cr \cv \e\cp # \c = control, \e = escape - set --query _flag_directory && set key_sequences[1] "$_flag_directory" - set --query _flag_git_log && set key_sequences[2] "$_flag_git_log" - set --query _flag_git_status && set key_sequences[3] "$_flag_git_status" - set --query _flag_history && set key_sequences[4] "$_flag_history" - set --query _flag_variables && set key_sequences[5] "$_flag_variables" - set --query _flag_processes && set key_sequences[6] "$_flag_processes" - - # If fzf bindings already exists, uninstall it first for a clean slate - if functions --query _fzf_uninstall_bindings - _fzf_uninstall_bindings - end - - for mode in default insert - test -n $key_sequences[1] && bind --mode $mode $key_sequences[1] _fzf_search_directory - test -n $key_sequences[2] && bind --mode $mode $key_sequences[2] _fzf_search_git_log - test -n $key_sequences[3] && bind --mode $mode $key_sequences[3] _fzf_search_git_status - test -n $key_sequences[4] && bind --mode $mode $key_sequences[4] _fzf_search_history - test -n $key_sequences[5] && bind --mode $mode $key_sequences[5] "$_fzf_search_vars_command" - test -n $key_sequences[6] && bind --mode $mode $key_sequences[6] _fzf_search_processes - end - - function _fzf_uninstall_bindings --inherit-variable key_sequences - bind --erase -- $key_sequences - bind --erase --mode insert -- $key_sequences - end - end -end diff --git a/neofetch/config.conf b/neofetch/config.conf @@ -1,864 +0,0 @@ -# See this wiki page for more info: -# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info -print_info() { - info title - info underline - - info "OS" distro - info "Host" model - info "Kernel" kernel - info "Uptime" uptime - info "Packages" packages - info "Shell" shell - info "Resolution" resolution - info "DE" de - info "WM" wm - info "WM Theme" wm_theme - info "Theme" theme - info "Icons" icons - info "Terminal" term - info "Terminal Font" term_font - info "CPU" cpu - info "GPU" gpu - info "Memory" memory - - # info "GPU Driver" gpu_driver # Linux/macOS only - # info "CPU Usage" cpu_usage - # info "Disk" disk - # info "Battery" battery - # info "Font" font - # info "Song" song - # [[ "$player" ]] && prin "Music Player" "$player" - # info "Local IP" local_ip - # info "Public IP" public_ip - # info "Users" users - # info "Locale" locale # This only works on glibc systems. - - info cols -} - -# Title - - -# Hide/Show Fully qualified domain name. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --title_fqdn -title_fqdn="off" - - -# Kernel - - -# Shorten the output of the kernel function. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --kernel_shorthand -# Supports: Everything except *BSDs (except PacBSD and PC-BSD) -# -# Example: -# on: '4.8.9-1-ARCH' -# off: 'Linux 4.8.9-1-ARCH' -kernel_shorthand="on" - - -# Distro - - -# Shorten the output of the distro function -# -# Default: 'off' -# Values: 'on', 'tiny', 'off' -# Flag: --distro_shorthand -# Supports: Everything except Windows and Haiku -distro_shorthand="off" - -# Show/Hide OS Architecture. -# Show 'x86_64', 'x86' and etc in 'Distro:' output. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --os_arch -# -# Example: -# on: 'Arch Linux x86_64' -# off: 'Arch Linux' -os_arch="on" - - -# Uptime - - -# Shorten the output of the uptime function -# -# Default: 'on' -# Values: 'on', 'tiny', 'off' -# Flag: --uptime_shorthand -# -# Example: -# on: '2 days, 10 hours, 3 mins' -# tiny: '2d 10h 3m' -# off: '2 days, 10 hours, 3 minutes' -uptime_shorthand="on" - - -# Memory - - -# Show memory pecentage in output. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --memory_percent -# -# Example: -# on: '1801MiB / 7881MiB (22%)' -# off: '1801MiB / 7881MiB' -memory_percent="off" - -# Change memory output unit. -# -# Default: 'mib' -# Values: 'kib', 'mib', 'gib' -# Flag: --memory_unit -# -# Example: -# kib '1020928KiB / 7117824KiB' -# mib '1042MiB / 6951MiB' -# gib: ' 0.98GiB / 6.79GiB' -memory_unit="mib" - - -# Packages - - -# Show/Hide Package Manager names. -# -# Default: 'tiny' -# Values: 'on', 'tiny' 'off' -# Flag: --package_managers -# -# Example: -# on: '998 (pacman), 8 (flatpak), 4 (snap)' -# tiny: '908 (pacman, flatpak, snap)' -# off: '908' -package_managers="on" - - -# Shell - - -# Show the path to $SHELL -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --shell_path -# -# Example: -# on: '/bin/bash' -# off: 'bash' -shell_path="off" - -# Show $SHELL version -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --shell_version -# -# Example: -# on: 'bash 4.4.5' -# off: 'bash' -shell_version="on" - - -# CPU - - -# CPU speed type -# -# Default: 'bios_limit' -# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'. -# Flag: --speed_type -# Supports: Linux with 'cpufreq' -# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value. -speed_type="bios_limit" - -# CPU speed shorthand -# -# Default: 'off' -# Values: 'on', 'off'. -# Flag: --speed_shorthand -# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz -# -# Example: -# on: 'i7-6500U (4) @ 3.1GHz' -# off: 'i7-6500U (4) @ 3.100GHz' -speed_shorthand="off" - -# Enable/Disable CPU brand in output. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --cpu_brand -# -# Example: -# on: 'Intel i7-6500U' -# off: 'i7-6500U (4)' -cpu_brand="on" - -# CPU Speed -# Hide/Show CPU speed. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --cpu_speed -# -# Example: -# on: 'Intel i7-6500U (4) @ 3.1GHz' -# off: 'Intel i7-6500U (4)' -cpu_speed="on" - -# CPU Cores -# Display CPU cores in output -# -# Default: 'logical' -# Values: 'logical', 'physical', 'off' -# Flag: --cpu_cores -# Support: 'physical' doesn't work on BSD. -# -# Example: -# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores) -# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores) -# off: 'Intel i7-6500U @ 3.1GHz' -cpu_cores="logical" - -# CPU Temperature -# Hide/Show CPU temperature. -# Note the temperature is added to the regular CPU function. -# -# Default: 'off' -# Values: 'C', 'F', 'off' -# Flag: --cpu_temp -# Supports: Linux, BSD -# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable -# coretemp kernel module. This only supports newer Intel processors. -# -# Example: -# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]' -# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]' -# off: 'Intel i7-6500U (4) @ 3.1GHz' -cpu_temp="off" - - -# GPU - - -# Enable/Disable GPU Brand -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --gpu_brand -# -# Example: -# on: 'AMD HD 7950' -# off: 'HD 7950' -gpu_brand="on" - -# Which GPU to display -# -# Default: 'all' -# Values: 'all', 'dedicated', 'integrated' -# Flag: --gpu_type -# Supports: Linux -# -# Example: -# all: -# GPU1: AMD HD 7950 -# GPU2: Intel Integrated Graphics -# -# dedicated: -# GPU1: AMD HD 7950 -# -# integrated: -# GPU1: Intel Integrated Graphics -gpu_type="all" - - -# Resolution - - -# Display refresh rate next to each monitor -# Default: 'off' -# Values: 'on', 'off' -# Flag: --refresh_rate -# Supports: Doesn't work on Windows. -# -# Example: -# on: '1920x1080 @ 60Hz' -# off: '1920x1080' -refresh_rate="off" - - -# Gtk Theme / Icons / Font - - -# Shorten output of GTK Theme / Icons / Font -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --gtk_shorthand -# -# Example: -# on: 'Numix, Adwaita' -# off: 'Numix [GTK2], Adwaita [GTK3]' -gtk_shorthand="off" - - -# Enable/Disable gtk2 Theme / Icons / Font -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --gtk2 -# -# Example: -# on: 'Numix [GTK2], Adwaita [GTK3]' -# off: 'Adwaita [GTK3]' -gtk2="on" - -# Enable/Disable gtk3 Theme / Icons / Font -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --gtk3 -# -# Example: -# on: 'Numix [GTK2], Adwaita [GTK3]' -# off: 'Numix [GTK2]' -gtk3="on" - - -# IP Address - - -# Website to ping for the public IP -# -# Default: 'http://ident.me' -# Values: 'url' -# Flag: --ip_host -public_ip_host="http://ident.me" - -# Public IP timeout. -# -# Default: '2' -# Values: 'int' -# Flag: --ip_timeout -public_ip_timeout=2 - - -# Desktop Environment - - -# Show Desktop Environment version -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --de_version -de_version="on" - - -# Disk - - -# Which disks to display. -# The values can be any /dev/sdXX, mount point or directory. -# NOTE: By default we only show the disk info for '/'. -# -# Default: '/' -# Values: '/', '/dev/sdXX', '/path/to/drive'. -# Flag: --disk_show -# -# Example: -# disk_show=('/' '/dev/sdb1'): -# 'Disk (/): 74G / 118G (66%)' -# 'Disk (/mnt/Videos): 823G / 893G (93%)' -# -# disk_show=('/'): -# 'Disk (/): 74G / 118G (66%)' -# -disk_show=('/') - -# Disk subtitle. -# What to append to the Disk subtitle. -# -# Default: 'mount' -# Values: 'mount', 'name', 'dir', 'none' -# Flag: --disk_subtitle -# -# Example: -# name: 'Disk (/dev/sda1): 74G / 118G (66%)' -# 'Disk (/dev/sdb2): 74G / 118G (66%)' -# -# mount: 'Disk (/): 74G / 118G (66%)' -# 'Disk (/mnt/Local Disk): 74G / 118G (66%)' -# 'Disk (/mnt/Videos): 74G / 118G (66%)' -# -# dir: 'Disk (/): 74G / 118G (66%)' -# 'Disk (Local Disk): 74G / 118G (66%)' -# 'Disk (Videos): 74G / 118G (66%)' -# -# none: 'Disk: 74G / 118G (66%)' -# 'Disk: 74G / 118G (66%)' -# 'Disk: 74G / 118G (66%)' -disk_subtitle="mount" - -# Disk percent. -# Show/Hide disk percent. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --disk_percent -# -# Example: -# on: 'Disk (/): 74G / 118G (66%)' -# off: 'Disk (/): 74G / 118G' -disk_percent="on" - - -# Song - - -# Manually specify a music player. -# -# Default: 'auto' -# Values: 'auto', 'player-name' -# Flag: --music_player -# -# Available values for 'player-name': -# -# amarok -# audacious -# banshee -# bluemindo -# clementine -# cmus -# deadbeef -# deepin-music -# dragon -# elisa -# exaile -# gnome-music -# gmusicbrowser -# gogglesmm -# guayadeque -# io.elementary.music -# iTunes -# juk -# lollypop -# mocp -# mopidy -# mpd -# muine -# netease-cloud-music -# olivia -# playerctl -# pogo -# pragha -# qmmp -# quodlibet -# rhythmbox -# sayonara -# smplayer -# spotify -# strawberry -# tauonmb -# tomahawk -# vlc -# xmms2d -# xnoise -# yarock -music_player="auto" - -# Format to display song information. -# -# Default: '%artist% - %album% - %title%' -# Values: '%artist%', '%album%', '%title%' -# Flag: --song_format -# -# Example: -# default: 'Song: Jet - Get Born - Sgt Major' -song_format="%artist% - %album% - %title%" - -# Print the Artist, Album and Title on separate lines -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --song_shorthand -# -# Example: -# on: 'Artist: The Fratellis' -# 'Album: Costello Music' -# 'Song: Chelsea Dagger' -# -# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger' -song_shorthand="off" - -# 'mpc' arguments (specify a host, password etc). -# -# Default: '' -# Example: mpc_args=(-h HOST -P PASSWORD) -mpc_args=() - - -# Text Colors - - -# Text Colors -# -# Default: 'distro' -# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' -# Flag: --colors -# -# Each number represents a different part of the text in -# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info' -# -# Example: -# colors=(distro) - Text is colored based on Distro colors. -# colors=(4 6 1 8 8 6) - Text is colored in the order above. -colors=(distro) - - -# Text Options - - -# Toggle bold text -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --bold -bold="on" - -# Enable/Disable Underline -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --underline -underline_enabled="on" - -# Underline character -# -# Default: '-' -# Values: 'string' -# Flag: --underline_char -underline_char="-" - - -# Info Separator -# Replace the default separator with the specified string. -# -# Default: ':' -# Flag: --separator -# -# Example: -# separator="->": 'Shell-> bash' -# separator=" =": 'WM = dwm' -separator=":" - - -# Color Blocks - - -# Color block range -# The range of colors to print. -# -# Default: '0', '15' -# Values: 'num' -# Flag: --block_range -# -# Example: -# -# Display colors 0-7 in the blocks. (8 colors) -# neofetch --block_range 0 7 -# -# Display colors 0-15 in the blocks. (16 colors) -# neofetch --block_range 0 15 -block_range=(0 15) - -# Toggle color blocks -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --color_blocks -color_blocks="on" - -# Color block width in spaces -# -# Default: '3' -# Values: 'num' -# Flag: --block_width -block_width=3 - -# Color block height in lines -# -# Default: '1' -# Values: 'num' -# Flag: --block_height -block_height=1 - -# Color Alignment -# -# Default: 'auto' -# Values: 'auto', 'num' -# Flag: --col_offset -# -# Number specifies how far from the left side of the terminal (in spaces) to -# begin printing the columns, in case you want to e.g. center them under your -# text. -# Example: -# col_offset="auto" - Default behavior of neofetch -# col_offset=7 - Leave 7 spaces then print the colors -col_offset="auto" - -# Progress Bars - - -# Bar characters -# -# Default: '-', '=' -# Values: 'string', 'string' -# Flag: --bar_char -# -# Example: -# neofetch --bar_char 'elapsed' 'total' -# neofetch --bar_char '-' '=' -bar_char_elapsed="-" -bar_char_total="=" - -# Toggle Bar border -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --bar_border -bar_border="on" - -# Progress bar length in spaces -# Number of chars long to make the progress bars. -# -# Default: '15' -# Values: 'num' -# Flag: --bar_length -bar_length=15 - -# Progress bar colors -# When set to distro, uses your distro's logo colors. -# -# Default: 'distro', 'distro' -# Values: 'distro', 'num' -# Flag: --bar_colors -# -# Example: -# neofetch --bar_colors 3 4 -# neofetch --bar_colors distro 5 -bar_color_elapsed="distro" -bar_color_total="distro" - - -# Info display -# Display a bar with the info. -# -# Default: 'off' -# Values: 'bar', 'infobar', 'barinfo', 'off' -# Flags: --cpu_display -# --memory_display -# --battery_display -# --disk_display -# -# Example: -# bar: '[---=======]' -# infobar: 'info [---=======]' -# barinfo: '[---=======] info' -# off: 'info' -cpu_display="off" -memory_display="off" -battery_display="off" -disk_display="off" - - -# Backend Settings - - -# Image backend. -# -# Default: 'ascii' -# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off', -# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty' -# Flag: --backend -image_backend="ascii" - -# Image Source -# -# Which image or ascii file to display. -# -# Default: 'auto' -# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' -# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")' -# Flag: --source -# -# NOTE: 'auto' will pick the best image source for whatever image backend is used. -# In ascii mode, distro ascii art will be used and in an image mode, your -# wallpaper will be used. -image_source="auto" - - -# Ascii Options - - -# Ascii distro -# Which distro's ascii art to display. -# -# Default: 'auto' -# Values: 'auto', 'distro_name' -# Flag: --ascii_distro -# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS", -# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs, -# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock, -# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD, -# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS, -# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover, -# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin, -# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary, -# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD, -# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo, -# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra, -# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion, -# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite, -# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva, -# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib, -# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner, -# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba, -# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD, -# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint, -# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix, -# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan, -# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific, -# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz, -# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS, -# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, -# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio, -# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin, -# and IRIX have ascii logos -# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants. -# Use '{distro name}_old' to use the old logos. -# NOTE: Ubuntu has flavor variants. -# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME, -# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors. -# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu, -# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android, -# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola, -# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS, -# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian, -# postmarketOS, and Void have a smaller logo variant. -# Use '{distro name}_small' to use the small variants. -ascii_distro="auto" - -# Ascii Colors -# -# Default: 'distro' -# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' -# Flag: --ascii_colors -# -# Example: -# ascii_colors=(distro) - Ascii is colored based on Distro colors. -# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors. -ascii_colors=(distro) - -# Bold ascii logo -# Whether or not to bold the ascii logo. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --ascii_bold -ascii_bold="on" - - -# Image Options - - -# Image loop -# Setting this to on will make neofetch redraw the image constantly until -# Ctrl+C is pressed. This fixes display issues in some terminal emulators. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --loop -image_loop="off" - -# Thumbnail directory -# -# Default: '~/.cache/thumbnails/neofetch' -# Values: 'dir' -thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" - -# Crop mode -# -# Default: 'normal' -# Values: 'normal', 'fit', 'fill' -# Flag: --crop_mode -# -# See this wiki page to learn about the fit and fill options. -# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F -crop_mode="normal" - -# Crop offset -# Note: Only affects 'normal' crop mode. -# -# Default: 'center' -# Values: 'northwest', 'north', 'northeast', 'west', 'center' -# 'east', 'southwest', 'south', 'southeast' -# Flag: --crop_offset -crop_offset="center" - -# Image size -# The image is half the terminal width by default. -# -# Default: 'auto' -# Values: 'auto', '00px', '00%', 'none' -# Flags: --image_size -# --size -image_size="auto" - -# Gap between image and text -# -# Default: '3' -# Values: 'num', '-num' -# Flag: --gap -gap=3 - -# Image offsets -# Only works with the w3m backend. -# -# Default: '0' -# Values: 'px' -# Flags: --xoffset -# --yoffset -yoffset=0 -xoffset=0 - -# Image background color -# Only works with the w3m backend. -# -# Default: '' -# Values: 'color', 'blue' -# Flag: --bg_color -background_color= - - -# Misc Options - -# Stdout mode -# Turn off all colors and disables image backend (ASCII/Image). -# Useful for piping into another command. -# Default: 'off' -# Values: 'on', 'off' -stdout="off"