From b0080b143c650cf877ae6230958612a5db2c6b37 Mon Sep 17 00:00:00 2001 From: Weslei Juan Moser Pereira Date: Mon, 16 Oct 2023 14:10:43 -0300 Subject: [PATCH] move from zsh to fish --- .config/fish/.gitignore | 9 ++++++ .config/fish/abbr.fish | 58 +++++++++++++++++++++++++++++++++++++ .config/fish/config.fish | 26 +++++++++++++++++ .config/fish/fish_plugins | 3 ++ .config/starship.toml | 11 +++++++ .config/wezterm/wezterm.lua | 22 ++++++++++++++ 6 files changed, 129 insertions(+) create mode 100644 .config/fish/.gitignore create mode 100644 .config/fish/abbr.fish create mode 100644 .config/fish/config.fish create mode 100644 .config/fish/fish_plugins create mode 100644 .config/starship.toml create mode 100644 .config/wezterm/wezterm.lua diff --git a/.config/fish/.gitignore b/.config/fish/.gitignore new file mode 100644 index 0000000..def607c --- /dev/null +++ b/.config/fish/.gitignore @@ -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/* diff --git a/.config/fish/abbr.fish b/.config/fish/abbr.fish new file mode 100644 index 0000000..f55b63c --- /dev/null +++ b/.config/fish/abbr.fish @@ -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" diff --git a/.config/fish/config.fish b/.config/fish/config.fish new file mode 100644 index 0000000..18e491e --- /dev/null +++ b/.config/fish/config.fish @@ -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 diff --git a/.config/fish/fish_plugins b/.config/fish/fish_plugins new file mode 100644 index 0000000..3907aa6 --- /dev/null +++ b/.config/fish/fish_plugins @@ -0,0 +1,3 @@ +jorgebucaran/fisher +patrickf1/fzf.fish +jethrokuan/z diff --git a/.config/starship.toml b/.config/starship.toml new file mode 100644 index 0000000..54b9ac5 --- /dev/null +++ b/.config/starship.toml @@ -0,0 +1,11 @@ +add_newline = false + +[line_break] +disabled = true + +[directory] +truncate_to_repo = false + +[character] +success_symbol = '[󰧞](green) ' +error_symbol = '[󰧞](bold red) ' diff --git a/.config/wezterm/wezterm.lua b/.config/wezterm/wezterm.lua new file mode 100644 index 0000000..b0b91d4 --- /dev/null +++ b/.config/wezterm/wezterm.lua @@ -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