Skip to content

Kab1r/.fish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kabir’s Fish Config

./.github/assets/screenshot.svg

Prerequisites

Installation

git clone https://github.com/Kab1r/.fish ~/.config/fish
fisher update

Plugins

Kab1r/Fisher-Bang-Bang
jorgebucaran/fisher
jorgebucaran/spark.fish

Configurations

Editor

Terminal

if command -qs emacsclient
    set -gx EDITOR "emacsclient -nw -c"
else if command -qs emacs
    set -gx EDITOR "emacs -nw"
else if command -qs vim
    set -gx EDITOR vim
else if command -qs vi
    set -gx EDITOR vi
end

Visual

if command -qs emacsclient
    set -gx VISUAL "emacsclient -c"
else if command -qs emacs
    set -gx VISUAL "emacs -c"
else if command -qs code
    set -gx VISUAL code
end

Keybinds

set fish_key_bindings fish_vi_key_bindings

The Fuck

if command -qs thefuck
    thefuck --alias | source
end

Man Pager

if command -qs sh and command -qs sed and command -qs bat
    set -gx MANPAGER "sh -c 'sed -e s/.\\\\x08//g | bat -l man -p --theme Dracula'"
end

PATH

Local Dir

set -gxa PATH $HOME/.local/bin

Rust / Cargo

if command -qs cargo
    set -gxa PATH $HOME/.cargo/bin
end

Deno

if command -qs deno
    set -gxa PATH $HOME/.deno/bin
end

Flutter / Dart

if command -qs dart
    set -gxa PATH $HOME/.pub-cache/bin
end

Emacs

if command -qs emacs
    set -gxa PATH $HOME/.emacs.d/bin
end

Depot Tools

set -gxa PATH /opt/depot_tools

Starship Prompt

if command -qs starship
    set -gx STARSHIP_CONFIG $HOME/.config/fish/starship.toml
    starship init fish | source
end
format = """
╭─$all\
"""
[line_break]
disabled = true

[character]
format = "\n╰─$symbol "
success_symbol = "[❯](bold green)"
error_symbol   = "[❯](bold red)"
vicmd_symbol   = "[❮](bold green)"

[username]
format = "[$user]($style)@"
show_always = true
style_user = '#DF005F'

[hostname]
format = "[$hostname]($style)::"
ssh_only = false

[directory]
style = '#87FF00'
truncation_symbol = "…/"

[gcloud]
disabled = true

Greeting

set fish_greeting

Zoxide

if command -qs zoxide
    zoxide init fish | source
end

Functions

ls

function ls
  if command -qs exa
    exa --icons --color=always --group-directories-first $argv
  else
    command ls $argv
  end
end

ssh

function ssh
    if test "$TERM" = xterm-kitty
        kitty +kitten ssh $argv
    else
        command ssh $argv
    end
end