diff --git a/doom/config.el b/doom/config.el deleted file mode 100644 index b108938..0000000 --- a/doom/config.el +++ /dev/null @@ -1,78 +0,0 @@ -;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- - -;; Place your private configuration here! Remember, you do not need to run 'doom -;; sync' after modifying this file! - - -;; Some functionality uses this to identify you, e.g. GPG configuration, email -;; clients, file templates and snippets. It is optional. -(setq user-full-name "Julius Klotz" - user-mail-address "julius.klotz01@sap.com") - - -(setq doom-font (font-spec :family "JetBrains Mono" :size 14 )) -;; Doom exposes five (optional) variables for controlling fonts in Doom: -;; -;; - `doom-font' -- the primary font to use -;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable) -;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for -;; presentations or streaming. -;; - `doom-unicode-font' -- for unicode glyphs -;; - `doom-serif-font' -- for the `fixed-pitch-serif' face -;; -;; See 'C-h v doom-font' for documentation and more examples of what they -;; accept. For example: -;; -;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light) -;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13)) -;; -;; If you or Emacs can't find your font, use 'M-x describe-font' to look them -;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to -;; refresh your font settings. If Emacs still can't find your font, it likely -;; wasn't installed correctly. Font issues are rarely Doom issues! - -;; There are two ways to load a theme. Both assume the theme is installed and -;; available. You can either set `doom-theme' or manually load a theme with the -;; `load-theme' function. This is the default: -(setq doom-theme 'doom-vibrant) - -;; This determines the style of line numbers in effect. If set to `nil', line -;; numbers are disabled. For relative line numbers, set this to `relative'. -(setq display-line-numbers-type 'relative) - -;; If you use `org' and don't want your org files in the default location below, -;; change `org-directory'. It must be set before org loads! -(setq org-directory "~/org/") - - -;; Whenever you reconfigure a package, make sure to wrap your config in an -;; `after!' block, otherwise Doom's defaults may override your settings. E.g. -;; -;; (after! PACKAGE -;; (setq x y)) -;; -;; The exceptions to this rule: -;; -;; - Setting file/directory variables (like `org-directory') -;; - Setting variables which explicitly tell you to set them before their -;; package is loaded (see 'C-h v VARIABLE' to look up their documentation). -;; - Setting doom variables (which start with 'doom-' or '+'). -;; -;; Here are some additional functions/macros that will help you configure Doom. -;; -;; - `load!' for loading external *.el files relative to this one -;; - `use-package!' for configuring packages -;; - `after!' for running code after a package has loaded -;; - `add-load-path!' for adding directories to the `load-path', relative to -;; this file. Emacs searches the `load-path' when you load packages with -;; `require' or `use-package'. -;; - `map!' for binding new keys -;; -;; To get information about any of these functions/macros, move the cursor over -;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). -;; This will open documentation for it, including demos of how they are used. -;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces, -;; etc). -;; -;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how -;; they are implemented. diff --git a/doom/custom.el b/doom/custom.el deleted file mode 100644 index 27fdc69..0000000 --- a/doom/custom.el +++ /dev/null @@ -1,47 +0,0 @@ -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(ansi-color-names-vector - ["#282828" "#fb4934" "#b8bb26" "#fabd2f" "#83a598" "#cc241d" "#8ec07c" "#ebdbb2"]) - '(custom-safe-themes - '("0d01e1e300fcafa34ba35d5cf0a21b3b23bc4053d388e352ae6a901994597ab1" "c4063322b5011829f7fdd7509979b5823e8eea2abf1fe5572ec4b7af1dd78519" default)) - '(exwm-floating-border-color "#504945") - '(fci-rule-color "#7c6f64") - '(highlight-tail-colors ((("#363627" "#363627") . 0) (("#323730" "#323730") . 20))) - '(jdee-db-active-breakpoint-face-colors (cons "#0d1011" "#fabd2f")) - '(jdee-db-requested-breakpoint-face-colors (cons "#0d1011" "#b8bb26")) - '(jdee-db-spec-breakpoint-face-colors (cons "#0d1011" "#928374")) - '(objed-cursor-color "#fb4934") - '(pdf-view-midnight-colors (cons "#ebdbb2" "#282828")) - '(rustic-ansi-faces - ["#282828" "#fb4934" "#b8bb26" "#fabd2f" "#83a598" "#cc241d" "#8ec07c" "#ebdbb2"]) - '(vc-annotate-background "#282828") - '(vc-annotate-color-map - (list - (cons 20 "#b8bb26") - (cons 40 "#cebb29") - (cons 60 "#e3bc2c") - (cons 80 "#fabd2f") - (cons 100 "#fba827") - (cons 120 "#fc9420") - (cons 140 "#fe8019") - (cons 160 "#ed611a") - (cons 180 "#dc421b") - (cons 200 "#cc241d") - (cons 220 "#db3024") - (cons 240 "#eb3c2c") - (cons 260 "#fb4934") - (cons 280 "#e05744") - (cons 300 "#c66554") - (cons 320 "#ac7464") - (cons 340 "#7c6f64") - (cons 360 "#7c6f64"))) - '(vc-annotate-very-old-color nil)) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) diff --git a/doom/init.el b/doom/init.el deleted file mode 100644 index fb81fb8..0000000 --- a/doom/init.el +++ /dev/null @@ -1,191 +0,0 @@ -;;; init.el -*- lexical-binding: t; -*- - -;; This file controls what Doom modules are enabled and what order they load -;; in. Remember to run 'doom sync' after modifying it! - -;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's -;; documentation. There you'll find a link to Doom's Module Index where all -;; of our modules are listed, including what flags they support. - -;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or -;; 'C-c c k' for non-vim users) to view its documentation. This works on -;; flags as well (those symbols that start with a plus). -;; -;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its -;; directory (for easy access to its source code). - -(doom! :input - ;;chinese - ;;japanese - ;;layout ; auie,ctsrnm is the superior home row - - :completion - company ; the ultimate code completion backend - ;;helm ; the *other* search engine for love and life - ;;ido ; the other *other* search engine... - ivy ; a search engine for love and life - vertico ; the search engine of the future - - :ui - ;;deft ; notational velocity for Emacs - doom ; what makes DOOM look the way it does - doom-dashboard ; a nifty splash screen for Emacs - ;;doom-quit ; DOOM quit-message prompts when you quit Emacs - ;;(emoji +unicode) ; 🙂 - hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW - ;;hydra - ;;indent-guides ; highlighted indent columns - ;;ligatures ; ligatures and symbols to make your code pretty again - ;;minimap ; show a map of the code on the side - modeline ; snazzy, Atom-inspired modeline, plus API - ;;nav-flash ; blink cursor line after big motions - neotree ; a project drawer, like NERDTree for vim - ophints ; highlight the region an operation acts on - (popup +defaults) ; tame sudden yet inevitable temporary windows - ;;tabs ; a tab bar for Emacs - ;;treemacs ; a project drawer, like neotree but cooler - ;;unicode ; extended unicode support for various languages - vc-gutter ; vcs diff in the fringe - vi-tilde-fringe ; fringe tildes to mark beyond EOB - ;;window-select ; visually switch windows - workspaces ; tab emulation, persistence & separate workspaces - ;;zen ; distraction-free coding or writing - - :editor - (evil +everywhere); come to the dark side, we have cookies - file-templates ; auto-snippets for empty files - fold ; (nigh) universal code folding - ;;(format +onsave) ; automated prettiness - ;;god ; run Emacs commands without modifier keys - ;;lispy ; vim for lisp, for people who don't like vim - ;;multiple-cursors ; editing in many places at once - ;;objed ; text object editing for the innocent - ;;parinfer ; turn lisp into python, sort of - ;;rotate-text ; cycle region at point between text candidates - snippets ; my elves. They type so I don't have to - ;;word-wrap ; soft wrapping with language-aware indent - - :emacs - dired ; making dired pretty [functional] - electric ; smarter, keyword-based electric-indent - ;;ibuffer ; interactive buffer management - undo ; persistent, smarter undo for your inevitable mistakes - vc ; version-control and Emacs, sitting in a tree - - :term - ;;eshell ; the elisp shell that works everywhere - ;;shell ; simple shell REPL for Emacs - ;;term ; basic terminal emulator for Emacs - vterm ; the best terminal emulation in Emacs - - :checkers - syntax ; tasing you for every semicolon you forget - ;;(spell +flyspell) ; tasing you for misspelling mispelling - ;;grammar ; tasing grammar mistake every you make - - :tools - ;;ansible - ;;biblio ; Writes a PhD for you (citation needed) - ;;debugger ; FIXME stepping through code, to help you add bugs - ;;direnv - ;;docker - ;;editorconfig ; let someone else argue about tabs vs spaces - ;;ein ; tame Jupyter notebooks with emacs - (eval +overlay) ; run code, run (also, repls) - ;;gist ; interacting with github gists - lookup ; navigate your code and its documentation - ;;lsp ; M-x vscode - magit ; a git porcelain for Emacs - ;;make ; run make tasks from Emacs - ;;pass ; password manager for nerds - ;;pdf ; pdf enhancements - ;;prodigy ; FIXME managing external services & code builders - ;;rgb ; creating color strings - ;;taskrunner ; taskrunner for all your projects - ;;terraform ; infrastructure as code - ;;tmux ; an API for interacting with tmux - ;;upload ; map local to remote projects via ssh/ftp - - :os - (:if IS-MAC macos) ; improve compatibility with macOS - ;;tty ; improve the terminal Emacs experience - - :lang - ;;agda ; types of types of types of types... - ;;beancount ; mind the GAAP - ;;(cc +lsp) ; C > C++ == 1 - ;;clojure ; java with a lisp - ;;common-lisp ; if you've seen one lisp, you've seen them all - ;;coq ; proofs-as-programs - ;;crystal ; ruby at the speed of c - ;;csharp ; unity, .NET, and mono shenanigans - ;;data ; config/data formats - ;;(dart +flutter) ; paint ui and not much else - ;;dhall - ;;elixir ; erlang done right - ;;elm ; care for a cup of TEA? - emacs-lisp ; drown in parentheses - ;;erlang ; an elegant language for a more civilized age - ;;ess ; emacs speaks statistics - ;;factor - ;;faust ; dsp, but you get to keep your soul - ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) - ;;fsharp ; ML stands for Microsoft's Language - ;;fstar ; (dependent) types and (monadic) effects and Z3 - ;;gdscript ; the language you waited for - ;;(go +lsp) ; the hipster dialect - ;;(haskell +lsp) ; a language that's lazier than I am - ;;hy ; readability of scheme w/ speed of python - ;;idris ; a language you can depend on - json ; At least it ain't XML - (java +lsp) ; the poster child for carpal tunnel syndrome - ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) - ;;julia ; a better, faster MATLAB - ;;kotlin ; a better, slicker Java(Script) - ;;latex ; writing papers in Emacs has never been so fun - ;;lean ; for folks with too much to prove - ;;ledger ; be audit you can be - ;;lua ; one-based indices? one-based indices - markdown ; writing docs for people to ignore - ;;nim ; python + lisp at the speed of c - ;;nix ; I hereby declare "nix geht mehr!" - ;;ocaml ; an objective camel - org ; organize your plain life in plain text - ;;php ; perl's insecure younger brother - ;;plantuml ; diagrams for confusing people more - ;;purescript ; javascript, but functional - ;;python ; beautiful is better than ugly - ;;qt ; the 'cutest' gui framework ever - ;;racket ; a DSL for DSLs - ;;raku ; the artist formerly known as perl6 - ;;rest ; Emacs as a REST client - ;;rst ; ReST in peace - ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() - ;;scala ; java, but good - ;;(scheme +guile) ; a fully conniving family of lisps - sh ; she sells {ba,z,fi}sh shells on the C xor - ;;sml - ;;solidity ; do you need a blockchain? No. - ;;swift ; who asked for emoji variables? - ;;terra ; Earth and Moon in alignment for performance. - ;;web ; the tubes - ;;yaml ; JSON, but readable - ;;zig ; C, but simpler - - :email - (mu4e +org +gmail) - ;;notmuch - ;;(wanderlust +gmail) - - :app - ;;calendar - ;;emms - ;;everywhere ; *leave* Emacs!? You must be joking - ;;irc ; how neckbeards socialize - ;;(rss +org) ; emacs as an RSS reader - ;;twitter ; twitter client https://twitter.com/vnought - - :config - ;;literate - (default +bindings +smartparens)) diff --git a/doom/packages.el b/doom/packages.el deleted file mode 100644 index 1c80ffc..0000000 --- a/doom/packages.el +++ /dev/null @@ -1,52 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; $DOOMDIR/packages.el - -;; To install a package with Doom you must declare them here and run 'doom sync' -;; on the command line, then restart Emacs for the changes to take effect -- or -;; use 'M-x doom/reload'. - - -;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: -;(package! some-package) - -;; To install a package directly from a remote git repo, you must specify a -;; `:recipe'. You'll find documentation on what `:recipe' accepts here: -;; https://github.com/raxod502/straight.el#the-recipe-format -;(package! another-package -; :recipe (:host github :repo "username/repo")) - -;; If the package you are trying to install does not contain a PACKAGENAME.el -;; file, or is located in a subdirectory of the repo, you'll need to specify -;; `:files' in the `:recipe': -;(package! this-package -; :recipe (:host github :repo "username/repo" -; :files ("some-file.el" "src/lisp/*.el"))) - -;; If you'd like to disable a package included with Doom, you can do so here -;; with the `:disable' property: -;(package! builtin-package :disable t) - -;; You can override the recipe of a built in package without having to specify -;; all the properties for `:recipe'. These will inherit the rest of its recipe -;; from Doom or MELPA/ELPA/Emacsmirror: -;(package! builtin-package :recipe (:nonrecursive t)) -;(package! builtin-package-2 :recipe (:repo "myfork/package")) - -;; Specify a `:branch' to install a package from a particular branch or tag. -;; This is required for some packages whose default branch isn't 'master' (which -;; our package manager can't deal with; see raxod502/straight.el#279) -;(package! builtin-package :recipe (:branch "develop")) - -;; Use `:pin' to specify a particular commit to install. -;(package! builtin-package :pin "1a2b3c4d5e") - - -;; Doom's packages are pinned to a specific commit and updated from release to -;; release. The `unpin!' macro allows you to unpin single packages... -;(unpin! pinned-package) -;; ...or multiple packages -;(unpin! pinned-package another-pinned-package) -;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) -;(unpin! t) - -(package! tldr) diff --git a/fish/completions/fisher.fish b/fish/completions/fisher.fish deleted file mode 100644 index 6d23ce4..0000000 --- a/fish/completions/fisher.fish +++ /dev/null @@ -1,7 +0,0 @@ -complete --command fisher --exclusive --long help --description "Print help" -complete --command fisher --exclusive --long version --description "Print version" -complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" -complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" -complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" -complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" -complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" diff --git a/fish/completions/fzf_configure_bindings.fish b/fish/completions/fzf_configure_bindings.fish deleted file mode 100644 index ec7db93..0000000 --- a/fish/completions/fzf_configure_bindings.fish +++ /dev/null @@ -1,8 +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 processes --description "Change the key binding for searching processes" -complete fzf_configure_bindings --long variables --description "Change the key binding for searching variables" diff --git a/fish/conf.d/_pure_init.fish b/fish/conf.d/_pure_init.fish deleted file mode 100644 index 4a0f421..0000000 --- a/fish/conf.d/_pure_init.fish +++ /dev/null @@ -1,25 +0,0 @@ -# Deactivate the default virtualenv prompt so that we can add our own -set --global --export VIRTUAL_ENV_DISABLE_PROMPT 1 - -# Whether or not is a fresh session -set --global _pure_fresh_session true - -# Register `_pure_prompt_new_line` as an event handler fot `fish_prompt` -functions --query _pure_prompt_new_line - -function _pure_uninstall --on-event pure_uninstall - # erase _pure* variables - set --names \ - | string replace --filter --regex '(^_?pure)' 'set --erase $1' \ - | source - # erase _pure* functions - functions --names --all \ - | string replace --filter --regex '(^_?pure)' 'functions --erase $1' \ - | source - # delete _pure* files - for file in $__fish_config_dir/{functions,conf.d}/_pure_* - rm $file - end - # restore fish_prompt to default - cp {$__fish_data_dir,$__fish_config_dir}/functions/fish_prompt.fish -end diff --git a/fish/conf.d/autopair.fish b/fish/conf.d/autopair.fish deleted file mode 100644 index abb4bf3..0000000 --- a/fish/conf.d/autopair.fish +++ /dev/null @@ -1,39 +0,0 @@ -status is-interactive || exit - -set --global autopair_left "(" "[" "{" '"' "'" -set --global autopair_right ")" "]" "}" '"' "'" -set --global autopair_pairs "()" "[]" "{}" '""' "''" - -function _autopair_fish_key_bindings --on-variable fish_key_bindings - set --query fish_key_bindings[1] || return - - test $fish_key_bindings = fish_default_key_bindings && - set --local mode default insert || - set --local mode insert default - - bind --mode $mode[-1] --erase \177 \b \t - - bind --mode $mode[1] \177 _autopair_backspace # macOS ⌫ - bind --mode $mode[1] \b _autopair_backspace - bind --mode $mode[1] \t _autopair_tab - - printf "%s\n" $autopair_pairs | while read --local left right --delimiter "" - bind --mode $mode[-1] --erase $left $right - if test $left = $right - bind --mode $mode[1] $left "_autopair_insert_same \\$left" - else - bind --mode $mode[1] $left "_autopair_insert_left \\$left \\$right" - bind --mode $mode[1] $right "_autopair_insert_right \\$right" - end - end -end - -_autopair_fish_key_bindings - -function _autopair_uninstall --on-event autopair_uninstall - string collect ( - bind --all | string replace --filter --regex -- "_autopair.*" --erase - set --names | string replace --filter --regex -- "^autopair" "set --erase autopair" - ) | source - functions --erase (functions --all | string match "_autopair_*") -end diff --git a/fish/conf.d/fzf.fish b/fish/conf.d/fzf.fish deleted file mode 100644 index 8156c11..0000000 --- a/fish/conf.d/fzf.fish +++ /dev/null @@ -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/conf.d/pure.fish b/fish/conf.d/pure.fish deleted file mode 100644 index 9f78ab7..0000000 --- a/fish/conf.d/pure.fish +++ /dev/null @@ -1,91 +0,0 @@ -set --global pure_version 4.4.3 # For bug report and tag-after-merge workflow - -# Base colors -_pure_set_default pure_color_primary blue -_pure_set_default pure_color_info cyan -_pure_set_default pure_color_mute brblack -_pure_set_default pure_color_success magenta -_pure_set_default pure_color_normal normal -_pure_set_default pure_color_danger red -_pure_set_default pure_color_light white -_pure_set_default pure_color_warning yellow -_pure_set_default pure_color_dark black - -# Prompt -_pure_set_default pure_symbol_prompt "❯" -_pure_set_default pure_symbol_reverse_prompt "❮" # used for VI mode -_pure_set_default pure_color_prompt_on_error pure_color_danger -_pure_set_default pure_color_prompt_on_success pure_color_success - -# Current Working Directory -_pure_set_default pure_color_current_directory pure_color_primary - -# Git -_pure_set_default pure_enable_git true -_pure_set_default pure_symbol_git_unpulled_commits "⇣" -_pure_set_default pure_symbol_git_unpushed_commits "⇡" -_pure_set_default pure_symbol_git_dirty "*" -_pure_set_default pure_symbol_git_stash "≡" -_pure_set_default pure_color_git_unpulled_commits pure_color_info -_pure_set_default pure_color_git_unpushed_commits pure_color_info -_pure_set_default pure_color_git_branch pure_color_mute -_pure_set_default pure_color_git_dirty pure_color_mute -_pure_set_default pure_color_git_stash pure_color_info - -# Remote info (user@hostname) for SSH and containers (Docker/LXC) -_pure_set_default pure_color_hostname pure_color_mute -_pure_set_default pure_color_at_sign pure_color_mute -_pure_set_default pure_color_username_normal pure_color_mute -_pure_set_default pure_color_username_root pure_color_light - -# Number of running jobs -_pure_set_default pure_show_jobs false -_pure_set_default pure_color_jobs pure_color_normal - -# Show system time -_pure_set_default pure_show_system_time false -_pure_set_default pure_color_system_time pure_color_mute - -# Virtualenv for Python -_pure_set_default pure_color_virtualenv pure_color_mute - -# Print current working directory at the beginning of prompt -# true (default): current directory, git, user@hostname (ssh-only), command duration -# false: user@hostname (ssh-only), current directory, git, command duration -_pure_set_default pure_begin_prompt_with_current_directory true - -# Show exit code of last command as a separate prompt character (cf. https://github.com/sindresorhus/pure/wiki#show-exit-code-of-last-command-as-a-separate-prompt-character) -# false - single prompt character, default -# true - separate prompt character -_pure_set_default pure_separate_prompt_on_error false - -# Max execution time of a process before its run time is shown when it exits -_pure_set_default pure_threshold_command_duration 5 -_pure_set_default pure_show_subsecond_command_duration false -_pure_set_default pure_color_command_duration pure_color_warning - -# VI mode indicator -# true (default): indicate a non-insert mode by reversing the prompt symbol (❮) -# false: indicate vi mode with [I], [N], [V] -_pure_set_default pure_reverse_prompt_symbol_in_vimode true - -# Title -_pure_set_default pure_symbol_title_bar_separator - - -# Check for new release on startup -_pure_set_default pure_check_for_new_release false - -# Prefix prompt when logged in as root -_pure_set_default pure_show_prefix_root_prompt false -_pure_set_default pure_symbol_prefix_root_prompt "#" -_pure_set_default pure_color_prefix_root_prompt pure_color_danger - -# Compact mode -_pure_set_default pure_enable_single_line_prompt false - -# Detect when running in container (e.g. docker, podman, LXC/LXD) -_pure_set_default pure_enable_container_detection true -_pure_set_default pure_symbol_container_prefix "" # suggestion: '🐋' or '📦' - -# Detect when running in SSH -_pure_set_default pure_symbol_ssh_prefix "" # suggestion: 'ssh:/' or '🔗🔐🔒🌐' diff --git a/fish/config.fish b/fish/config.fish deleted file mode 100644 index ca898c9..0000000 --- a/fish/config.fish +++ /dev/null @@ -1,9 +0,0 @@ -if status is-interactive - # Commands to run in interactive sessions can go here -end - -set -U fish_greeting - -alias odsmock="cd ~/personal_workspace/order-delivery-schedule/app && npm run serve:mock" -alias odsdock="cd ~/personal_workspace/order-delivery-schedule && docker compose down && docker compose up --build" -alias odsbuild="cd ~/personal_workspace/order-delivery-schedule && mvn clean package -DskipTests" diff --git a/fish/fish_plugins b/fish/fish_plugins deleted file mode 100644 index 5da0d98..0000000 --- a/fish/fish_plugins +++ /dev/null @@ -1,4 +0,0 @@ -jorgebucaran/fisher -pure-fish/pure -jorgebucaran/autopair.fish -patrickf1/fzf.fish diff --git a/fish/fish_variables b/fish/fish_variables deleted file mode 100644 index fe1e835..0000000 --- a/fish/fish_variables +++ /dev/null @@ -1,87 +0,0 @@ -# This file contains fish universal variable definitions. -# VERSION: 3.0 -SETUVAR __fish_initialized:3400 -SETUVAR _fisher_jorgebucaran_2F_autopair_2E_fish_files:\x7e/\x2econfig/fish/functions/_autopair_backspace\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_left\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_right\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_same\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_tab\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/autopair\x2efish -SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish -SETUVAR _fisher_patrickf1_2F_fzf_2E_fish_files:\x7e/\x2econfig/fish/functions/_fzf_configure_bindings_help\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_extract_var_info\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_changed_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_diff_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_file_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_log\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_status\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_history\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_processes\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_variables\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_wrapper\x2efish\x1e\x7e/\x2econfig/fish/functions/fzf_configure_bindings\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fzf\x2efish\x1e\x7e/\x2econfig/fish/completions/fzf_configure_bindings\x2efish -SETUVAR _fisher_plugins:jorgebucaran/fisher\x1epure\x2dfish/pure\x1ejorgebucaran/autopair\x2efish\x1epatrickf1/fzf\x2efish -SETUVAR _fisher_pure_2D_fish_2F_pure_files:\x7e/\x2econfig/fish/functions/_pure_check_for_new_release\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_detect_container_by_cgroup_method\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_detect_container_by_pid_method\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_format_time\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_get_prompt_symbol\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_is_inside_container\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_is_single_line_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_parse_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_parse_git_branch\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_place_iterm2_prompt_mark\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prefix_root_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_print_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_print_prompt_rows\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_beginning\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_command_duration\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_container\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_current_folder\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_ending\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_first_line\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_branch\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_dirty\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_pending_commits\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_stash\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_jobs\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_new_line\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_ssh\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_symbol\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_system_time\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_vimode\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_virtualenv\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_set_color\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_set_default\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_string_width\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_user_at_host\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_greeting\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_mode_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_title\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/_pure_init\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/pure\x2efish -SETUVAR _fisher_upgraded_to_4_4:\x1d -SETUVAR fish_color_autosuggestion:555\x1ebrblack -SETUVAR fish_color_cancel:\x2dr -SETUVAR fish_color_command:blue -SETUVAR fish_color_comment:red -SETUVAR fish_color_cwd:green -SETUVAR fish_color_cwd_root:red -SETUVAR fish_color_end:green -SETUVAR fish_color_error:brred -SETUVAR fish_color_escape:brcyan -SETUVAR fish_color_history_current:\x2d\x2dbold -SETUVAR fish_color_host:normal -SETUVAR fish_color_host_remote:yellow -SETUVAR fish_color_normal:normal -SETUVAR fish_color_operator:brcyan -SETUVAR fish_color_param:cyan -SETUVAR fish_color_quote:yellow -SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold -SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack -SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack -SETUVAR fish_color_status:red -SETUVAR fish_color_user:brgreen -SETUVAR fish_color_valid_path:\x2d\x2dunderline -SETUVAR fish_greeting:\x1d -SETUVAR fish_key_bindings:fish_default_key_bindings -SETUVAR fish_pager_color_completion:normal -SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di -SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline -SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan -SETUVAR fish_pager_color_selected_background:\x2dr -SETUVAR fish_user_paths:/opt/homebrew/bin -SETUVAR pure_begin_prompt_with_current_directory:true -SETUVAR pure_check_for_new_release:false -SETUVAR pure_color_at_sign:pure_color_mute -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_stash:pure_color_info -SETUVAR pure_color_git_unpulled_commits:pure_color_info -SETUVAR pure_color_git_unpushed_commits:pure_color_info -SETUVAR pure_color_hostname:pure_color_mute -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_prefix_root_prompt:pure_color_danger -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_success:magenta -SETUVAR pure_color_system_time:pure_color_mute -SETUVAR pure_color_username_normal:pure_color_mute -SETUVAR pure_color_username_root:pure_color_light -SETUVAR pure_color_virtualenv:pure_color_mute -SETUVAR pure_color_warning:yellow -SETUVAR pure_enable_container_detection:true -SETUVAR pure_enable_git:true -SETUVAR pure_enable_single_line_prompt:false -SETUVAR pure_reverse_prompt_symbol_in_vimode:true -SETUVAR pure_separate_prompt_on_error:false -SETUVAR pure_show_jobs:false -SETUVAR pure_show_prefix_root_prompt:false -SETUVAR pure_show_subsecond_command_duration:false -SETUVAR pure_show_system_time:false -SETUVAR pure_symbol_container_prefix: -SETUVAR pure_symbol_git_dirty:\x2a -SETUVAR pure_symbol_git_stash:\u2261 -SETUVAR pure_symbol_git_unpulled_commits:\u21e3 -SETUVAR pure_symbol_git_unpushed_commits:\u21e1 -SETUVAR pure_symbol_prefix_root_prompt:\x23 -SETUVAR pure_symbol_prompt:\u276f -SETUVAR pure_symbol_reverse_prompt:\u276e -SETUVAR pure_symbol_ssh_prefix: -SETUVAR pure_symbol_title_bar_separator:\x2d -SETUVAR pure_threshold_command_duration:5 diff --git a/fish/functions/_autopair_backspace.fish b/fish/functions/_autopair_backspace.fish deleted file mode 100644 index a43fa79..0000000 --- a/fish/functions/_autopair_backspace.fish +++ /dev/null @@ -1,9 +0,0 @@ -function _autopair_backspace - set --local index (commandline --cursor) - set --local buffer (commandline) - - test $index -ge 1 && - contains -- (string sub --start=$index --length=2 -- "$buffer") $autopair_pairs && - commandline --function delete-char - commandline --function backward-delete-char -end diff --git a/fish/functions/_autopair_insert_left.fish b/fish/functions/_autopair_insert_left.fish deleted file mode 100644 index f078e86..0000000 --- a/fish/functions/_autopair_insert_left.fish +++ /dev/null @@ -1,13 +0,0 @@ -function _autopair_insert_left --argument-names left right - set --local buffer (commandline) - set --local before (commandline --cut-at-cursor) - - commandline --insert -- $left - - switch "$buffer" - case "$before"{," "\*,$autopair_right\*} - set --local index (commandline --cursor) - commandline --insert -- $right - commandline --cursor $index - end -end diff --git a/fish/functions/_autopair_insert_right.fish b/fish/functions/_autopair_insert_right.fish deleted file mode 100644 index a0bd61c..0000000 --- a/fish/functions/_autopair_insert_right.fish +++ /dev/null @@ -1,11 +0,0 @@ -function _autopair_insert_right --argument-names key - set --local buffer (commandline) - set --local before (commandline --cut-at-cursor) - - switch "$buffer" - case "$before$key"\* - commandline --cursor (math (commandline --cursor) + 1) - case \* - commandline --insert -- $key - end -end diff --git a/fish/functions/_autopair_insert_same.fish b/fish/functions/_autopair_insert_same.fish deleted file mode 100644 index 27f971d..0000000 --- a/fish/functions/_autopair_insert_same.fish +++ /dev/null @@ -1,20 +0,0 @@ -function _autopair_insert_same --argument-names key - set --local buffer (commandline) - set --local index (commandline --cursor) - set --local next (string sub --start=(math $index + 1) --length=1 -- "$buffer") - - if test (math (count (string match --all --regex -- "$key" "$buffer")) % 2) = 0 - test $key = $next && commandline --cursor (math $index + 1) && return - - commandline --insert -- $key - - if test $index -lt 1 || - contains -- (string sub --start=$index --length=1 -- "$buffer") "" " " $autopair_left && - contains -- $next "" " " $autopair_right - commandline --insert -- $key - commandline --cursor (math $index + 1) - end - else - commandline --insert -- $key - end -end diff --git a/fish/functions/_autopair_tab.fish b/fish/functions/_autopair_tab.fish deleted file mode 100644 index f2ab8eb..0000000 --- a/fish/functions/_autopair_tab.fish +++ /dev/null @@ -1,7 +0,0 @@ -function _autopair_tab - commandline --paging-mode && down-or-search && return - - string match --quiet --regex -- '\$[^\s]*"$' (commandline --current-token) && - commandline --function end-of-line --function backward-delete-char - commandline --function complete -end diff --git a/fish/functions/_fzf_configure_bindings_help.fish b/fish/functions/_fzf_configure_bindings_help.fish deleted file mode 100644 index ecfe68e..0000000 --- a/fish/functions/_fzf_configure_bindings_help.fish +++ /dev/null @@ -1,43 +0,0 @@ -function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings." - echo "\ -USAGE: - fzf_configure_bindings [--COMMAND=[KEY_SEQUENCE]...] - -DESCRIPTION - fzf_configure_bindings installs key bindings for fzf.fish's commands and erases any bindings it - previously installed. It installs bindings for both default and insert modes. fzf.fish executes - it without options on fish startup to install the out-of-the-box key bindings. - - By default, commands are bound to a mnemonic key sequence, shown below. Each command's binding - can be configured using a namesake corresponding option: - COMMAND | DEFAULT 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 Processes | Ctrl+Alt+P (P for process) | --processes - Search Variables | Ctrl+V (V for variable) | --variables - Override a command's binding by specifying its corresponding option with the desired key - sequence. Disable a command's binding by specifying its corresponding option with no value. - - Because fzf_configure_bindings erases bindings it previously installed, it can be cleanly - executed multiple times. Once the desired fzf_configure_bindings command has been found, add it - to your config.fish in order to persist the customized bindings. - - In terms of validation, fzf_configure_bindings fails if passed unknown options. It expects an - equals sign between an option's name and value. However, it does not validate key sequences. - - Pass -h or --help to print this help message and exit. - -EXAMPLES - Default bindings but bind Search Directory to Ctrl+F and Search Variables to Ctrl+Alt+V - \$ fzf_configure_bindings --directory=\cf --variables=\e\cv - Default bindings but disable Search History - \$ fzf_configure_bindings --history= - An agglomeration of different options - \$ fzf_configure_bindings --git_status=\cg --history=\ch --variables= --processes= - -SEE Also - To learn more about fish key bindings, see bind(1) and fish_key_reader(1). -" -end diff --git a/fish/functions/_fzf_extract_var_info.fish b/fish/functions/_fzf_extract_var_info.fish deleted file mode 100644 index dd4e952..0000000 --- a/fish/functions/_fzf_extract_var_info.fish +++ /dev/null @@ -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/functions/_fzf_preview_changed_file.fish b/fish/functions/_fzf_preview_changed_file.fish deleted file mode 100644 index a13219b..0000000 --- a/fish/functions/_fzf_preview_changed_file.fish +++ /dev/null @@ -1,49 +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 -> "New License" -function _fzf_preview_changed_file --argument-names path_status --description "Show the git diff of the given file." - # remove quotes because they'll be interpreted literally by git diff - # no need to requote when referencing $path because fish does not perform word splitting - # https://fishshell.com/docs/current/fish_for_bash_users.html - set -l path (string unescape (string sub --start 4 $path_status)) - # first letter of short format shows index, second letter shows working tree - # https://git-scm.com/docs/git-status/2.35.0#_short_format - set -l index_status (string sub --length 1 $path_status) - set -l working_tree_status (string sub --start 2 --length 1 $path_status) - - set diff_opts --color=always - - if test $index_status = '?' - _fzf_report_diff_type Untracked - _fzf_preview_file $path - else if contains {$index_status}$working_tree_status DD AU UD UA DU AA UU - # Unmerged statuses taken directly from git status help's short format table - # Unmerged statuses are mutually exclusive with other statuses, so if we see - # these, then safe to assume the path is unmerged - _fzf_report_diff_type Unmerged - git diff $diff_opts -- $path - else - if test $index_status != ' ' - _fzf_report_diff_type Staged - - # renames are only detected in the index, never working tree, so only need to test for it here - # https://stackoverflow.com/questions/73954214 - if test $index_status = R - # diff the post-rename path with the original path, otherwise the diff will show the entire file as being added - set orig_and_new_path (string split --max 1 -- ' -> ' $path) - git diff --staged $diff_opts -- $orig_and_new_path[1] $orig_and_new_path[2] - # path currently has the form of "original -> current", so we need to correct it before it's used below - set path $orig_and_new_path[2] - else - git diff --staged $diff_opts -- $path - end - end - - if test $working_tree_status != ' ' - _fzf_report_diff_type Unstaged - git diff $diff_opts -- $path - end - end -end diff --git a/fish/functions/_fzf_preview_file.fish b/fish/functions/_fzf_preview_file.fish deleted file mode 100644 index eaa68d0..0000000 --- a/fish/functions/_fzf_preview_file.fish +++ /dev/null @@ -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/functions/_fzf_report_diff_type.fish b/fish/functions/_fzf_report_diff_type.fish deleted file mode 100644 index 3463c3f..0000000 --- a/fish/functions/_fzf_report_diff_type.fish +++ /dev/null @@ -1,18 +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 line (string repeat --count $repeat_count ─) - set top_border ╭$line╮ - set btm_border ╰$line╯ - - set_color yellow - echo $top_border - echo "│ $diff_type │" - echo $btm_border - set_color normal -end diff --git a/fish/functions/_fzf_report_file_type.fish b/fish/functions/_fzf_report_file_type.fish deleted file mode 100644 index 49e02e1..0000000 --- a/fish/functions/_fzf_report_file_type.fish +++ /dev/null @@ -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/functions/_fzf_search_directory.fish b/fish/functions/_fzf_search_directory.fish deleted file mode 100644 index 15085be..0000000 --- a/fish/functions/_fzf_search_directory.fish +++ /dev/null @@ -1,34 +0,0 @@ -function _fzf_search_directory --description "Search the current directory. Replace the current token with the selected file paths." - # Directly use fd binary to avoid output buffering delay caused by a fd alias, if any. - # Debian-based distros install fd as fdfind and the fd package is something else, so - # check for fdfind first. Fall back to "fd" for a clear error message. - set fd_cmd (command -v fdfind || command -v fd || echo "fd") - set --append fd_cmd --color=always $fzf_fd_opts - - # $fzf_dir_opts is the deprecated version of $fzf_directory_opts - set fzf_arguments --multi --ansi $fzf_dir_opts $fzf_directory_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_cmd --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="Search Directory $unescaped_exp_token> " --preview="_fzf_preview_file $expanded_token{}" - set file_paths_selected $unescaped_exp_token($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments) - else - set --prepend fzf_arguments --prompt="Search Directory> " --query="$unescaped_exp_token" --preview='_fzf_preview_file {}' - set file_paths_selected ($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments) - end - - - if test $status -eq 0 - commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ') - end - - commandline --function repaint -end diff --git a/fish/functions/_fzf_search_git_log.fish b/fish/functions/_fzf_search_git_log.fish deleted file mode 100644 index a158b02..0000000 --- a/fish/functions/_fzf_search_git_log.fish +++ /dev/null @@ -1,30 +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 - if not set --query fzf_git_log_format - # %h gives you the abbreviated commit hash, which is useful for saving screen space, but we will have to expand it later below - set fzf_git_log_format '%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)' - end - set selected_log_lines ( - git log --no-show-signature --color=always --format=format:$fzf_git_log_format --date=short | \ - _fzf_wrapper --ansi \ - --multi \ - --tiebreak=index \ - --prompt="Search Git Log> " \ - --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/functions/_fzf_search_git_status.fish b/fish/functions/_fzf_search_git_status.fish deleted file mode 100644 index 9e51453..0000000 --- a/fish/functions/_fzf_search_git_status.fish +++ /dev/null @@ -1,36 +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 \ - --prompt="Search Git Status> " \ - --query=(commandline --current-token) \ - --preview='_fzf_preview_changed_file {}' \ - --nth="2.." \ - $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/functions/_fzf_search_history.fish b/fish/functions/_fzf_search_history.fish deleted file mode 100644 index 27cf4f1..0000000 --- a/fish/functions/_fzf_search_history.fish +++ /dev/null @@ -1,31 +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 \ - --prompt="Search History> " \ - --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/functions/_fzf_search_processes.fish b/fish/functions/_fzf_search_processes.fish deleted file mode 100644 index 9424aad..0000000 --- a/fish/functions/_fzf_search_processes.fish +++ /dev/null @@ -1,29 +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 \ - --prompt="Search Processes> " \ - --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/functions/_fzf_search_variables.fish b/fish/functions/_fzf_search_variables.fish deleted file mode 100644 index eda2453..0000000 --- a/fish/functions/_fzf_search_variables.fish +++ /dev/null @@ -1,48 +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" \ - --prompt="Search Variables> " \ - --preview-window="wrap" \ - --multi \ - --query=$cleaned_curr_token \ - # $fzf_shell_vars_opts is the deprecated version of $fzf_variables_opts - $fzf_shell_vars_opts $fzf_variables_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/functions/_fzf_wrapper.fish b/fish/functions/_fzf_wrapper.fish deleted file mode 100644 index a928701..0000000 --- a/fish/functions/_fzf_wrapper.fish +++ /dev/null @@ -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/functions/_pure_check_for_new_release.fish b/fish/functions/_pure_check_for_new_release.fish deleted file mode 100644 index a174939..0000000 --- a/fish/functions/_pure_check_for_new_release.fish +++ /dev/null @@ -1,24 +0,0 @@ -function _pure_check_for_new_release \ - --description "Check for new release and show command to install" - - if test "$pure_check_for_new_release" = true - echo "🛈 Checking for new release…" - set latest (pure_get_latest_release_version "pure-fish/pure") - - if test "v"$pure_version != $latest - set --local latest_version (_pure_set_color $pure_color_info)$latest(_pure_set_color $pure_color_normal) - echo -e "🔔 New version available!\n" - echo -e (_pure_set_color $pure_color_success)"fisher install pure-fish/pure@$latest_version\n" - end - end -end - - -function pure_get_latest_release_version \ - --argument-names user_repo - - curl \ - --silent \ - "https://api.github.com/repos/$user_repo/releases/latest" \ - | string match --regex '"tag_name": "\K.*?(?=")' -end diff --git a/fish/functions/_pure_detect_container_by_cgroup_method.fish b/fish/functions/_pure_detect_container_by_cgroup_method.fish deleted file mode 100644 index 30b29dd..0000000 --- a/fish/functions/_pure_detect_container_by_cgroup_method.fish +++ /dev/null @@ -1,10 +0,0 @@ -function _pure_detect_container_by_cgroup_method \ - --description "Linux method to detect container using cgroup. see https://stackoverflow.com/a/37015387/802365" \ - --argument-names cgroup_namespace - set --query cgroup_namespace[1]; or set cgroup_namespace /proc/1/cgroup - - string match \ - --quiet \ - --entire \ - --regex '(lxc|docker)' <$cgroup_namespace -end diff --git a/fish/functions/_pure_detect_container_by_pid_method.fish b/fish/functions/_pure_detect_container_by_pid_method.fish deleted file mode 100644 index f11470e..0000000 --- a/fish/functions/_pure_detect_container_by_pid_method.fish +++ /dev/null @@ -1,14 +0,0 @@ -function _pure_detect_container_by_pid_method \ - --description "Linux method to detect container using /proc. see https://stackoverflow.com/a/37015387/802365" \ - --argument-names proc_sched - - set --query proc_sched[1]; or set proc_sched /proc/1/sched - - if test -e $proc_sched - head -n 1 $proc_sched \ - | string match \ - --quiet \ - --invert \ - --regex 'init|systemd' - end -end diff --git a/fish/functions/_pure_format_time.fish b/fish/functions/_pure_format_time.fish deleted file mode 100644 index 140f72f..0000000 --- a/fish/functions/_pure_format_time.fish +++ /dev/null @@ -1,49 +0,0 @@ -set SUCCESS 0 -set FAILURE 1 - -function _pure_format_time \ - --description="Format milliseconds to a human readable format" \ - --argument-names \ - milliseconds \ - threshold \ - show_subsecond - - set --query show_subsecond[1]; or set show_subsecond false - test "$milliseconds" -lt 0; and return $FAILURE - test "$milliseconds" -lt (math --scale=0 "$threshold * 1000"); and echo; and return $SUCCESS - - set --local time - set --local days (math --scale=0 "$milliseconds / 86400000") - test "$days" -gt 0; and set --append time (printf "%sd" $days) - set --local hours (math --scale=0 "$milliseconds / 3600000 % 24") - test "$hours" -gt 0; and set --append time (printf "%sh" $hours) - set --local minutes (math --scale=0 "$milliseconds / 60000 % 60") - test "$minutes" -gt 0; and set --append time (printf "%sm" $minutes) - set --local seconds (math --scale=0 "$milliseconds / 1000 % 60") - - if test "$show_subsecond" = true - set --local threshold_as_ms (math --scale=0 "$threshold*1000") - set --local subseconds (_pure_format_time_subseconds $milliseconds $threshold_as_ms) - set --append time $seconds$subseconds's' - else - test "$seconds" -gt $threshold; and set --append time (printf "%ss" $seconds) - end - - echo -e (string join ' ' $time) -end - - -function _pure_format_time_subseconds \ - --description="Format duration milliseconds to a human readable format" \ - --argument-names \ - duration \ - threshold - - set --local subseconds - if test "$duration" -gt $threshold - set --local precision 2 - set --local milliseconds (string sub --start -3 --length $precision $duration) - set --append subseconds '.'$milliseconds - end - echo $subseconds -end diff --git a/fish/functions/_pure_get_prompt_symbol.fish b/fish/functions/_pure_get_prompt_symbol.fish deleted file mode 100644 index 75c15e7..0000000 --- a/fish/functions/_pure_get_prompt_symbol.fish +++ /dev/null @@ -1,12 +0,0 @@ -function _pure_get_prompt_symbol \ - --description 'Print prompt symbol' \ - --argument-names exit_code - - set --local prompt_symbol $pure_symbol_prompt - test "$pure_reverse_prompt_symbol_in_vimode" = true - and string match -rq "fish_(vi|hybrid)_key_bindings" $fish_key_bindings - and not contains "$fish_bind_mode" insert replace - and set prompt_symbol $pure_symbol_reverse_prompt - - echo "$prompt_symbol" -end diff --git a/fish/functions/_pure_is_inside_container.fish b/fish/functions/_pure_is_inside_container.fish deleted file mode 100644 index adc53b6..0000000 --- a/fish/functions/_pure_is_inside_container.fish +++ /dev/null @@ -1,26 +0,0 @@ -function _pure_is_inside_container \ - --argument-names cgroup_namespace - set --query cgroup_namespace[1]; or set cgroup_namespace /proc/1/cgroup - - if set --query pure_enable_container_detection; and test "$pure_enable_container_detection" = true - set --local success 0 - if test -n "$container" - return $success - end - - set --local os_name (uname -s) - # echo $os_name - if test $os_name = Linux - if _pure_detect_container_by_cgroup_method $cgroup_namespace - return $success - end - - if _pure_detect_container_by_pid_method - return $success - end - end - - set --local failure 1 - return $failure - end -end diff --git a/fish/functions/_pure_is_single_line_prompt.fish b/fish/functions/_pure_is_single_line_prompt.fish deleted file mode 100644 index f1efd4e..0000000 --- a/fish/functions/_pure_is_single_line_prompt.fish +++ /dev/null @@ -1,5 +0,0 @@ -function _pure_is_single_line_prompt \ - --description 'Test if single line prompt feature is enabled' - set --query pure_enable_single_line_prompt - and test "$pure_enable_single_line_prompt" = true -end diff --git a/fish/functions/_pure_parse_directory.fish b/fish/functions/_pure_parse_directory.fish deleted file mode 100644 index fb3822a..0000000 --- a/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/fish/functions/_pure_parse_git_branch.fish b/fish/functions/_pure_parse_git_branch.fish deleted file mode 100644 index a666f2a..0000000 --- a/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/fish/functions/_pure_place_iterm2_prompt_mark.fish b/fish/functions/_pure_place_iterm2_prompt_mark.fish deleted file mode 100644 index b999b7a..0000000 --- a/fish/functions/_pure_place_iterm2_prompt_mark.fish +++ /dev/null @@ -1,5 +0,0 @@ -function _pure_place_iterm2_prompt_mark - if functions -q iterm2_prompt_mark - iterm2_prompt_mark - end -end diff --git a/fish/functions/_pure_prefix_root_prompt.fish b/fish/functions/_pure_prefix_root_prompt.fish deleted file mode 100644 index e9fb86f..0000000 --- a/fish/functions/_pure_prefix_root_prompt.fish +++ /dev/null @@ -1,11 +0,0 @@ -function _pure_prefix_root_prompt - set --local username (id -u -n) # current user name - set --local prefix_root_prompt - - if set --query pure_show_prefix_root_prompt; and test "$pure_show_prefix_root_prompt" = true -a "$username" = "root" - set --local prefix_color (_pure_set_color $pure_color_prefix_root_prompt) - set prefix_root_prompt "$prefix_color$pure_symbol_prefix_root_prompt" - end - - echo "$prefix_root_prompt" -end diff --git a/fish/functions/_pure_print_prompt.fish b/fish/functions/_pure_print_prompt.fish deleted file mode 100644 index 53213c1..0000000 --- a/fish/functions/_pure_print_prompt.fish +++ /dev/null @@ -1,13 +0,0 @@ -function _pure_print_prompt \ - --description 'Concatenate parts single prompt string' \ - - set --local prompt - - for prompt_part in $argv - if test (_pure_string_width $prompt_part) -gt 0 - set --append prompt "$prompt_part" - end - end - - echo (string trim -l $prompt) -end diff --git a/fish/functions/_pure_print_prompt_rows.fish b/fish/functions/_pure_print_prompt_rows.fish deleted file mode 100644 index cc8555c..0000000 --- a/fish/functions/_pure_print_prompt_rows.fish +++ /dev/null @@ -1,10 +0,0 @@ -function _pure_print_prompt_rows \ - --description "Manage default vs. compact prompt" - - # print current path, git branch/status, command duration - if _pure_is_single_line_prompt - echo -e -n (_pure_prompt_first_line) - else - echo -e (_pure_prompt_first_line) - end -end diff --git a/fish/functions/_pure_prompt.fish b/fish/functions/_pure_prompt.fish deleted file mode 100644 index d3eb33a..0000000 --- a/fish/functions/_pure_prompt.fish +++ /dev/null @@ -1,27 +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) - set --local system_time (_pure_prompt_system_time) - set --local root_prefix (_pure_prefix_root_prompt) - set --local space - - if _pure_is_single_line_prompt - set space ' ' - end - - echo (\ - _pure_print_prompt \ - $space \ - $system_time \ - $root_prefix \ - $jobs \ - $virtualenv \ - $vimode_indicator \ - $pure_symbol \ - ) -end diff --git a/fish/functions/_pure_prompt_beginning.fish b/fish/functions/_pure_prompt_beginning.fish deleted file mode 100644 index 5f00236..0000000 --- a/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/fish/functions/_pure_prompt_command_duration.fish b/fish/functions/_pure_prompt_command_duration.fish deleted file mode 100644 index 0a2e231..0000000 --- a/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 $pure_show_subsecond_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/fish/functions/_pure_prompt_container.fish b/fish/functions/_pure_prompt_container.fish deleted file mode 100644 index 97a6056..0000000 --- a/fish/functions/_pure_prompt_container.fish +++ /dev/null @@ -1,5 +0,0 @@ -function _pure_prompt_container - if _pure_is_inside_container - echo "$pure_symbol_container_prefix"(_pure_user_at_host) - end -end diff --git a/fish/functions/_pure_prompt_current_folder.fish b/fish/functions/_pure_prompt_current_folder.fish deleted file mode 100644 index 462d9b1..0000000 --- a/fish/functions/_pure_prompt_current_folder.fish +++ /dev/null @@ -1,11 +0,0 @@ -set FAILURE 1 - -function _pure_prompt_current_folder --argument-names current_prompt_width - - if test -z "$current_prompt_width"; return $FAILURE; 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/fish/functions/_pure_prompt_ending.fish b/fish/functions/_pure_prompt_ending.fish deleted file mode 100644 index ba92511..0000000 --- a/fish/functions/_pure_prompt_ending.fish +++ /dev/null @@ -1,3 +0,0 @@ -function _pure_prompt_ending - echo (set_color normal)" " -end diff --git a/fish/functions/_pure_prompt_first_line.fish b/fish/functions/_pure_prompt_first_line.fish deleted file mode 100644 index 680d0c0..0000000 --- a/fish/functions/_pure_prompt_first_line.fish +++ /dev/null @@ -1,37 +0,0 @@ -set --global FAILURE 1 - -function _pure_prompt_first_line \ - --description 'Print contextual information before prompt.' - - set --local prompt_ssh (_pure_prompt_ssh) - set --local prompt_container (_pure_prompt_container) - 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_container \ - $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 set --query pure_begin_prompt_with_current_directory; and test "$pure_begin_prompt_with_current_directory" = true - set prompt_components \ - $current_folder \ - $prompt_git \ - $prompt_ssh \ - $prompt_container \ - $prompt_command_duration - else - set prompt_components \ - $prompt_ssh \ - $prompt_container \ - $current_folder \ - $prompt_git \ - $prompt_command_duration - end - - echo (_pure_print_prompt $prompt_components) -end diff --git a/fish/functions/_pure_prompt_git.fish b/fish/functions/_pure_prompt_git.fish deleted file mode 100644 index 6e3377d..0000000 --- a/fish/functions/_pure_prompt_git.fish +++ /dev/null @@ -1,26 +0,0 @@ -function _pure_prompt_git \ - --description 'Print git repository informations: branch name, dirty, upstream ahead/behind' - - set ABORT_FEATURE 2 - - if set --query pure_enable_git; and test "$pure_enable_git" != true - return - end - - if not type -q --no-functions git # skip git-related features when `git` is not available - return $ABORT_FEATURE - 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)(_pure_prompt_git_stash) - set --local git_pending_commits (_pure_prompt_git_pending_commits) - - if test (_pure_string_width $git_pending_commits) -ne 0 - set --append git_prompt $git_pending_commits - end - - echo $git_prompt - end -end diff --git a/fish/functions/_pure_prompt_git_branch.fish b/fish/functions/_pure_prompt_git_branch.fish deleted file mode 100644 index 777cd0e..0000000 --- a/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/fish/functions/_pure_prompt_git_dirty.fish b/fish/functions/_pure_prompt_git_dirty.fish deleted file mode 100644 index fbf31e3..0000000 --- a/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/fish/functions/_pure_prompt_git_pending_commits.fish b/fish/functions/_pure_prompt_git_pending_commits.fish deleted file mode 100644 index 6ae7c59..0000000 --- a/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/fish/functions/_pure_prompt_git_stash.fish b/fish/functions/_pure_prompt_git_stash.fish deleted file mode 100644 index 531ceb4..0000000 --- a/fish/functions/_pure_prompt_git_stash.fish +++ /dev/null @@ -1,15 +0,0 @@ -function _pure_prompt_git_stash - set --local git_stash_symbol - set --local git_stash_color - - set --local has_stashed_files ( - command git rev-list --walk-reflogs --count refs/stash >/dev/null 2>&1 - and echo "true" - ) - if test -n "$has_stashed_files" # untracked or un-commited files - set git_stash_symbol " $pure_symbol_git_stash" - set git_stash_color (_pure_set_color $pure_color_git_stash) - end - - echo "$git_stash_color$git_stash_symbol" -end diff --git a/fish/functions/_pure_prompt_jobs.fish b/fish/functions/_pure_prompt_jobs.fish deleted file mode 100644 index 3a5181d..0000000 --- a/fish/functions/_pure_prompt_jobs.fish +++ /dev/null @@ -1,9 +0,0 @@ -function _pure_prompt_jobs --description "Display number of running jobs" - if set --query pure_show_jobs; and test "$pure_show_jobs" = true - set --local njobs (count (jobs -p)) - set --local jobs_color (_pure_set_color $pure_color_jobs) - if test "$njobs" -gt 0 - echo "$jobs_color"[$njobs] - end - end -end diff --git a/fish/functions/_pure_prompt_new_line.fish b/fish/functions/_pure_prompt_new_line.fish deleted file mode 100644 index 2c75554..0000000 --- a/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 not _pure_is_single_line_prompt; and test "$_pure_fresh_session" = false - set new_line "\n" - end - - echo -e -n "$new_line" -end diff --git a/fish/functions/_pure_prompt_ssh.fish b/fish/functions/_pure_prompt_ssh.fish deleted file mode 100644 index ab721df..0000000 --- a/fish/functions/_pure_prompt_ssh.fish +++ /dev/null @@ -1,5 +0,0 @@ -function _pure_prompt_ssh - if test "$SSH_CONNECTION" != "" - echo "$pure_symbol_ssh_prefix"(_pure_user_at_host) - end -end diff --git a/fish/functions/_pure_prompt_symbol.fish b/fish/functions/_pure_prompt_symbol.fish deleted file mode 100644 index 120dd7d..0000000 --- a/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 set --query exit_code; and test "$exit_code" -ne $command_succeed - set symbol_color $symbol_color_error # different pure symbol color when previous command failed - - if set --query pure_separate_prompt_on_error; and 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/fish/functions/_pure_prompt_system_time.fish b/fish/functions/_pure_prompt_system_time.fish deleted file mode 100644 index 49f134f..0000000 --- a/fish/functions/_pure_prompt_system_time.fish +++ /dev/null @@ -1,6 +0,0 @@ -function _pure_prompt_system_time --description "Display system time" - if set --query pure_show_system_time; and test "$pure_show_system_time" = true - set --local time_color (_pure_set_color $pure_color_system_time) - echo "$time_color"(date '+%T') - end -end diff --git a/fish/functions/_pure_prompt_vimode.fish b/fish/functions/_pure_prompt_vimode.fish deleted file mode 100644 index d95d806..0000000 --- a/fish/functions/_pure_prompt_vimode.fish +++ /dev/null @@ -1,6 +0,0 @@ -function _pure_prompt_vimode - if set --query pure_reverse_prompt_symbol_in_vimode; - and test "$pure_reverse_prompt_symbol_in_vimode" = false - echo (fish_default_mode_prompt) - end -end diff --git a/fish/functions/_pure_prompt_virtualenv.fish b/fish/functions/_pure_prompt_virtualenv.fish deleted file mode 100644 index 5fb2ba8..0000000 --- a/fish/functions/_pure_prompt_virtualenv.fish +++ /dev/null @@ -1,13 +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" - else if test -n "$CONDA_DEFAULT_ENV" - set --local virtualenv (basename "$CONDA_DEFAULT_ENV") - set --local virtualenv_color (_pure_set_color $pure_color_virtualenv) - - echo "$virtualenv_color$virtualenv" - end -end diff --git a/fish/functions/_pure_set_color.fish b/fish/functions/_pure_set_color.fish deleted file mode 100644 index c05769a..0000000 --- a/fish/functions/_pure_set_color.fish +++ /dev/null @@ -1,19 +0,0 @@ -function _pure_set_color \ - --description 'Set color' \ - --argument-names var - - set --local color $var - # Backwards compatibility for colors defined as control sequencies instead of fish colors - if not string match --quiet --all --regex '\e\[[^m]*m' $color[1] - and set -q $color - set color $$var - end - - set --local result $color - if not string match --quiet --all --regex '\e\[[^m]*m' $result[1] - and not test -z $result[1] - set result (set_color $color) - end - - echo "$result" -end diff --git a/fish/functions/_pure_set_default.fish b/fish/functions/_pure_set_default.fish deleted file mode 100644 index d5c86a8..0000000 --- a/fish/functions/_pure_set_default.fish +++ /dev/null @@ -1,11 +0,0 @@ -function _pure_set_default \ - --description 'Set default value for configuration variable' \ - --argument-names var default - - set is_available_universally (not set --query --universal $var; or test -z $$var; echo $status) - set is_available_globally (not set --query --global $var; or test -z $$var; echo $status) - - if test "$is_available_universally" -eq 0 -a $is_available_globally -eq 0 - set --universal $var "$default" - end -end diff --git a/fish/functions/_pure_string_width.fish b/fish/functions/_pure_string_width.fish deleted file mode 100644 index 0c1957b..0000000 --- a/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/fish/functions/_pure_user_at_host.fish b/fish/functions/_pure_user_at_host.fish deleted file mode 100644 index e41cc67..0000000 --- a/fish/functions/_pure_user_at_host.fish +++ /dev/null @@ -1,13 +0,0 @@ -function _pure_user_at_host - set --local username (id -u -n) # current user name - set --local at_sign "@" - set --local at_sign_color (_pure_set_color $pure_color_at_sign) - set --local hostname_color (_pure_set_color $pure_color_hostname) - - set --local username_color (_pure_set_color $pure_color_username_normal) # default color - if test "$username" = root - set username_color (_pure_set_color $pure_color_username_root) # different color for root - end - - echo "$username_color$username$at_sign_color$at_sign$hostname_color$hostname" -end diff --git a/fish/functions/fish_greeting.fish b/fish/functions/fish_greeting.fish deleted file mode 100644 index 878b30e..0000000 --- a/fish/functions/fish_greeting.fish +++ /dev/null @@ -1,3 +0,0 @@ -function fish_greeting - _pure_check_for_new_release -end diff --git a/fish/functions/fish_mode_prompt.fish b/fish/functions/fish_mode_prompt.fish deleted file mode 100644 index 428a658..0000000 --- a/fish/functions/fish_mode_prompt.fish +++ /dev/null @@ -1,2 +0,0 @@ -function fish_mode_prompt -end diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish deleted file mode 100644 index 29ad856..0000000 --- a/fish/functions/fish_prompt.fish +++ /dev/null @@ -1,12 +0,0 @@ -# a called to `_pure_prompt_new_line` is triggered by an event -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.) - _pure_print_prompt_rows # manage default vs. compact prompt - _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/fish/functions/fish_title.fish b/fish/functions/fish_title.fish deleted file mode 100644 index fbc4a27..0000000 --- a/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 --regex '^.*/' '' -- $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/fish/functions/fisher.fish b/fish/functions/fisher.fish deleted file mode 100644 index c0a86fa..0000000 --- a/fish/functions/fisher.fish +++ /dev/null @@ -1,240 +0,0 @@ -function fisher --argument-names cmd --description "A plugin manager for Fish" - set --query fisher_path || set --local fisher_path $__fish_config_dir - set --local fisher_version 4.4.3 - set --local fish_plugins $__fish_config_dir/fish_plugins - - switch "$cmd" - case -v --version - echo "fisher, version $fisher_version" - case "" -h --help - echo "Usage: fisher install Install plugins" - echo " fisher remove Remove installed plugins" - echo " fisher update Update installed plugins" - echo " fisher update Update all installed plugins" - echo " fisher list [] List installed plugins matching regex" - echo "Options:" - echo " -v or --version Print version" - echo " -h or --help Print this help message" - echo "Variables:" - echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~ - case ls list - string match --entire --regex -- "$argv[2]" $_fisher_plugins - case install update remove - isatty || read --local --null --array stdin && set --append argv $stdin - - set --local install_plugins - set --local update_plugins - set --local remove_plugins - set --local arg_plugins $argv[2..-1] - set --local old_plugins $_fisher_plugins - set --local new_plugins - - test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins) - - if ! set --query argv[2] - if test "$cmd" != update - echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1 - else if ! set --query file_plugins - echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1 - end - set arg_plugins $file_plugins - end - - for plugin in $arg_plugins - set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin) - contains -- "$plugin" $new_plugins || set --append new_plugins $plugin - end - - if set --query argv[2] - for plugin in $new_plugins - if contains -- "$plugin" $old_plugins - test "$cmd" = remove && - set --append remove_plugins $plugin || - set --append update_plugins $plugin - else if test "$cmd" = install - set --append install_plugins $plugin - else - echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1 - end - end - else - for plugin in $new_plugins - contains -- "$plugin" $old_plugins && - set --append update_plugins $plugin || - set --append install_plugins $plugin - end - - for plugin in $old_plugins - contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin - end - end - - set --local pid_list - set --local source_plugins - set --local fetch_plugins $update_plugins $install_plugins - set --local fish_path (status fish-path) - - echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal) - - for plugin in $fetch_plugins - set --local source (command mktemp -d) - set --append source_plugins $source - - command mkdir -p $source/{completions,conf.d,themes,functions} - - $fish_path --command " - if test -e $plugin - command cp -Rf $plugin/* $source - else - set temp (command mktemp -d) - set repo (string split -- \@ $plugin) || set repo[2] HEAD - - if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1]) - set name (string split -- / \$path)[-1] - set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz - else - set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2] - end - - echo Fetching (set_color --underline)\$url(set_color normal) - - if curl --silent -L \$url | tar -xzC \$temp -f - 2>/dev/null - command cp -Rf \$temp/*/* $source - else - echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2 - command rm -rf $source - end - - command rm -rf \$temp - end - - set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files - " & - - set --append pid_list (jobs --last --pid) - end - - wait $pid_list 2>/dev/null - - for plugin in $fetch_plugins - if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source - if set --local index (contains --index -- "$plugin" $install_plugins) - set --erase install_plugins[$index] - else - set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)] - end - end - end - - for plugin in $update_plugins $remove_plugins - if set --local index (contains --index -- "$plugin" $_fisher_plugins) - set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files - - if contains -- "$plugin" $remove_plugins - for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var) - emit {$name}_uninstall - end - printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~ - set --erase _fisher_plugins[$index] - end - - command rm -rf (string replace -- \~ ~ $$plugin_files_var) - - functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var) - - for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var) - complete --erase --command $name - end - - set --erase $plugin_files_var - end - end - - if set --query update_plugins[1] || set --query install_plugins[1] - command mkdir -p $fisher_path/{functions,themes,conf.d,completions} - end - - for plugin in $update_plugins $install_plugins - set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] - set --local files $source/{functions,themes,conf.d,completions}/* - - if set --local index (contains --index -- $plugin $install_plugins) - set --local user_files $fisher_path/{functions,themes,conf.d,completions}/* - set --local conflict_files - - for file in (string replace -- $source/ $fisher_path/ $files) - contains -- $file $user_files && set --append conflict_files $file - end - - if set --query conflict_files[1] && set --erase install_plugins[$index] - echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2 - continue - end - end - - for file in (string replace -- $source/ "" $files) - command cp -RLf $source/$file $fisher_path/$file - end - - set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files - - set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~) - - contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin - contains -- $plugin $install_plugins && set --local event install || set --local event update - - printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~ - - for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~) - source $file - if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file) - emit {$name}_$event - end - end - end - - command rm -rf $source_plugins - - if set --query _fisher_plugins[1] - set --local commit_plugins - - for plugin in $file_plugins - contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin - end - - for plugin in $_fisher_plugins - contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin - end - - printf "%s\n" $commit_plugins >$fish_plugins - else - set --erase _fisher_plugins - command rm -f $fish_plugins - end - - set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins) - - test "$total" != "0 0 0" && echo (string join ", " ( - test $total[1] = 0 || echo "Installed $total[1]") ( - test $total[2] = 0 || echo "Updated $total[2]") ( - test $total[3] = 0 || echo "Removed $total[3]") - ) plugin/s - case \* - echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1 - end -end - -if ! set --query _fisher_upgraded_to_4_4 - set --universal _fisher_upgraded_to_4_4 - if functions --query _fisher_list - set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share - command rm -rf $XDG_DATA_HOME/fisher - functions --erase _fisher_{list,plugin_parse} - fisher update >/dev/null 2>/dev/null - else - for var in (set --names | string match --entire --regex '^_fisher_.+_files$') - set $var (string replace -- ~ \~ $$var) - end - functions --erase _fisher_fish_postexec - end -end diff --git a/fish/functions/fzf_configure_bindings.fish b/fish/functions/fzf_configure_bindings.fish deleted file mode 100644 index ec24f73..0000000 --- a/fish/functions/fzf_configure_bindings.fish +++ /dev/null @@ -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=?' 'processes=?' 'variables=?' - 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 = processes, 6 = variables - set key_sequences \e\cf \e\cl \e\cs \cr \e\cp \cv # \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_processes && set key_sequences[5] "$_flag_processes" - set --query _flag_variables && set key_sequences[6] "$_flag_variables" - - # 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_processes - test -n $key_sequences[6] && bind --mode $mode $key_sequences[6] "$_fzf_search_vars_command" - 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/kitty/kitty.conf b/kitty/kitty.conf deleted file mode 100644 index 254d9af..0000000 --- a/kitty/kitty.conf +++ /dev/null @@ -1,40 +0,0 @@ -background #0e1419 -foreground #e5e1cf -cursor #f19618 -selection_background #243340 -color0 #000000 -color8 #323232 -color1 #ff3333 -color9 #ff6565 -color2 #b8cc52 -color10 #e9fe83 -color3 #e6c446 -color11 #fff778 -color4 #36a3d9 -color12 #68d4ff -color5 #f07078 -color13 #ffa3aa -color6 #95e5cb -color14 #c7fffc -color7 #ffffff -color15 #ffffff -selection_foreground #0e1419 - -# Tab bar colors -active_tab_foreground #282a36 -active_tab_background #f8f8f2 -inactive_tab_foreground #282a36 -inactive_tab_background #6272a4 - -# Marks -mark1_foreground #282a36 -mark1_background #ff5555 -font_family Fira Code Medium - -macos_thicken_font 0.25 -font_size 13.0 - -macos_hide_titlebar yes - -window_padding_width 10 - diff --git a/nvim/init.lua b/nvim/init.lua index 22a6407..c0e21b0 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -73,6 +73,8 @@ require('lazy').setup({ -- Useful plugin to show you pending keybinds. { 'folke/which-key.nvim', opts = {} }, + { 'echasnovski/mini.nvim', version = false }, + { "nvim-tree/nvim-web-devicons", opts = {} }, { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -457,15 +459,16 @@ local on_attach = function(_, bufnr) end -- document existing key chains -require('which-key').register { - ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, - ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, - ['g'] = { name = '[G]it', _ = 'which_key_ignore' }, - ['h'] = { name = 'More git', _ = 'which_key_ignore' }, - ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, - ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, - ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, -} +local wk = require('which-key') +wk.add({ + { "c", group = "[C]ode" }, + { "d", group = "[D]ocument" }, + { "g", group = "[G]it" }, + { "h", group = "More git" }, + { "r", group = "[R]ename" }, + { "s", group = "[S]earch" }, + { "w", group = "[W]orkspace" }, +}) -- mason-lspconfig requires that these setup functions are called in this order -- before setting up the servers. diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 94c1f41..ba494d8 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -1,17 +1,22 @@ -unbind r -bind r source-file ~/.tmux.conf +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +setw -g mode-keys vi set -g prefix C-s -set -g default-terminal "screen-256color" -set-option -a terminal-overrides ",alacritty:RGB" +unbind-key C-b -setw -g mode-keys vi -bind-key h select-pane -L -bind-key j select-pane -D -bind-key k select-pane -U -bind-key l select-pane -R +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R -set -g @plugin 'tmux-plugins/tpm' -set -g @plugin 'christoomey/vim-tmux-navigator' +# Other examples: +# set -g @plugin 'github_username/plugin_name' +# set -g @plugin 'github_username/plugin_name#branch' +# set -g @plugin 'git@github.com:user/plugin' +# set -g @plugin 'git@bitbucket.com:user/plugin' +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm' +run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux diff --git a/vscodium/keybindings.json b/vscodium/keybindings.json index 1811bc5..30874c8 100644 --- a/vscodium/keybindings.json +++ b/vscodium/keybindings.json @@ -1,24 +1,11 @@ -// Place your key bindings in this file to override the defaultsauto[] +// Place your key bindings in this file to override the defaults [ - { - "key": "alt+v", - "command": "workbench.action.splitEditor" - }, - { - "key": "alt+s", - "command": "workbench.action.splitEditorOrthogonal" - }, - { - "key": "ctrl+[Backquote]", - "command": "workbench.action.terminal.toggleTerminal" - }, - { - "key": "ctrl+shift+[Equal]", - "command": "-workbench.action.terminal.toggleTerminal" - }, - { - "key": "ctrl+k ctrl+1", - "command": "-editor.foldLevel1", - "when": "editorTextFocus && foldingEnabled" - } -] + { + "key": "ctrl+cmd+b", + "command": "workbench.action.activityBarLocation.default" + }, + { + "key": "ctrl+shift+cmd+b", + "command": "workbench.action.activityBarLocation.hide" + } +] \ No newline at end of file diff --git a/vscodium/settings.json b/vscodium/settings.json index d174b6b..b766fba 100644 --- a/vscodium/settings.json +++ b/vscodium/settings.json @@ -1,10 +1,74 @@ { - "workbench.colorTheme": "Atom One Dark", - "editor.fontFamily": "SF Mono", - "editor.fontWeight": "600", - "terminal.integrated.fontFamily": "SF Mono", - "terminal.integrated.fontWeight": "600", - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, - "editor.formatOnPaste": true -} + "workbench.colorTheme": "Catppuccin Frappé", + "editor.fontFamily": "Cascadia Code", + "editor.fontSize": 14, + "editor.fontWeight": "350", + "extensions.experimental.affinity": { + "asvetliakov.vscode-neovim": 1 + }, + "sap.ux.applicationModeler.disableMigrationPrompt": true, + "vscode-neovim.neovimExecutablePaths.darwin": "/opt/homebrew/bin/nvim", + "vscode-neovim.neovimInitVimPaths.darwin": "/Users/D068796/.config/nvim/init.lua", + "haskell.manageHLS": "GHCup", + "[haskell]": { + "editor.defaultFormatter": "haskell.haskell" + }, + "editor.formatOnSave": true, + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "[javascript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "eslint.format.enable": true, + "redhat.telemetry.enabled": false, + "editor.minimap.enabled": false, + "breadcrumbs.enabled": false, + "editor.stickyScroll.enabled": false, + "editor.folding": false, + "workbench.statusBar.visible": false, + "workbench.sideBar.location": "right", + "workbench.editor.showTabs": "none", + "editor.guides.indentation": false, + "workbench.tree.renderIndentGuides": "none", + "editor.scrollbar.horizontal": "hidden", + "editor.scrollbar.vertical": "hidden", + "workbench.fontAliasing": "auto", + "catppuccin.italicComments": false, + "catppuccin.italicKeywords": false, + "editor.semanticTokenColorCustomizations": { + "[Default Dark+]": { + "rules": { + "property.mandatory:xml": { + "bold": true + }, + "string.i18n:xml": { + "italic": true + } + } + }, + "[Default Light+]": { + "rules": { + "property.mandatory:xml": { + "bold": true + }, + "string.i18n:xml": { + "italic": true + } + } + }, + "[Default High Contrast]": { + "rules": { + "property.mandatory:xml": { + "bold": true + }, + "string.i18n:xml": { + "italic": true + } + } + } + }, + "update.mode": "manual", + "[xml]": { + "editor.defaultFormatter": "SAPSE.sap-ux-annotation-modeler-extension" + } + +} \ No newline at end of file