Commit graph

10 commits

Author SHA1 Message Date
Sanchayan Maity e541b2d745 fish: Refactor fish shell configuration
- Drop starship. This also helps us to get rid of ttf-font-nerd install
  which is a dependency of starship.
- Source fnm env only once on login. This makes fish shell/terminal load
  much much faster. Add an alias to invoke fnm use easily.
- Set path or environment variables only when required path or binary
  exists.
- Introduce a function to profile fish easily.
- Borrow the fish prompt logic from Alexis King's configuration.
- Factor out key binding related settings.
- Make su launch fish.

Prompt and other ideas for clean up taken from
https://github.com/lexi-lambda/dotfiles/tree/master/fish
2021-12-29 18:54:57 +05:30
Sanchayan Maity d74d65f667 fish: functions/gl: Allow passing an argument & support cherry picking a commit
This allows us to specify a directory or file to run this git log
command on. Also add support for cherry-picking a commit.
2021-12-23 13:56:03 +05:30
Sanchayan Maity e661dded6c fish: functions: Add aliases for ls/exa and mkdir 2021-12-21 09:26:36 +05:30
Sanchayan Maity 64358a0170 fish: Add an alias to reload kitty configuration 2021-12-18 11:00:41 +05:30
Sanchayan Maity 5a6981e6f7 fish: functions: Use fzf git browse function for git log 2021-12-17 09:58:18 +05:30
Sanchayan Maity 1896207312 fish: functions/fbr: Drop use of delta and xclip
We do not use delta anymore (neovim for everything) and instead of xclip
we need wl-copy in Wayland.

While at it, also add support for scrolling the preview.
2021-12-16 20:23:36 +05:30
Sanchayan Maity f839a3bfff fish: Add the most commonly used git aliases 2021-12-14 15:44:33 +05:30
Sanchayan Maity de0a69ee11 fish: Add an alias to ps_mem 2021-12-13 15:15:01 +05:30
Sanchayan Maity 0d0480a6b2 fish: Make all aliases into functions
Using alias inside ~/.config/fish/config.fish can slow down shell
start as each alias/function will be eagerly loaded.

alias is slow because it involves eval.

functions support lazy/auto loading.
https://fishshell.com/docs/current/tutorial.html#autoloading-functions
2021-12-10 19:50:19 +05:30
Sanchayan Maity f5fd6ddd55 fish: Move all functions to ~/.config/fish/functions 2021-12-10 15:39:44 +05:30