Skip to content

Commit

Permalink
move from zsh to fish
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleimp committed Oct 16, 2023
1 parent 989bb9b commit b0080b1
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .config/fish/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fish_history
fishd.*
fish_read_history
fish_variables
functions/*

# These files are managed by fisher, so let's ignore them
conf.d/*
completions/*
58 changes: 58 additions & 0 deletions .config/fish/abbr.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Misc
abbr bashrc 'nvim ~/.bashrc'
abbr zshconfig 'nvim ~/.zshrc'
abbr ohmyzsh 'nvim ~/.oh-my-zsh'
abbr vimrc "nvim ~/.vimrc"
abbr dotfiles "nvim $DOTFILES"
abbr nvimconfg "nvim ~/nvim"

abbr :q 'exit'
abbr tree "exa -T"
abbr todos "rg --column --line-number --ignore-case --color always -e '(TODO|FIXME)'"

abbr oss "~/OSS"
abbr workspace "~/workspace"

# git
abbr g "git";
abbr glg "git log --graph --decorate --oneline --abbrev-commit";
abbr ggpush "git push origin HEAD";
abbr gd "git diff";
abbr gc "git commit -s";
abbr gca "git commit -sa";
abbr gco "git checkout";
abbr gb "git branch -v";
abbr ga "git add";
abbr gaa "git add -A";
abbr gcm "git commit -sm";
abbr gcam "git commit -sam";
abbr gst "git status -sb";
abbr glnext "git log --oneline (git describe --tags --abbrev0 @^)..@";

# Kubernetes
abbr k "kubectl"
abbr kn "kubens"
abbr kx "kubectx"

# Elixir
abbr m "mix"
abbr mt "mix test"
abbr mc "mix compile"
abbr mf "mix format"
abbr md "mix deps.get"
abbr mdc "mix deps.compile"
abbr mps "mix phx.server"
abbr mpn "mix phx.new"
abbr mec "mix ecto.create"
abbr mec "mix ecto.migrate"
abbr megm "mix ecto.gen.migration"
abbr i "iex"
abbr ism "iex -S mix"
abbr ips "iex -S mix phx.server"

# Docker
abbr d "docker"
abbr dc "docker compose"

abbr h "history | fzf"
abbr tw "tmux-windowizer"
26 changes: 26 additions & 0 deletions .config/fish/config.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
set -U fish_greeting

set -gx EDITOR nvim
set -gx TERMINAL wezterm
set -gx BROWSER brave-browser
set -gx TERM xterm-256color

fish_add_path -p \
$HOME/.mix/escripts \
$HOME/.local/bin \
$GOPATH/bin \
$HOME/.mix \
/opt/homebrew/bin \
$HOME/Library/Python/3.8/bin \
$HOME/.cargo/bin

set -x GOPATH $HOME/go
set -x GO111MODULE on
set -x FZF_DEFAULT_COMMAND "fd --type f --hidden --follow --exclude .git"
set -x DOTFILES $HOME/.dotfiles
set -x NVIMCONF $HOME/nvim

# Aliases
source $HOME/.config/fish/abbr.fish

starship init fish | source
3 changes: 3 additions & 0 deletions .config/fish/fish_plugins
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
jorgebucaran/fisher
patrickf1/fzf.fish
jethrokuan/z
11 changes: 11 additions & 0 deletions .config/starship.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
add_newline = false

[line_break]
disabled = true

[directory]
truncate_to_repo = false

[character]
success_symbol = '[󰧞](green) '
error_symbol = '[󰧞](bold red) '
22 changes: 22 additions & 0 deletions .config/wezterm/wezterm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
local wezterm = require("wezterm")

local config = {}

if wezterm.config_builder then
config = wezterm.config_builder()
end

config.color_scheme = "Tokyo Night (Gogh)"
config.font = wezterm.font("JetBrainsMono Nerd Font")
config.font_size = 14
config.hide_tab_bar_if_only_one_tab = true

config.keys = {
{
key = "r",
mods = "CTRL|SHIFT",
action = wezterm.action.ReloadConfiguration,
},
}

return config

0 comments on commit b0080b1

Please sign in to comment.