Commit Graph

74 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 dc00cca6ca fish: conf/fnm: Switch to required node version automatically 2021-12-28 19:24:45 +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 47e8843882 fish: Drop use of nvr 2021-12-13 11:06:49 +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 b8ccdaacd6 fish: Move sourcing of fnm and starship to conf.d 2021-12-10 15:59:11 +05:30
Sanchayan Maity 78ab1afc24 fish: Drop all git aliases
We do everything with vim-fugitive. Drop all those git aliases. We never
used most of them anyways.
2021-12-10 15:49:47 +05:30
Sanchayan Maity f5fd6ddd55 fish: Move all functions to ~/.config/fish/functions 2021-12-10 15:39:44 +05:30
Sanchayan Maity 99482de9a4 fish: Add alias to fuzzy search RFC documents 2021-12-10 15:21:49 +05:30
Sanchayan Maity 443ba5441a fish: Add an alias to fuzzy find a process to kill 2021-12-08 18:16:16 +05:30
Sanchayan Maity 03a4cb93ff fish: Add an alias for mutt 2021-12-07 13:13:14 +05:30
Sanchayan Maity 405b9ecc92 fish: Drop emacs aliases 2021-12-06 10:28:30 +05:30
Sanchayan Maity 12af55257f fish: Add an alias to open pw-dump output in neovim 2021-12-06 10:28:30 +05:30
Sanchayan Maity 1c2aa05711 fish: Update the journalctl boot aliases 2021-11-20 12:01:33 +05:30
Sanchayan Maity b4acbc3d98 fish: Disable Ctrl-d from closing the terminal
Mapping Ctrl-d in kitty was not the solution for this as we originally
thought.

See https://github.com/fish-shell/fish-shell/issues/5593 for an
explanation of the issue.
2021-11-18 11:28:33 +05:30
Sanchayan Maity c5c2ea10b7 fish: Add aliases for journalctl 2021-11-08 12:31:17 +05:30
Sanchayan Maity af9f761a6c fish: Add aliases to start neovim without plugins & vimrc files 2021-11-08 12:31:17 +05:30
Sanchayan Maity 61e617e494 fish: Use full format listing for ps
Using ps -e is not that helpful since it does not show the full command
line which is what is helpful in filtering and distinguishing between
multiple processes. For eg. we might have multiple processes running
using python and to distinguish between them we need the full command
line invocation.
2021-11-08 12:31:17 +05:30
Sanchayan Maity b0341831e9 fish: Fix flatpak complaining about XDG_DATA_DIRS 2021-10-29 19:58:14 +05:30
Sanchayan Maity 051856602c fish: Update cargo doc open command
Now that we set BROWSER correctly, we need not set this here.
2021-10-22 18:06:11 +05:30
Sanchayan Maity 84455420e5 fish: Unset and set BROWSER
For some reason, BROWSER always gets set to firefox instead of
firefox-wayland which is our own desktop file for starting firefox
in wayland.

Setting the systemd environment variables or using the env in desktop
file has not helped.
2021-10-22 16:07:08 +05:30
Sanchayan Maity 9bc28d47a3 fish: Start sway if running from tty1
sway seems to not start at all when using lightdm to login. We disabled
lightdm and now just use the login shell to start sway. sway never
recommended login managers so this was long due anyways.

See https://github.com/swaywm/sway/wiki#login-managers.
2021-10-22 15:43:57 +05:30
Sanchayan Maity bf9e2bf54c fish: Add aliases for cargo build commands 2021-10-06 09:55:06 +05:30
Sanchayan Maity 241894eb50 fish: Use nvr instead of floaterm
nvr seems to allow opening a file at specified line just like with
regular nvim which seems to not work for floaterm. So when in neovim
terminal vgrep -s opens the file at correct line while in floaterm it
just opens the file and puts us at the first line. Basically something
like nvim +99 file.c does not work for floaterm.
2021-10-05 12:59:43 +05:30
Sanchayan Maity cba3c92d06 fish: Add helpers for seeing & collecting perf data 2021-09-25 13:21:01 +05:30
Sanchayan Maity 2fb77b64bc fish: Add a rust-gdb helper command 2021-09-25 13:21:01 +05:30
Sanchayan Maity a7e7ac968f fish: Add helpers for coredumpctl 2021-09-15 18:33:09 +05:30
Sanchayan Maity f0f12d4294 fish: Add helpers for easing work with gdb 2021-08-13 18:35:03 +05:30
Sanchayan Maity 20ba60e50a fish: Add an alias for the icat kitten 2021-08-12 12:02:25 +05:30
Sanchayan Maity 6f13255bdd fish: Add helper to generate dot graph 2021-08-12 12:02:25 +05:30
Sanchayan Maity 6af6dfa93a fish: Add a helper to pipe command output to nvim 2021-08-06 14:04:45 +05:30
Sanchayan Maity a148531d3f fish: Add shortcuts for searching with ripgrep within in a file
This is primarily to help us with grepping in gstreamer logs.
2021-07-12 18:05:48 +05:30
Sanchayan Maity f99042dbfa fish: Do not set BROWSER environment variable 2021-05-21 11:12:02 +05:30
Sanchayan Maity 46cca9c391 fish: Delete all guix references 2021-05-02 11:20:01 +05:30
Sanchayan Maity bdafd1eea3 fish: Drop lazygit alias
We do not use lazygit anymore.
2021-04-28 10:58:12 +05:30
Sanchayan Maity f65f7ffb3f fish: Improve the alias to only have the fugitive buffer 2021-04-22 17:30:28 +05:30
Sanchayan Maity cfea08a09a fish: Add an alias for opening fugitive in neovim
This gives us access to git status in fugitive easily to carry out
further git operations.
2021-04-07 20:31:37 +05:30
Sanchayan Maity 40aa550eaa fish: Add local bin to PATH
On Arch/Endeavour, local bin seems to be not set in PATH unlike Manjaro,
add this.
2021-03-20 11:44:17 +05:30
Sanchayan Maity dfe344b2b9 fish: Set guix current profile as well
See this stack exchange post for details
https://unix.stackexchange.com/questions/561093/what-is-the-difference-between-guix-profile-and-config-guix-current

Without doing this 'guix describe' also gives an error. See
https://lists.gnu.org/archive/html/bug-guix/2019-05/msg00692.html
2021-03-18 20:01:45 +05:30
Sanchayan Maity b7d8452110 fish: Add guix to pkg-config search path 2021-03-17 20:20:15 +05:30
Sanchayan Maity ea34981998 fish: Add guix 2021-03-16 12:43:15 +05:30
Sanchayan Maity 62fa13f53e fish: Setup node version manager 2021-03-06 12:25:50 +05:30
Sanchayan Maity 41af9e1ea2 fish: Do not set enable wayland for firefox here
We will enable this via systemd environment.d support.
2021-03-03 13:05:46 +05:30
Sanchayan Maity 93726f564c fish/starship: Enable starship 2021-02-04 15:21:09 +05:30