diff options
author | Nicholas Noll <nnoll523@gmail.com> | 2020-06-20 16:30:53 -0700 |
---|---|---|
committer | Nicholas Noll <nnoll523@gmail.com> | 2020-06-20 16:30:53 -0700 |
commit | 24c19852baba32215d24297dc30804af91b72cee (patch) | |
tree | e615e31ee146f22c7ddb8f121e8d8ef2aa20a584 | |
parent | ba2d13d235507383a7880677cb5edb557cc1f88b (diff) |
removed deprecated applications
51 files changed, 20 insertions, 1383 deletions
diff --git a/.config/fish/config.fish b/.config/fish/config.fish deleted file mode 100644 index 7fe9ecd..0000000 --- a/.config/fish/config.fish +++ /dev/null @@ -1,58 +0,0 @@ -# Add paths to the system path -set -g -x XDG_DOCUMENTS_DIR "$HOME/docs" -set -g -x XDG_DOWNLOAD_DIR "$HOME/pulls" -set -g -x XDG_PICTURES_DIR "$HOME/media/pics" -set -g -x XDG_VIDEOS_DIR "$HOME/media" - -set -g -x PYTHONPATH "$HOME/root/lib/py/" $PYTHONPATH - -# Set global environmental variables -set -g -x MAILCAPS /home/nolln/.config/mutt/mailcap -set -g -x TEXINPUTS .:/home/nolln/docs//:/usr/share/texmf-dist/tex// -set -g -x QT_QPA_PLATFORM xcb - -# Set system apps -set EDITOR nvim -set BROWSER qutebrowser -set PAGER less -r - -# Set to Vim modal editing -fish_vi_key_bindings - -# Remove greeting -set -U fish_greeting - -# Useful aliases -# set -xU LS_COLORS "di=34:ln=35:so=32:pi=33:ex=32:bd=34;46:cd=34:su=0:sg=0:tw=0:ow=0:*.gz=01;31:*.tgz=01;31:*.zip=01;31" -alias ls='ls -hlS --color=auto' -alias ll='ls -alF' -alias la='ls -A' -alias l='ls -CF' - -alias vim='nvim' -alias gdb='gdb -q' -alias mail='neomutt' -alias tmux='tmux -f $HOME/.config/tmux/config' -alias screenshot='grim -g (slurp) - | wl-copy' -alias lofi="mpv 'https://www.youtube.com/watch?v=5qap5aO4i9A' --no-video" - -alias dbg='~/pyenv/bin/gdbgui' - -# Configuration file save -alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME' - -alias scicore='ssh -X nolln@login.scicore.unibas.ch' -alias piboi='ssh -X nolln@192.168.0.75' -alias mntC='sshfs nolln@login.scicore.unibas.ch:/scicore/home/neher/nolln $HOME/mnt/cluster' -alias umntC='umount $HOME/mnt/cluster' - -# Prompt configuration. -set PURE_REVERSE_PROMPT_SYMBOL_IN_VIMODE false - -# Colored man pages -set -xU LESS_TERMCAP_md (printf "\e[01;31m") -set -xU LESS_TERMCAP_me (printf "\e[0m") -set -xU LESS_TERMCAP_se (printf "\e[0m") -set -xU LESS_TERMCAP_so (printf "\e[01;44;33m") -set -xU LESS_TERMCAP_ue (printf "\e[0m") -set -xU LESS_TERMCAP_us (printf "\e[01;32m") diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables index 69ca71d..fa8bff9 100644 --- a/.config/fish/fish_variables +++ b/.config/fish/fish_variables @@ -1,83 +1,32 @@ # This file contains fish universal variable definitions. # VERSION: 3.0 -SETUVAR FZF_DEFAULT_OPTS:\x2d\x2dheight\x2040\x25 -SETUVAR FZF_LEGACY_KEYBINDINGS:0 -SETUVAR FZF_PREVIEW_DIR_CMD:ls -SETUVAR FZF_PREVIEW_FILE_CMD:head\x20\x2dn\x2010 -SETUVAR FZF_TMUX_HEIGHT:40\x25 -SETUVAR --export LESS_TERMCAP_md:\x1b\x5b01\x3b31m -SETUVAR --export LESS_TERMCAP_me:\x1b\x5b0m -SETUVAR --export LESS_TERMCAP_se:\x1b\x5b0m -SETUVAR --export LESS_TERMCAP_so:\x1b\x5b01\x3b44\x3b33m -SETUVAR --export LESS_TERMCAP_ue:\x1b\x5b0m -SETUVAR --export LESS_TERMCAP_us:\x1b\x5b01\x3b32m -SETUVAR __fish_init_2_39_8:\x1d -SETUVAR __fish_init_2_3_0:\x1d -SETUVAR __fish_init_3_x:\x1d SETUVAR __fish_initialized:3100 -SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_autosuggestion:555\x1ebrblack SETUVAR fish_color_cancel:\x2dr -SETUVAR fish_color_command:brgreen -SETUVAR fish_color_comment:brmagenta +SETUVAR fish_color_command:005fd7 +SETUVAR fish_color_comment:990000 SETUVAR fish_color_cwd:green SETUVAR fish_color_cwd_root:red -SETUVAR fish_color_end:brmagenta -SETUVAR fish_color_error:brred -SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_end:009900 +SETUVAR fish_color_error:ff0000 +SETUVAR fish_color_escape:00a6b2 SETUVAR fish_color_history_current:\x2d\x2dbold SETUVAR fish_color_host:normal SETUVAR fish_color_host_remote:yellow SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue SETUVAR fish_color_normal:normal -SETUVAR fish_color_operator:cyan -SETUVAR fish_color_param:brblue -SETUVAR fish_color_quote:yellow -SETUVAR fish_color_redirection:bryellow +SETUVAR fish_color_operator:00a6b2 +SETUVAR fish_color_param:00afff +SETUVAR fish_color_quote:999900 +SETUVAR fish_color_redirection:00afff SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack SETUVAR fish_color_status:red SETUVAR fish_color_user:brgreen SETUVAR fish_color_valid_path:\x2d\x2dunderline -SETUVAR fish_greeting:\x1d -SETUVAR fish_key_bindings:fish_vi_key_bindings -SETUVAR fish_pager_color_completion:normal -SETUVAR fish_pager_color_description:yellow +SETUVAR fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell\x0aType\x20\x60help\x60\x20for\x20instructions\x20on\x20how\x20to\x20use\x20fish +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:\x1d +SETUVAR fish_pager_color_description:B3A06D\x1eyellow SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan -SETUVAR fish_user_paths:/home/nolln/root/bin\x1e/home/nolln/\x2eyarn/bin\x1e/home/nolln/code/bin\x1e/home/nolln/go/bin\x1e/home/nolln/\x2elocal/bin\x1e/home/nolln/code/muon/bin\x1e/home/nolln/\x2efzf/bin\x1e/home/nolln/opt/Vivado/2019\x2e2/bin -SETUVAR pure_begin_prompt_with_current_directory:true -SETUVAR pure_color_command_duration:pure_color_warning -SETUVAR pure_color_current_directory:pure_color_primary -SETUVAR pure_color_danger:red -SETUVAR pure_color_dark:black -SETUVAR pure_color_git_branch:pure_color_mute -SETUVAR pure_color_git_dirty:pure_color_mute -SETUVAR pure_color_git_unpulled_commits:pure_color_info -SETUVAR pure_color_git_unpushed_commits:pure_color_info -SETUVAR pure_color_info:cyan -SETUVAR pure_color_jobs:pure_color_normal -SETUVAR pure_color_light:white -SETUVAR pure_color_mute:brblack -SETUVAR pure_color_normal:normal -SETUVAR pure_color_primary:blue -SETUVAR pure_color_prompt_on_error:pure_color_danger -SETUVAR pure_color_prompt_on_success:pure_color_success -SETUVAR pure_color_ssh_hostname:pure_color_mute -SETUVAR pure_color_ssh_separator:pure_color_mute -SETUVAR pure_color_ssh_user_normal:pure_color_mute -SETUVAR pure_color_ssh_user_root:pure_color_light -SETUVAR pure_color_success:magenta -SETUVAR pure_color_virtualenv:pure_color_mute -SETUVAR pure_color_warning:yellow -SETUVAR pure_enable_git:true -SETUVAR pure_reverse_prompt_symbol_in_vimode:true -SETUVAR pure_separate_prompt_on_error:false -SETUVAR pure_show_jobs:false -SETUVAR pure_symbol_git_dirty:\x2a -SETUVAR pure_symbol_git_unpulled_commits:\u21e3 -SETUVAR pure_symbol_git_unpushed_commits:\u21e1 -SETUVAR pure_symbol_prompt:\u276f -SETUVAR pure_symbol_reverse_prompt:\u276e -SETUVAR pure_symbol_title_bar_separator:\u2014 -SETUVAR pure_threshold_command_duration:5 -SETUVAR pure_version:2\x2e1\x2e5 diff --git a/.config/fish/functions/.tmux.fish.un~ b/.config/fish/functions/.tmux.fish.un~ Binary files differdeleted file mode 100644 index 1ddc7c8..0000000 --- a/.config/fish/functions/.tmux.fish.un~ +++ /dev/null diff --git a/.config/fish/functions/__fzf_cd.fish b/.config/fish/functions/__fzf_cd.fish deleted file mode 100644 index c79a725..0000000 --- a/.config/fish/functions/__fzf_cd.fish +++ /dev/null @@ -1,49 +0,0 @@ -function __fzf_cd -d "Change directory" - set -l commandline (__fzf_parse_commandline) - set -l dir $commandline[1] - set -l fzf_query $commandline[2] - - if not type -q argparse - # Fallback for fish shell version < 2.7 - function argparse - functions -e argparse # deletes itself - end - if contains -- --hidden $argv; or contains -- -h $argv - set _flag_hidden "yes" - end - end - - # Fish shell version >= v2.7, use argparse - set -l options "h/hidden" - argparse $options -- $argv - - set -l COMMAND - - set -q FZF_CD_COMMAND - or set -l FZF_CD_COMMAND " - command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \ - -o -type d -print 2> /dev/null | sed 's@^\./@@'" - - set -q FZF_CD_WITH_HIDDEN_COMMAND - or set -l FZF_CD_WITH_HIDDEN_COMMAND " - command find -L \$dir \ - \\( -path '*/\\.git*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \ - -o -type d -print 2> /dev/null | sed 1d | cut -b3-" - - if set -q _flag_hidden - set COMMAND $FZF_CD_WITH_HIDDEN_COMMAND - else - set COMMAND $FZF_CD_COMMAND - end - - eval "$COMMAND | "(__fzfcmd)" +m $FZF_DEFAULT_OPTS $FZF_CD_OPTS --query \"$fzf_query\"" | read -l select - - if not test -z "$select" - builtin cd "$select" - - # Remove last token from commandline. - commandline -t "" - end - - commandline -f repaint -end diff --git a/.config/fish/functions/__fzf_complete.fish b/.config/fish/functions/__fzf_complete.fish deleted file mode 100644 index e8848fa..0000000 --- a/.config/fish/functions/__fzf_complete.fish +++ /dev/null @@ -1,168 +0,0 @@ -## -# Use fzf as fish completion widget. -# -# -# When FZF_COMPLETE variable is set, fzf is used as completion -# widget for the fish shell by binding the TAB key. -# -# FZF_COMPLETE can have some special numeric values: -# -# `set FZF_COMPLETE 0` basic widget accepts with TAB key -# `set FZF_COMPLETE 1` extends 0 with candidate preview window -# `set FZF_COMPLETE 2` same as 1 but TAB walks on candidates -# `set FZF_COMPLETE 3` multi TAB selection, RETURN accepts selected ones. -# -# Any other value of FZF_COMPLETE is given directly as options to fzf. -# -# If you prefer to set more advanced options, take a look at the -# `__fzf_complete_opts` function and override that in your environment. - - -# modified from https://github.com/junegunn/fzf/wiki/Examples-(fish)#completion -function __fzf_complete -d 'fzf completion and print selection back to commandline' - # As of 2.6, fish's "complete" function does not understand - # subcommands. Instead, we use the same hack as __fish_complete_subcommand and - # extract the subcommand manually. - set -l cmd (commandline -co) (commandline -ct) - - switch $cmd[1] - case env sudo - for i in (seq 2 (count $cmd)) - switch $cmd[$i] - case '-*' - case '*=*' - case '*' - set cmd $cmd[$i..-1] - break - end - end - end - - set -l cmd_lastw $cmd[-1] - set cmd (string join -- ' ' $cmd) - - set -l initial_query '' - test -n "$cmd_lastw"; and set initial_query --query="$cmd_lastw" - - set -l complist (complete -C$cmd) - set -l result - - # do nothing if there is nothing to select from - test -z "$complist"; and return - - set -l compwc (echo $complist | wc -w) - if test $compwc -eq 1 - # if there is only one option dont open fzf - set result "$complist" - else - - set -l query - string join -- \n $complist \ - | eval (__fzfcmd) (string escape --no-quoted -- $initial_query) --print-query (__fzf_complete_opts) \ - | cut -f1 \ - | while read -l r - # first line is the user entered query - if test -z "$query" - set query $r - # rest of lines are selected candidates - else - set result $result $r - end - end - - # exit if user canceled - if test -z "$query" ;and test -z "$result" - commandline -f repaint - return - end - - # if user accepted but no candidate matches, use the input as result - if test -z "$result" - set result $query - end - end - - set prefix (string sub -s 1 -l 1 -- (commandline -t)) - for i in (seq (count $result)) - set -l r $result[$i] - switch $prefix - case "'" - commandline -t -- (string escape -- $r) - case '"' - if string match '*"*' -- $r >/dev/null - commandline -t -- (string escape -- $r) - else - commandline -t -- '"'$r'"' - end - case '~' - commandline -t -- (string sub -s 2 (string escape -n -- $r)) - case '*' - commandline -t -- $r - end - [ $i -lt (count $result) ]; and commandline -i ' ' - end - - commandline -f repaint -end - -function __fzf_complete_opts_common - if set -q FZF_DEFAULT_OPTS - echo $FZF_DEFAULT_OPTS - end - echo --cycle --reverse --inline-info -end - -function __fzf_complete_opts_tab_accepts - echo --bind tab:accept,btab:cancel -end - -function __fzf_complete_opts_tab_walks - echo --bind tab:down,btab:up -end - -function __fzf_complete_opts_preview - set -l file (status -f) - echo --with-nth=1 --preview-window=right:wrap --preview="fish\ '$file'\ __fzf_complete_preview\ '{1}'\ '{2..}'" -end - -test "$argv[1]" = "__fzf_complete_preview"; and __fzf_complete_preview $argv[2..3] - -function __fzf_complete_opts_0 -d 'basic single selection with tab accept' - __fzf_complete_opts_common - echo --no-multi - __fzf_complete_opts_tab_accepts -end - -function __fzf_complete_opts_1 -d 'single selection with preview and tab accept' - __fzf_complete_opts_0 - __fzf_complete_opts_preview -end - -function __fzf_complete_opts_2 -d 'single selection with preview and tab walks' - __fzf_complete_opts_1 - __fzf_complete_opts_tab_walks -end - -function __fzf_complete_opts_3 -d 'multi selection with preview' - __fzf_complete_opts_common - echo --multi - __fzf_complete_opts_preview -end - -function __fzf_complete_opts -d 'fzf options for fish tab completion' - switch $FZF_COMPLETE - case 0 - __fzf_complete_opts_0 - case 1 - __fzf_complete_opts_1 - case 2 - __fzf_complete_opts_2 - case 3 - __fzf_complete_opts_3 - case '*' - echo $FZF_COMPLETE - end - if set -q FZF_COMPLETE_OPTS - echo $FZF_COMPLETE_OPTS - end -end diff --git a/.config/fish/functions/__fzf_complete_preview.fish b/.config/fish/functions/__fzf_complete_preview.fish deleted file mode 100644 index 585ab92..0000000 --- a/.config/fish/functions/__fzf_complete_preview.fish +++ /dev/null @@ -1,31 +0,0 @@ -function __fzf_complete_preview -d 'generate preview for completion widget. - argv[1] is the currently selected candidate in fzf - argv[2] is a string containing the rest of the output produced by `complete -Ccmd` - ' - - if test "$argv[2]" = "Redefine variable" - # show environment variables current value - set -l evar (echo $argv[1] | cut -d= -f1) - echo $argv[1]$$evar - else - echo $argv[1] - end - - set -l path (string replace "~" $HOME -- $argv[1]) - - # list directories on preview - if test -d "$path" - eval $FZF_PREVIEW_DIR_CMD (string escape $path) - end - - # show ten lines of non-binary files preview - if test -f "$path"; and grep -qI . "$path" - eval $FZF_PREVIEW_FILE_CMD (string escape $path) - end - - # if fish knows about it, let it show info - type -q "$path" 2>/dev/null; and type -a "$path" - - # show aditional data - echo $argv[2] -end diff --git a/.config/fish/functions/__fzf_find_file.fish b/.config/fish/functions/__fzf_find_file.fish deleted file mode 100644 index 1900006..0000000 --- a/.config/fish/functions/__fzf_find_file.fish +++ /dev/null @@ -1,29 +0,0 @@ -function __fzf_find_file -d "List files and folders" - set -l commandline (__fzf_parse_commandline) - set -l dir $commandline[1] - set -l fzf_query $commandline[2] - - set -q FZF_FIND_FILE_COMMAND - or set -l FZF_FIND_FILE_COMMAND " - command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \ - -o -type f -print \ - -o -type d -print \ - -o -type l -print 2> /dev/null | sed 's@^\./@@'" - - begin - eval "$FZF_FIND_FILE_COMMAND | "(__fzfcmd) "-m $FZF_DEFAULT_OPTS $FZF_FIND_FILE_OPTS --query \"$fzf_query\"" | while read -l s; set results $results $s; end - end - - if test -z "$results" - commandline -f repaint - return - else - commandline -t "" - end - - for result in $results - commandline -it -- (string escape $result) - commandline -it -- " " - end - commandline -f repaint -end diff --git a/.config/fish/functions/__fzf_get_dir.fish b/.config/fish/functions/__fzf_get_dir.fish deleted file mode 100644 index a32ac83..0000000 --- a/.config/fish/functions/__fzf_get_dir.fish +++ /dev/null @@ -1,17 +0,0 @@ -function __fzf_get_dir -d 'Find the longest existing filepath from input string' - set dir $argv - - # Strip all trailing slashes. Ignore if $dir is root dir (/) - if [ (string length $dir) -gt 1 ] - set dir (string replace -r '/*$' '' $dir) - end - - # Iteratively check if dir exists and strip tail end of path - while [ ! -d "$dir" ] - # If path is absolute, this can keep going until ends up at / - # If path is relative, this can keep going until entire input is consumed, dirname returns "." - set dir (dirname "$dir") - end - - echo $dir -end diff --git a/.config/fish/functions/__fzf_open.fish b/.config/fish/functions/__fzf_open.fish deleted file mode 100644 index aa5ca61..0000000 --- a/.config/fish/functions/__fzf_open.fish +++ /dev/null @@ -1,63 +0,0 @@ -function __fzf_open -d "Open files and directories." - function __fzf_open_get_open_cmd -d "Find appropriate open command." - if type -q xdg-open - echo "xdg-open" - else if type -q open - echo "open" - end - end - - set -l commandline (__fzf_parse_commandline) - set -l dir $commandline[1] - set -l fzf_query $commandline[2] - - if not type -q argparse - set created_argparse - function argparse - functions -e argparse # deletes itself - end - if contains -- --editor $argv; or contains -- -e $argv - set _flag_editor "yes" - end - if contains -- --preview $argv; or contains -- -p $argv - set _flag_preview "yes" - end - end - - set -l options "e/editor" "p/preview=?" - argparse $options -- $argv - - set -l preview_cmd - if set -q FZF_ENABLE_OPEN_PREVIEW - set preview_cmd "--preview-window=right:wrap --preview='fish -c \"__fzf_complete_preview {}\"'" - end - - set -q FZF_OPEN_COMMAND - or set -l FZF_OPEN_COMMAND " - command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \ - -o -type f -print \ - -o -type d -print \ - -o -type l -print 2> /dev/null | sed 's@^\./@@'" - - set -l select (eval "$FZF_OPEN_COMMAND | "(__fzfcmd) $preview_cmd "-m $FZF_DEFAULT_OPTS $FZF_OPEN_OPTS --query \"$fzf_query\"" | string escape) - - # set how to open - set -l open_cmd - if set -q _flag_editor - set open_cmd "$EDITOR" - else - set open_cmd (__fzf_open_get_open_cmd) - if test -z "$open_cmd" - echo "Couldn't find appropriate open command to use. Do you have 'xdg-open' or 'open' installed?"; and return 1 - end - end - - set -l open_status 0 - if not test -z "$select" - commandline "$open_cmd $select"; and commandline -f execute - set open_status $status - end - - commandline -f repaint - return $open_status -end diff --git a/.config/fish/functions/__fzf_parse_commandline.fish b/.config/fish/functions/__fzf_parse_commandline.fish deleted file mode 100644 index 80bf3eb..0000000 --- a/.config/fish/functions/__fzf_parse_commandline.fish +++ /dev/null @@ -1,23 +0,0 @@ -function __fzf_parse_commandline -d 'Parse the current command line token and return split of existing filepath and rest of token' - # eval is used to do shell expansion on paths - set -l commandline (eval "printf '%s' "(commandline -t)) - - if [ -z $commandline ] - # Default to current directory with no --query - set dir '.' - set fzf_query '' - else - set dir (__fzf_get_dir $commandline) - - if [ "$dir" = "." -a (string sub -l 1 $commandline) != '.' ] - # if $dir is "." but commandline is not a relative path, this means no file path found - set fzf_query $commandline - else - # Also remove trailing slash after dir, to "split" input properly - set fzf_query (string replace -r "^$dir/?" '' "$commandline") - end - end - - echo $dir - echo $fzf_query -end diff --git a/.config/fish/functions/__fzf_reverse_isearch.fish b/.config/fish/functions/__fzf_reverse_isearch.fish deleted file mode 100644 index 7b31d33..0000000 --- a/.config/fish/functions/__fzf_reverse_isearch.fish +++ /dev/null @@ -1,6 +0,0 @@ -function __fzf_reverse_isearch - history merge - history -z | eval (__fzfcmd) --read0 --tiebreak=index --toggle-sort=ctrl-r $FZF_DEFAULT_OPTS $FZF_REVERSE_ISEARCH_OPTS -q '(commandline)' | perl -pe 'chomp if eof' | read -lz result - and commandline -- $result - commandline -f repaint -end diff --git a/.config/fish/functions/__fzfcmd.fish b/.config/fish/functions/__fzfcmd.fish deleted file mode 100644 index 3acdbad..0000000 --- a/.config/fish/functions/__fzfcmd.fish +++ /dev/null @@ -1,9 +0,0 @@ -function __fzfcmd - set -q FZF_TMUX; or set FZF_TMUX 0 - set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40% - if [ $FZF_TMUX -eq 1 ] - echo "fzf-tmux -d$FZF_TMUX_HEIGHT" - else - echo "fzf" - end -end diff --git a/.config/fish/functions/_pure_format_time.fish b/.config/fish/functions/_pure_format_time.fish deleted file mode 100644 index 0773f6b..0000000 --- a/.config/fish/functions/_pure_format_time.fish +++ /dev/null @@ -1,32 +0,0 @@ -set fail 1 - -function _pure_format_time \ - --description="Format milliseconds to a human readable format" \ - --argument-names milliseconds threshold - - if test $milliseconds -lt 0; return $fail; end - - set --local seconds (math -s0 "$milliseconds / 1000 % 60") - set --local minutes (math -s0 "$milliseconds / 60000 % 60") - set --local hours (math -s0 "$milliseconds / 3600000 % 24") - set --local days (math -s0 "$milliseconds / 86400000") - set --local time - - if test $days -gt 0 - set time $time (printf "%sd" $days) - end - - if test $hours -gt 0 - set time $time (printf "%sh" $hours) - end - - if test $minutes -gt 0 - set time $time (printf "%sm" $minutes) - end - - if test $seconds -gt $threshold - set time $time (printf "%ss" $seconds) - end - - echo -e (string join ' ' $time) -end diff --git a/.config/fish/functions/_pure_get_prompt_symbol.fish b/.config/fish/functions/_pure_get_prompt_symbol.fish deleted file mode 100644 index 5352f58..0000000 --- a/.config/fish/functions/_pure_get_prompt_symbol.fish +++ /dev/null @@ -1,14 +0,0 @@ -function _pure_get_prompt_symbol \ - --description 'Print prompt symbol' \ - --argument-names exit_code - - set --local prompt_symbol $pure_symbol_prompt - set --local is_vi_mode (string match -r "fish_(vi|hybrid)_key_bindings" $fish_key_bindings) - if test -n "$is_vi_mode" \ - -a "$pure_reverse_prompt_symbol_in_vimode" = true \ - -a "$fish_bind_mode" != "insert" - set prompt_symbol $pure_symbol_reverse_prompt - end - - echo "$prompt_symbol" -end diff --git a/.config/fish/functions/_pure_parse_directory.fish b/.config/fish/functions/_pure_parse_directory.fish deleted file mode 100644 index fb3822a..0000000 --- a/.config/fish/functions/_pure_parse_directory.fish +++ /dev/null @@ -1,14 +0,0 @@ -function _pure_parse_directory \ - --description "Replace '$HOME' with '~'" \ - --argument-names max_path_length - - set --local folder (string replace $HOME '~' $PWD) - - if test -n "$max_path_length"; - if test (string length $folder) -gt $max_path_length; - # If path exceeds maximum symbol limit, use default fish path formating function - set folder (prompt_pwd) - end - end - echo $folder -end diff --git a/.config/fish/functions/_pure_parse_git_branch.fish b/.config/fish/functions/_pure_parse_git_branch.fish deleted file mode 100644 index a666f2a..0000000 --- a/.config/fish/functions/_pure_parse_git_branch.fish +++ /dev/null @@ -1,4 +0,0 @@ -function _pure_parse_git_branch --description "Parse current Git branch name" - command git symbolic-ref --short HEAD 2>/dev/null; - or command git name-rev --name-only HEAD 2>/dev/null -end diff --git a/.config/fish/functions/_pure_print_prompt.fish b/.config/fish/functions/_pure_print_prompt.fish deleted file mode 100644 index 9c0174c..0000000 --- a/.config/fish/functions/_pure_print_prompt.fish +++ /dev/null @@ -1,11 +0,0 @@ -function _pure_print_prompt - set --local prompt - - for prompt_part in $argv - if test (_pure_string_width $prompt_part) -gt 0 - set prompt "$prompt $prompt_part" - end - end - - echo (string trim -l $prompt) -end diff --git a/.config/fish/functions/_pure_prompt.fish b/.config/fish/functions/_pure_prompt.fish deleted file mode 100644 index 3f67704..0000000 --- a/.config/fish/functions/_pure_prompt.fish +++ /dev/null @@ -1,11 +0,0 @@ -function _pure_prompt \ - --description 'Print prompt symbol' \ - --argument-names exit_code - - set --local jobs (_pure_prompt_jobs) - set --local virtualenv (_pure_prompt_virtualenv) # Python virtualenv name - set --local vimode_indicator (_pure_prompt_vimode) # vi-mode indicator - set --local pure_symbol (_pure_prompt_symbol $exit_code) - - echo (_pure_print_prompt $jobs $virtualenv $vimode_indicator $pure_symbol) -end diff --git a/.config/fish/functions/_pure_prompt_beginning.fish b/.config/fish/functions/_pure_prompt_beginning.fish deleted file mode 100644 index 5f00236..0000000 --- a/.config/fish/functions/_pure_prompt_beginning.fish +++ /dev/null @@ -1,6 +0,0 @@ -function _pure_prompt_beginning - # Clear existing line content - set --local clear_line "\r\033[K" - - echo $clear_line -end diff --git a/.config/fish/functions/_pure_prompt_command_duration.fish b/.config/fish/functions/_pure_prompt_command_duration.fish deleted file mode 100644 index d35b3a6..0000000 --- a/.config/fish/functions/_pure_prompt_command_duration.fish +++ /dev/null @@ -1,11 +0,0 @@ -function _pure_prompt_command_duration - set --local command_duration - - # Get command execution duration - if test -n "$CMD_DURATION" - set command_duration (_pure_format_time $CMD_DURATION $pure_threshold_command_duration) - end - set --local command_duration_color (_pure_set_color $pure_color_command_duration) - - echo "$command_duration_color$command_duration" -end diff --git a/.config/fish/functions/_pure_prompt_current_folder.fish b/.config/fish/functions/_pure_prompt_current_folder.fish deleted file mode 100644 index af8e9ee..0000000 --- a/.config/fish/functions/_pure_prompt_current_folder.fish +++ /dev/null @@ -1,11 +0,0 @@ -set fail 1 - -function _pure_prompt_current_folder --argument-names current_prompt_width - - if test -z "$current_prompt_width"; return $fail; end - - set --local current_folder (_pure_parse_directory (math $COLUMNS - $current_prompt_width - 1)) - set --local current_folder_color (_pure_set_color $pure_color_current_directory) - - echo "$current_folder_color$current_folder" -end diff --git a/.config/fish/functions/_pure_prompt_ending.fish b/.config/fish/functions/_pure_prompt_ending.fish deleted file mode 100644 index ba92511..0000000 --- a/.config/fish/functions/_pure_prompt_ending.fish +++ /dev/null @@ -1,3 +0,0 @@ -function _pure_prompt_ending - echo (set_color normal)" " -end diff --git a/.config/fish/functions/_pure_prompt_first_line.fish b/.config/fish/functions/_pure_prompt_first_line.fish deleted file mode 100644 index 6b3f3b6..0000000 --- a/.config/fish/functions/_pure_prompt_first_line.fish +++ /dev/null @@ -1,35 +0,0 @@ -function _pure_prompt_first_line \ - --description 'Print contextual information before prompt.' - - if not type -fq git # exit if git is not available - return 1 - end - - set --local prompt_ssh (_pure_prompt_ssh) - set --local prompt_git (_pure_prompt_git) - set --local prompt_command_duration (_pure_prompt_command_duration) - set --local prompt (_pure_print_prompt \ - $prompt_ssh \ - $prompt_git \ - $prompt_command_duration - ) - set --local prompt_width (_pure_string_width $prompt) - set --local current_folder (_pure_prompt_current_folder $prompt_width) - - set --local prompt_components - if test $pure_begin_prompt_with_current_directory = true - set prompt_components \ - $current_folder \ - $prompt_git \ - $prompt_ssh \ - $prompt_command_duration - else - set prompt_components \ - $prompt_ssh \ - $current_folder \ - $prompt_git \ - $prompt_command_duration - end - - echo (_pure_print_prompt $prompt_components) -end diff --git a/.config/fish/functions/_pure_prompt_git.fish b/.config/fish/functions/_pure_prompt_git.fish deleted file mode 100644 index 140639a..0000000 --- a/.config/fish/functions/_pure_prompt_git.fish +++ /dev/null @@ -1,20 +0,0 @@ -function _pure_prompt_git \ - --description 'Print git repository informations: branch name, dirty, upstream ahead/behind' - - if test $pure_enable_git != true - return - end - - set --local is_git_repository (command git rev-parse --is-inside-work-tree 2>/dev/null) - - if test -n "$is_git_repository" - set --local git_prompt (_pure_prompt_git_branch)(_pure_prompt_git_dirty) - set --local git_pending_commits (_pure_prompt_git_pending_commits) - - if test (_pure_string_width $git_pending_commits) -ne 0 - set git_prompt $git_prompt $git_pending_commits - end - - echo $git_prompt - end -end diff --git a/.config/fish/functions/_pure_prompt_git_branch.fish b/.config/fish/functions/_pure_prompt_git_branch.fish deleted file mode 100644 index 777cd0e..0000000 --- a/.config/fish/functions/_pure_prompt_git_branch.fish +++ /dev/null @@ -1,6 +0,0 @@ -function _pure_prompt_git_branch - set --local git_branch (_pure_parse_git_branch) # current git branch - set --local git_branch_color (_pure_set_color $pure_color_git_branch) - - echo "$git_branch_color$git_branch" -end diff --git a/.config/fish/functions/_pure_prompt_git_dirty.fish b/.config/fish/functions/_pure_prompt_git_dirty.fish deleted file mode 100644 index fbf31e3..0000000 --- a/.config/fish/functions/_pure_prompt_git_dirty.fish +++ /dev/null @@ -1,18 +0,0 @@ -function _pure_prompt_git_dirty - set --local git_dirty_symbol - set --local git_dirty_color - - set --local is_git_dirty ( - # The first checks for staged changes, the second for unstaged ones. - # We put them in this order because checking staged changes is *fast*. - not command git diff-index --ignore-submodules --cached --quiet HEAD -- >/dev/null 2>&1 - or not command git diff --ignore-submodules --no-ext-diff --quiet --exit-code >/dev/null 2>&1 - and echo "true" - ) - if test -n "$is_git_dirty" # untracked or un-commited files - set git_dirty_symbol "$pure_symbol_git_dirty" - set git_dirty_color (_pure_set_color $pure_color_git_dirty) - end - - echo "$git_dirty_color$git_dirty_symbol" -end diff --git a/.config/fish/functions/_pure_prompt_git_pending_commits.fish b/.config/fish/functions/_pure_prompt_git_pending_commits.fish deleted file mode 100644 index 98359c4..0000000 --- a/.config/fish/functions/_pure_prompt_git_pending_commits.fish +++ /dev/null @@ -1,27 +0,0 @@ -function _pure_prompt_git_pending_commits - set --local git_unpushed_commits - set --local git_unpulled_commits - - set --local has_upstream (command git rev-parse --abbrev-ref '@{upstream}' 2>/dev/null) - if test -n "$has_upstream" # check there is an upstream repo configured - and test "$has_upstream" != '@{upstream}' # Fixed #179, dont check the empty repo - command git rev-list --left-right --count 'HEAD...@{upstream}' \ - | read --local --array git_status - set --local commit_to_push $git_status[1] - set --local commit_to_pull $git_status[2] - - if test $commit_to_push -gt 0 # upstream is behind local repo - set --local git_unpushed_commits_color \ - (_pure_set_color $pure_color_git_unpushed_commits) - set git_unpushed_commits "$git_unpushed_commits_color$pure_symbol_git_unpushed_commits" - end - - if test $commit_to_pull -gt 0 # upstream is ahead of local repo - set --local git_unpulled_commits_color \ - (_pure_set_color $pure_color_git_unpulled_commits) - set git_unpulled_commits "$git_unpulled_commits_color$pure_symbol_git_unpulled_commits" - end - end - - echo "$git_unpushed_commits$git_unpulled_commits" -end diff --git a/.config/fish/functions/_pure_prompt_new_line.fish b/.config/fish/functions/_pure_prompt_new_line.fish deleted file mode 100644 index c61a820..0000000 --- a/.config/fish/functions/_pure_prompt_new_line.fish +++ /dev/null @@ -1,11 +0,0 @@ -function _pure_prompt_new_line \ - --description "Do not add a line break to a brand new session" \ - --on-event fish_prompt - - set --local new_line - if test $_pure_fresh_session = false - set new_line "\n" - end - - echo -e -n "$new_line" -end diff --git a/.config/fish/functions/_pure_prompt_ssh.fish b/.config/fish/functions/_pure_prompt_ssh.fish deleted file mode 100644 index 3ff11ea..0000000 --- a/.config/fish/functions/_pure_prompt_ssh.fish +++ /dev/null @@ -1,5 +0,0 @@ -function _pure_prompt_ssh - if test "$SSH_CONNECTION" != "" - echo (_pure_prompt_ssh_user)(_pure_prompt_ssh_separator)(_pure_prompt_ssh_host) - end -end diff --git a/.config/fish/functions/_pure_prompt_ssh_host.fish b/.config/fish/functions/_pure_prompt_ssh_host.fish deleted file mode 100644 index d403c80..0000000 --- a/.config/fish/functions/_pure_prompt_ssh_host.fish +++ /dev/null @@ -1,7 +0,0 @@ -function _pure_prompt_ssh_host - set --query --global hostname - or set --local hostname (hostname -s) # current host name compatible busybox - set --local hostname_color (_pure_set_color $pure_color_ssh_hostname) - - echo "$hostname_color$hostname" -end diff --git a/.config/fish/functions/_pure_prompt_ssh_separator.fish b/.config/fish/functions/_pure_prompt_ssh_separator.fish deleted file mode 100644 index 10ae5e8..0000000 --- a/.config/fish/functions/_pure_prompt_ssh_separator.fish +++ /dev/null @@ -1,6 +0,0 @@ -function _pure_prompt_ssh_separator - set --local separator_symbol "@" - set --local separator_symbol_color (_pure_set_color $pure_color_ssh_separator) - - echo "$separator_symbol_color$separator_symbol" -end diff --git a/.config/fish/functions/_pure_prompt_ssh_user.fish b/.config/fish/functions/_pure_prompt_ssh_user.fish deleted file mode 100644 index e0cf879..0000000 --- a/.config/fish/functions/_pure_prompt_ssh_user.fish +++ /dev/null @@ -1,10 +0,0 @@ -function _pure_prompt_ssh_user - set --local username (whoami) # current user name - set --local username_color (_pure_set_color $pure_color_ssh_user_normal) # default color - - if test "$username" = "root" - set username_color (_pure_set_color $pure_color_ssh_user_root) # different color for root - end - - echo "$username_color$username" -end diff --git a/.config/fish/functions/_pure_prompt_symbol.fish b/.config/fish/functions/_pure_prompt_symbol.fish deleted file mode 100644 index 768eca7..0000000 --- a/.config/fish/functions/_pure_prompt_symbol.fish +++ /dev/null @@ -1,20 +0,0 @@ -function _pure_prompt_symbol \ - --description 'Print prompt symbol' \ - --argument-names exit_code - - set --local prompt_symbol (_pure_get_prompt_symbol) - set --local symbol_color_success (_pure_set_color $pure_color_prompt_on_success) - set --local symbol_color_error (_pure_set_color $pure_color_prompt_on_error) - set --local command_succeed 0 - - set --local symbol_color $symbol_color_success # default pure symbol color - if test $exit_code -ne $command_succeed - set symbol_color $symbol_color_error # different pure symbol color when previous command failed - - if test "$pure_separate_prompt_on_error" = true - set symbol_color "$symbol_color_error$prompt_symbol$symbol_color_success" - end - end - - echo "$symbol_color$prompt_symbol" -end diff --git a/.config/fish/functions/_pure_prompt_vimode.fish b/.config/fish/functions/_pure_prompt_vimode.fish deleted file mode 100644 index 04d38b4..0000000 --- a/.config/fish/functions/_pure_prompt_vimode.fish +++ /dev/null @@ -1,5 +0,0 @@ -function _pure_prompt_vimode - if test $pure_reverse_prompt_symbol_in_vimode = false - echo (fish_default_mode_prompt) - end -end diff --git a/.config/fish/functions/_pure_prompt_virtualenv.fish b/.config/fish/functions/_pure_prompt_virtualenv.fish deleted file mode 100644 index 6cb2ed6..0000000 --- a/.config/fish/functions/_pure_prompt_virtualenv.fish +++ /dev/null @@ -1,8 +0,0 @@ -function _pure_prompt_virtualenv --description "Display virtualenv directory" - if test -n "$VIRTUAL_ENV" - set --local virtualenv (basename "$VIRTUAL_ENV") - set --local virtualenv_color (_pure_set_color $pure_color_virtualenv) - - echo "$virtualenv_color$virtualenv" - end -end diff --git a/.config/fish/functions/_pure_set_default.fish b/.config/fish/functions/_pure_set_default.fish deleted file mode 100644 index 69e6054..0000000 --- a/.config/fish/functions/_pure_set_default.fish +++ /dev/null @@ -1,8 +0,0 @@ -function _pure_set_default \ - --description 'Set default value for configuration variable' \ - --argument-names var default - - if not set -q --universal $var - set --universal $var $default - end -end diff --git a/.config/fish/functions/_pure_string_width.fish b/.config/fish/functions/_pure_string_width.fish deleted file mode 100644 index 0c1957b..0000000 --- a/.config/fish/functions/_pure_string_width.fish +++ /dev/null @@ -1,9 +0,0 @@ -function _pure_string_width \ - --description 'returns raw string length, i.e. ignore ANSI-color' \ - --argument-names prompt - - set --local empty '' - set --local raw_prompt (string replace --all --regex '\e\[[^m]*m' $empty -- $prompt) - - string length -- $raw_prompt -end diff --git a/.config/fish/functions/fish_greeting.fish b/.config/fish/functions/fish_greeting.fish deleted file mode 100644 index 018520b..0000000 --- a/.config/fish/functions/fish_greeting.fish +++ /dev/null @@ -1,2 +0,0 @@ -function fish_greeting -end diff --git a/.config/fish/functions/fish_mode_prompt.fish b/.config/fish/functions/fish_mode_prompt.fish deleted file mode 100644 index 428a658..0000000 --- a/.config/fish/functions/fish_mode_prompt.fish +++ /dev/null @@ -1,2 +0,0 @@ -function fish_mode_prompt -end diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish deleted file mode 100644 index 9b313e3..0000000 --- a/.config/fish/functions/fish_prompt.fish +++ /dev/null @@ -1,11 +0,0 @@ -function fish_prompt - set --local exit_code $status # save previous exit code - - echo -e -n (_pure_prompt_beginning) # init prompt context (clear current line, etc.) - echo -e (_pure_prompt_first_line) # print current path, git branch/status, command duration - _pure_place_iterm2_prompt_mark # place iTerm shell integration mark - echo -e -n (_pure_prompt $exit_code) # print prompt - echo -e (_pure_prompt_ending) # reset colors and end prompt - - set _pure_fresh_session false -end diff --git a/.config/fish/functions/fish_title.fish b/.config/fish/functions/fish_title.fish deleted file mode 100644 index ff918ab..0000000 --- a/.config/fish/functions/fish_title.fish +++ /dev/null @@ -1,16 +0,0 @@ -function fish_title \ - --description "Set title to current folder and shell name" \ - --argument-names last_command - - set --local basename (string replace -r '^.*/' '' -- $PWD) - set --local current_folder (_pure_parse_directory) - set --local current_command (status current-command 2>/dev/null; or echo $_) - - set --local prompt "$basename: $last_command $pure_symbol_title_bar_separator $current_command" - - if test -z "$last_command" - set prompt "$current_folder $pure_symbol_title_bar_separator $current_command" - end - - echo $prompt -end diff --git a/.config/fish/functions/fish_user_key_bindings.fish b/.config/fish/functions/fish_user_key_bindings.fish deleted file mode 100644 index 350a9da..0000000 --- a/.config/fish/functions/fish_user_key_bindings.fish +++ /dev/null @@ -1,3 +0,0 @@ -function fish_user_key_bindings - fzf_key_bindings -end diff --git a/.config/fish/functions/fisher.fish b/.config/fish/functions/fisher.fish deleted file mode 100644 index 1d63c33..0000000 --- a/.config/fish/functions/fisher.fish +++ /dev/null @@ -1,435 +0,0 @@ -set -g fisher_version 3.2.10 - -function fisher -a cmd -d "fish package manager" - set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache - set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config - - set -g fish_config $XDG_CONFIG_HOME/fish - set -g fisher_cache $XDG_CACHE_HOME/fisher - set -g fisher_config $XDG_CONFIG_HOME/fisher - - set -q fisher_path; or set -g fisher_path $fish_config - set -g fishfile $fish_config/fishfile - - for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache - if test ! -d $path - command mkdir -p $path - end - end - - if test ! -e $fisher_path/completions/fisher.fish - echo "fisher complete" >$fisher_path/completions/fisher.fish - _fisher_complete - end - - if test -e $fisher_path/conf.d/fisher.fish - switch "$version" - case \*-\* - command rm -f $fisher_path/conf.d/fisher.fish - case 2\* - case \* - command rm -f $fisher_path/conf.d/fisher.fish - end - else - switch "$version" - case \*-\* - case 2\* - echo "fisher copy-user-key-bindings" >$fisher_path/conf.d/fisher.fish - end - end - - # 2019-10-22: temp code, migrates fishfile from old path back to $fish_config - if test -e "$fisher_path/fishfile"; and test ! -e "$fishfile" - command mv -f "$fisher_path/fishfile" "$fishfile" - end - - switch "$cmd" - case {,self-}complete - _fisher_complete - case copy-user-key-bindings - _fisher_copy_user_key_bindings - case ls - set -e argv[1] - if test -s "$fishfile" - set -l file (_fisher_fmt <$fishfile | _fisher_parse -R | command sed "s|@.*||") - _fisher_ls | _fisher_fmt | command awk -v FILE="$file" " - BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \$0 in file && /$argv[1]/ - " | command sed "s|^$HOME|~|" - end - case self-update - _fisher_self_update (status -f) - case self-uninstall - _fisher_self_uninstall - case {,-}-v{ersion,} - echo "fisher version $fisher_version" (status -f | command sed "s|^$HOME|~|") - case {,-}-h{elp,} - _fisher_help - case "" - _fisher_commit -- - case add rm - if not isatty - while read -l arg - set argv $argv $arg - end - end - - if test (count $argv) = 1 - echo "fisher: invalid number of arguments" >&2 - _fisher_help >&2 - return 1 - end - - _fisher_commit $argv - case \* - echo "fisher: unknown flag or command \"$cmd\"" >&2 - _fisher_help >&2 - return 1 - end -end - -function _fisher_complete - complete -ec fisher - complete -xc fisher -n __fish_use_subcommand -a add -d "Add packages" - complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove packages" - complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed packages matching REGEX" - complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help" - complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version" - complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version" - for pkg in (fisher ls) - complete -xc fisher -n "__fish_seen_subcommand_from rm" -a $pkg - end -end - -function _fisher_copy_user_key_bindings - if functions -q fish_user_key_bindings - functions -c fish_user_key_bindings fish_user_key_bindings_copy - end - function fish_user_key_bindings - for file in $fisher_path/conf.d/*_key_bindings.fish - source $file >/dev/null 2>/dev/null - end - if functions -q fish_user_key_bindings_copy - fish_user_key_bindings_copy - end - end -end - -function _fisher_ls - for pkg in $fisher_config/*/*/* - command readlink $pkg; or echo $pkg - end -end - -function _fisher_fmt - command sed "s|^[[:space:]]*||;s|^$fisher_config/||;s|^~|$HOME|;s|^\.\/*|$PWD/|;s|^https*:/*||;s|^github\.com/||;s|/*\$||" -end - -function _fisher_help - echo "usage: fisher add <package...> Add packages" - echo " fisher rm <package...> Remove packages" - echo " fisher Update all packages" - echo " fisher ls [<regex>] List installed packages matching <regex>" - echo " fisher --help Show this help" - echo " fisher --version Show the current version" - echo " fisher self-update Update to the latest version" - echo " fisher self-uninstall Uninstall from your system" - echo "examples:" - echo " fisher add jethrokuan/z rafaelrinaldi/pure" - echo " fisher add gitlab.com/foo/bar@v2" - echo " fisher add ~/path/to/local/pkg" - echo " fisher add <file" - echo " fisher rm rafaelrinaldi/pure" - echo " fisher ls | fisher rm" - echo " fisher ls fish-\*" -end - -function _fisher_self_update -a file - set -l url "https://raw.githubusercontent.com/jorgebucaran/fisher/master/fisher.fish" - echo "fetching $url" >&2 - command curl -s "$url?nocache" >$file. - - set -l next_version (command awk '{ print $4 } { exit }' <$file.) - switch "$next_version" - case "" $fisher_version - command rm -f $file. - if test -z "$next_version" - echo "fisher: cannot update fisher -- are you offline?" >&2 - return 1 - end - echo "fisher is already up-to-date" >&2 - case \* - echo "linking $file" | command sed "s|$HOME|~|" >&2 - command mv -f $file. $file - source $file - echo "updated to fisher $fisher_version -- hooray!" >&2 - _fisher_complete - end -end - -function _fisher_self_uninstall - for pkg in (_fisher_ls) - _fisher_rm $pkg - end - - for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fishfile - echo "removing $file" - command rm -Rf $file 2>/dev/null - end | command sed "s|$HOME|~|" >&2 - - for name in (set -n | command awk '/^fisher_/') - set -e "$name" - end - - functions -e (functions -a | command awk '/^_fisher/') fisher - complete -c fisher --erase -end - -function _fisher_commit -a cmd - set -e argv[1] - set -l elapsed (_fisher_now) - - if test ! -e "$fishfile" - command touch $fishfile - echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2 - end - - set -l old_pkgs (_fisher_ls | _fisher_fmt) - for pkg in (_fisher_ls) - _fisher_rm $pkg - end - command rm -Rf $fisher_config - command mkdir -p $fisher_config - - set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_parse -R $cmd (printf "%s\n" $argv | _fisher_fmt)) - set -l actual_pkgs (_fisher_fetch $next_pkgs) - set -l updated_pkgs - for pkg in $old_pkgs - if contains -- $pkg $actual_pkgs - set updated_pkgs $updated_pkgs $pkg - end - end - - if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs" - echo "fisher: nothing to commit -- try adding some packages" >&2 - return 1 - end - - set -l out_pkgs - if test "$cmd" = "rm" - set out_pkgs $next_pkgs - else - for pkg in $next_pkgs - if contains -- (echo $pkg | command sed "s|@.*||") $actual_pkgs - set out_pkgs $out_pkgs $pkg - end - end - end - - printf "%s\n" (_fisher_fmt <$fishfile | _fisher_parse -W $cmd $out_pkgs | command sed "s|^$HOME|~|") >$fishfile - - _fisher_complete - - command awk -v A=(count $actual_pkgs) -v U=(count $updated_pkgs) -v O=(count $old_pkgs) -v E=(_fisher_now $elapsed) ' - BEGIN { - res = fmt("removed", O - U, fmt("updated", U, fmt("added", A - U))) - printf((res ? res : "done") " in %.2fs\n", E / 1000) - } - function fmt(action, n, s) { - return n ? (s ? s ", " : s) action " " n " package" (n > 1 ? "s" : "") : s - } - ' >&2 -end - -function _fisher_parse -a mode cmd - set -e argv[1..2] - command awk -v FS="[[:space:]]*#+" -v MODE="$mode" -v CMD="$cmd" -v ARGSTR="$argv" ' - BEGIN { - for (n = split(ARGSTR, a, " "); i++ < n;) pkgs[getkey(a[i])] = a[i] - } - !NF { next } { k = getkey($1) } - MODE == "-R" && !(k in pkgs) && $0 = $1 - MODE == "-W" && (/^#/ || k in pkgs || CMD != "rm") { print pkgs[k] (sub($1, "") ? $0 : "") } - MODE == "-W" || CMD == "rm" { delete pkgs[k] } - END { - for (k in pkgs) { - if (CMD != "rm" || MODE == "-W") print pkgs[k] - else print "fisher: cannot remove \""k"\" -- package is not in fishfile" > "/dev/stderr" - } - } - function getkey(s, a) { - return (split(s, a, /@+|:/) > 2) ? a[2]"/"a[1]"/"a[3] : a[1] - } - ' -end - -function _fisher_fetch - set -l pkg_jobs - set -l out_pkgs - set -l next_pkgs - set -l local_pkgs - set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token - - for pkg in $argv - switch $pkg - case \~\* /\* - set -l path (echo "$pkg" | command sed "s|^~|$HOME|") - if test -e "$path" - set local_pkgs $local_pkgs $path - else - echo "fisher: cannot add \"$pkg\" -- is this a valid file?" >&2 - end - continue - end - - command awk -v PKG="$pkg" -v FS=/ ' - BEGIN { - if (split(PKG, tmp, /@+|:/) > 2) { - if (tmp[4]) sub("@"tmp[4], "", PKG) - print PKG "\t" tmp[2]"/"tmp[1]"/"tmp[3] "\t" (tmp[4] ? tmp[4] : "master") - } else { - pkg = split(PKG, _, "/") <= 2 ? "github.com/"tmp[1] : tmp[1] - tag = tmp[2] ? tmp[2] : "master" - print (\ - pkg ~ /^github/ ? "https://codeload."pkg"/tar.gz/"tag : \ - pkg ~ /^gitlab/ ? "https://"pkg"/-/archive/"tag"/"tmp[split(pkg, tmp, "/")]"-"tag".tar.gz" : \ - pkg ~ /^bitbucket/ ? "https://"pkg"/get/"tag".tar.gz" : pkg \ - ) "\t" pkg - } - } - ' | read -l url pkg branch - - if test ! -d "$fisher_config/$pkg" - fish -c " - echo fetching $url >&2 - command mkdir -p $fisher_config/$pkg $fisher_cache/(command dirname $pkg) - if test ! -z \"$branch\" - command git clone $url $fisher_config/$pkg --branch $branch --depth 1 2>/dev/null - or echo fisher: cannot clone \"$url\" -- is this a valid url\? >&2 - else if command curl $curl_opts -Ss -w \"\" $url 2>&1 | command tar -xzf- -C $fisher_config/$pkg 2>/dev/null - command rm -Rf $fisher_cache/$pkg - command mv -f $fisher_config/$pkg/* $fisher_cache/$pkg - command rm -Rf $fisher_config/$pkg - command cp -Rf {$fisher_cache,$fisher_config}/$pkg - else if test -d \"$fisher_cache/$pkg\" - echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2 - command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/.. - else - command rm -Rf $fisher_config/$pkg - echo fisher: cannot add \"$pkg\" -- is this a valid package\? >&2 - end - " >/dev/null & - set pkg_jobs $pkg_jobs (_fisher_jobs --last) - set next_pkgs $next_pkgs "$fisher_config/$pkg" - end - end - - if set -q pkg_jobs[1] - while for job in $pkg_jobs - contains -- $job (_fisher_jobs); and break - end - end - for pkg in $next_pkgs - if test -d "$pkg" - set out_pkgs $out_pkgs $pkg - _fisher_add $pkg - end - end - end - - set -l local_prefix $fisher_config/local/$USER - if test ! -d "$local_prefix" - command mkdir -p $local_prefix - end - for pkg in $local_pkgs - set -l target $local_prefix/(command basename $pkg) - if test ! -L "$target" - command ln -sf $pkg $target - set out_pkgs $out_pkgs $pkg - _fisher_add $pkg --link - end - end - - if set -q out_pkgs[1] - _fisher_fetch ( - for pkg in $out_pkgs - if test -s "$pkg/fishfile" - _fisher_fmt <$pkg/fishfile | _fisher_parse -R - end - end) - printf "%s\n" $out_pkgs | _fisher_fmt - end -end - -function _fisher_add -a pkg opts - for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish - set -l target (command basename $src) - switch $src - case $pkg/conf.d\* - set target $fisher_path/conf.d/$target - case $pkg/completions\* - set target $fisher_path/completions/$target - case $pkg/{functions,}\* - switch $target - case uninstall.fish - continue - case {init,key_bindings}.fish - set target $fisher_path/conf.d/(command basename $pkg)\_$target - case \* - set target $fisher_path/functions/$target - end - end - echo "linking $target" | command sed "s|$HOME|~|" >&2 - if set -q opts[1] - command ln -sf $src $target - else - command cp -f $src $target - end - switch $target - case \*.fish - source $target >/dev/null 2>/dev/null - end - end -end - -function _fisher_rm -a pkg - for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish - set -l target (command basename $src) - set -l filename (command basename $target .fish) - switch $src - case $pkg/conf.d\* - test "$filename.fish" = "$target"; and emit "$filename"_uninstall - set target conf.d/$target - case $pkg/completions\* - test "$filename.fish" = "$target"; and complete -ec $filename - set target completions/$target - case $pkg/{,functions}\* - test "$filename.fish" = "$target"; and functions -e $filename - switch $target - case uninstall.fish - source $src - continue - case {init,key_bindings}.fish - set target conf.d/(command basename $pkg)\_$target - case \* - set target functions/$target - end - end - command rm -f $fisher_path/$target - end - if not functions -q fish_prompt - source "$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish" - end -end - -function _fisher_jobs - jobs $argv | command awk '/^[0-9]+\t/ { print $1 }' -end - -function _fisher_now -a elapsed - switch (command uname) - case Darwin \*BSD - command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed - case \* - math (command date "+%s%3N") - "0$elapsed" - end -end diff --git a/.config/fish/functions/fzf_key_bindings.fish b/.config/fish/functions/fzf_key_bindings.fish deleted file mode 120000 index 8e78a35..0000000 --- a/.config/fish/functions/fzf_key_bindings.fish +++ /dev/null @@ -1 +0,0 @@ -/home/nolln/.fzf/shell/key-bindings.fish
\ No newline at end of file diff --git a/.config/fish/functions/tmux_send_down.fish b/.config/fish/functions/tmux_send_down.fish deleted file mode 100644 index 0ca2de3..0000000 --- a/.config/fish/functions/tmux_send_down.fish +++ /dev/null @@ -1,19 +0,0 @@ -function tmux_send_down - set active_tty (tmux list-panes -F "#{pane_active}#{pane_tty}" | grep '^1') - set tty (string sub -s 2 $active_tty) - set proc (ps -o stat= -o command= -t $tty) - - set proc_split (string split "\t" $proc) - set nvim_active 0 - - for entry in $proc_split - if string match -q -- "S*nvim*" $entry - set nvim_active 1 - end - end - if test $nvim_active = 1 - command tmux send-keys C-j - else - command tmux select-pane -D - end -end diff --git a/.config/fish/functions/tmux_send_left.fish b/.config/fish/functions/tmux_send_left.fish deleted file mode 100644 index 19e91f5..0000000 --- a/.config/fish/functions/tmux_send_left.fish +++ /dev/null @@ -1,20 +0,0 @@ -function tmux_send_left - set active_tty (tmux list-panes -F "#{pane_active}#{pane_tty}" | grep '^1') - set tty (string sub -s 2 $active_tty) - set proc (ps -o stat= -o command= -t $tty) - - set proc_split (string split "\t" $proc) - set nvim_active 0 - - for entry in $proc_split - if string match -q -- "S*nvim*" $entry - set nvim_active 1 - end - end - if test $nvim_active = 1 - tmux send-keys C-h - else - tmux select-pane -L - end -end - diff --git a/.config/fish/functions/tmux_send_right.fish b/.config/fish/functions/tmux_send_right.fish deleted file mode 100644 index d128581..0000000 --- a/.config/fish/functions/tmux_send_right.fish +++ /dev/null @@ -1,19 +0,0 @@ -function tmux_send_right - set active_tty (tmux list-panes -F "#{pane_active}#{pane_tty}" | grep '^1') - set tty (string sub -s 2 $active_tty) - set proc (ps -o stat= -o command= -t $tty) - - set proc_split (string split "\t" $proc) - set nvim_active 0 - - for entry in $proc_split - if string match -q -- "S*nvim*" $entry - set nvim_active 1 - end - end - if test $nvim_active = 1 - tmux send-keys C-l - else - tmux select-pane -R - end -end diff --git a/.config/fish/functions/tmux_send_up.fish b/.config/fish/functions/tmux_send_up.fish deleted file mode 100644 index 38ba17a..0000000 --- a/.config/fish/functions/tmux_send_up.fish +++ /dev/null @@ -1,19 +0,0 @@ -function tmux_send_up - set active_tty (tmux list-panes -F "#{pane_active}#{pane_tty}" | grep '^1') - set tty (string sub -s 2 $active_tty) - set proc (ps -o stat= -o command= -t $tty) - - set proc_split (string split "\t" $proc) - set nvim_active 0 - - for entry in $proc_split - if string match -q -- "S*nvim*" $entry - set nvim_active 1 - end - end - if test $nvim_active = 1 - tmux send-keys C-k - else - tmux select-pane -U - end -end diff --git a/.config/offlineimap/func.pyc b/.config/offlineimap/func.pyc Binary files differindex d911971..797a22c 100644 --- a/.config/offlineimap/func.pyc +++ b/.config/offlineimap/func.pyc diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index 3d36eb2..10af9ec 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -338,11 +338,11 @@ c.colors.tabs.selected.odd.fg = nord['nord5'] # Fonts c.completion.height = "33%" -c.fonts.tabs = "12pt consolas" -c.fonts.statusbar = "12pt consolas" -c.fonts.prompts = "12pt consolas" -c.fonts.completion.category = "12pt consolas" -c.fonts.completion.entry = "12pt consolas" +c.fonts.tabs = "14pt consolas" +c.fonts.statusbar = "14pt consolas" +c.fonts.prompts = "14pt consolas" +c.fonts.completion.category = "14pt consolas" +c.fonts.completion.entry = "14pt consolas" c.content.pdfjs = True @@ -54,6 +54,6 @@ do done & picom --config ~/.config/picom/config & -feh --bg-scale ~/media/pics/honnold_wp.jpg +feh --bg-scale ~/media/pics/surf.jpg exec dwm |