Commit graph

214 commits

Author SHA1 Message Date
3851e99f1b
fish: functions: Rename to not conflict with git abbreviations 2023-05-10 14:24:40 +05:30
6474278ca1
fish: functions: Remove tmux and some git aliases
We will introduce equivalent ones with abbreviations.
2023-05-10 14:24:39 +05:30
1b5a8f5edb
fish: conf.d/setup: Set ripgrep config file path
ripgrep will not look in any predetermined directory for a config
file automatically. Instead, we need to set the RIPGREP_CONFIG_PATH
environment variable to the file path of our config file.
2023-05-09 16:19:07 +05:30
6fdaf3356f
fish: conf.d: Clean up unnecessary -g option for abbreviations 2023-05-06 13:11:03 +05:30
83c572019c
fish: conf.d: Add abbreviations for trash-cli and rmtrash 2023-05-06 13:09:37 +05:30
9363fc249b
fish: conf.d/setup: Set up all path related things at start 2023-05-05 10:54:38 +05:30
7779044f67
fish: conf.d/setup: Add rustup symlink path to PATH
See related
https://bugs.archlinux.org/task/78309?string=78309&project=5
aa625d449c
17eb57f5a8

We still need to keep this to use rust-analyzer via rustup. The other
option would be install the rust-analyzer package separately and not
use this via rustup.
2023-05-05 10:27:56 +05:30
dffb4856d1
fish: functions: Add an alias for global pnpm update 2023-04-27 17:39:59 +05:30
1369f826cb
fish: functions: Remove unused aliases 2023-04-27 16:51:19 +05:30
798cffa9f4
fish: functions: Add alias for detecting errors in media with ffmpeg 2023-04-27 16:51:19 +05:30
d9f9952ca1
fish: functions: Add aliases for meson
GStreamer now uses these meson commands instead of ninja. We need
these aliases with GStreamer frequently.
2023-04-27 16:51:19 +05:30
d1f66f1b13
fish: conf.d/setup: Drop fnm and switch to pnpm
Drop fnm and switch to pnpm for installing npm packages as well as
managing node versions.

Not using npm i -g has the added nicety of not having a node_modules
in /usr/lib.
2023-04-22 13:04:31 +05:30
e6c64c61ae
fish: functions/dotg: Do not add dot to output file name
If a file name was foo.dot the current implementation generated a
foo.dot.svg. Fix it to just output a foo.svg.

Also fix a bug, where we were not considering the provided dotpath.
2023-03-03 15:57:29 +05:30
2ab2c2255b
fish: functions: Make it easier to review code with difftool aliases
If no arguments are provided to the git difftool aliases, just invoke
it with the default `git difftool main...current-branch`. This is what
we will use most of the time anyway as this is exactly the command
needed when we want to review our own changes before pushing upstream
or reviewing some other merge request.
2023-02-25 18:00:07 +05:30
7b6cd2575c
fish: functions: Add an alias for checking weather 2023-02-25 18:00:07 +05:30
926937d075
fish: functions/gl: Enable graph view 2023-02-23 16:11:43 +05:30
e1be59cafa
fish: functions/dotg: Allow scrolling half a page up or down
Allow scrolling half a page up or down by binding keys to page up
or down actions.
2023-02-08 10:35:20 +05:30
080ba2c237
fish: functions: Drop nvim_profile
Since the recent TUI changes this does not work as intended.
2023-02-03 18:19:36 +05:30
210fc81fcd
fish: functions/glmd: Add an alias for formatting logs in markdown
Adapted from Heftig's (Jan Alexander Steffens) note on IRC

git config --global alias.mdlog 'log --reverse --pretty=format:"- **%s**  %w(0,2,2)%+b"'

This will format commits in a way that's nice for pasting into MR descriptions,
assuming the commit body is markdown.

Usually used like below

git mdlog @{u}.. | wl-copy
git mdlog origin/main.. | wl-copy
2023-01-30 12:26:05 +05:30
5abfc19676
Revert "fish: functions/gl: Pipe commit view to bat"
This reverts commit ec838cb54e.

We forgot that copying is not so easy when using bat or less.
2023-01-26 16:55:44 +05:30
ec838cb54e
fish: functions/gl: Pipe commit view to bat
The recent tui changes to neovim cause some display issue after exiting
from it.

We need to provide the --pager option to bat for not exiting immediately
if the output size is smaller than the vertical size of the terminal.
See the --pager documentation in man bat. We use less -R instead of the
default less -RF.
2023-01-17 19:41:12 +05:30
5ed30a7796
fish: functions/dotg: Sort the results on basis of time
Idea adapted from
https://stackoverflow.com/questions/45500978/vim-fzf-sort-initial-results-on-file-date
2023-01-16 12:31:30 +05:30
62a933e451
fish: functions: Drop vale alias 2023-01-15 15:52:42 +05:30
b31f41f8cb
fish: functions/gdt: Disable pager for default difftool
Now that we enable pager for difftool by default, we need to disable
it when using the default difftool which is neovim.
2023-01-14 18:58:51 +05:30
c190b10e31
fish: functions/gm: Automatically detect master or main and merge
git merge master/main is a frequent enough operation. Automatically
detect whether the primary branch is master or main and merge.
2023-01-12 18:39:37 +05:30
7e4193fc82
Revert "fish: functions: Open dot graphs by default in xdot"
This reverts commit a827d25ac4.

xdot has been giving us problem with GStreamer dot graphs. May be
it is a bug with GStreamer but let us just use vimiv henceforth.
2022-12-30 13:26:21 +05:30
7310c77f78
fish: functions: Check return result of fzf selection 2022-12-26 14:47:03 +05:30
3279c97814
fish: functions: gp/gt: Use exact flag for fzf when using pass 2022-12-25 13:26:48 +05:30
a6524a818a
fish: functions/gp: Add an alias for pass tessen 2022-12-17 14:58:32 +05:30
33151066a1 fish: conf.d/setup: Set environment variables for password store 2022-12-16 13:58:29 +05:30
b7838e980d fish: functions/gt: Add helper for getting TOTP tokens with pass 2022-12-16 13:58:29 +05:30
1766986d8e fish: conf.d/setup: Setup environment variables required by go 2022-12-11 16:55:41 +05:30
d06e32511f fish: functions: Add an alias to open bookmarks 2022-12-03 16:02:00 +05:30
28eccacade fish: setup: Set a needed environment variable for work 2022-11-30 17:20:46 +05:30
e958aa027f fish: functions: Add helper to list library dependencies 2022-11-07 16:26:23 +05:30
a827d25ac4 fish: functions: Open dot graphs by default in xdot 2022-11-05 18:37:19 +05:30
1e3eb7f7e0 fish: functions: Improve pipewire dot graph functions
xdot is more convenient to use and allows viewing dot file directly.
Generate svg only if requested.
2022-10-10 14:00:18 +05:30
7cb29dbd17 fish: functions: Add a helper to bring up or tear down VPN 2022-10-04 20:54:53 +05:30
68da927ad3 fish: conf.d: Drop setting of some environment variables
These have now been moved to environment.d and get set by systemd.

https://wiki.archlinux.org/title/Systemd/User#Environment_variables
2022-10-03 11:48:16 +05:30
cb12ad28ab fish: Add fish-systemctl
https://github.com/wawa19933/fish-systemd

We do not use any plugin manager so just add this manually.
2022-10-01 09:56:18 +05:30
edf40d4e04 fish: functions: Delete not much used systemd aliases 2022-10-01 09:56:18 +05:30
e2880791b3 fish: functions: Add an alias for vale 2022-09-28 17:07:26 +05:30
ca2d092166 Revert "fish/git: Manually set file type to git when calling nvim"
This reverts commit 2102b9983b.

Guess this got fixed in upstream commit 927d4d2.
2022-09-05 16:20:01 +05:30
ee776a86a1 fish: functions: Add an alias for sudoedit 2022-09-01 09:30:04 +05:30
eecc7b4021 fish: functions: Enable details in pipewire dot graphs 2022-08-19 16:59:19 +05:30
2102b9983b fish/git: Manually set file type to git when calling nvim
This reverts 7b84c0e again. Seems the issue is back with upstream.
2022-08-06 11:18:12 +05:30
16251e5d4c fish: conf.d/setup: Enable XDG support for ghcup 2022-08-03 20:31:41 +05:30
8aeabd9473 fish: functions: Add fzf versions of vgrep 2022-05-19 09:44:51 +05:30
68581433e3 fish: functions: Add aliases for ninja build
We need this frequently working with GStreamer.
2022-05-14 17:44:33 +05:30
8fd4ae0da9 fish: Drop all fzf + git related functions
vim-fugitive is all that is needed. We wrote these functions before
getting well versed with fugitive. These are not required anymore.
2022-05-06 12:04:35 +05:30
0afe1044c1 fish: functions/tsd: Add a helper to analyse GStreamer timestamps 2022-04-16 14:27:22 +05:30
800ec4ca64 fish: functions/gts: Add a helper to get column of interest from log files 2022-04-16 14:27:22 +05:30
c936941188 fish: functions/fish_prompt: Update prompt symbol for unknown upstream
Use unicode symbol for replacement character to indicate upstream is
unknown.
2022-04-15 19:17:28 +05:30
2af3965179 fish: functions/rmdot: Add a helper to delete all dot files 2022-04-14 17:38:14 +05:30
e6b71916e8 fish: functions/fish_prompt: Drop virtualfish
It increases the load time which is just annoying. Fuck Python
anyways.
2022-04-13 20:41:12 +05:30
478fede9e4 fish: Clean up with fish_indent 2022-04-12 18:27:01 +05:30
c06bee9cb3 fish: Add an alias to transcode mkv to mp4 2022-04-09 13:17:55 +05:30
30245370ca fish: Add helper aliases for ffprobe 2022-04-08 21:20:26 +05:30
8a7567a8b1 Start tmux sessions using systemd
While starting the tmux sessions from fish worked some environment
variables were not getting picked up in tmux session.

For example DISPLAY is set after we log in and the graphical sway
session starts but since tmux sessions were started before that it
would be absent from the tmux session. We may be wrong about the
exact order and reasoning for this but atleast that is the observed
behaviour.

Fix this by defining a sway session target and making the tmux session
service dependent on it.
2022-04-04 18:07:50 +05:30
55685b3084 fish: Make life easier by setting GST_DEBUG_DUMP_DOT_DIR globally 2022-04-03 09:30:00 +05:30
59e7473bf3 fish: Add alias for difftastic as a difftool 2022-03-31 19:38:09 +05:30
8d44f5ced6 fish: functions/gdbt: Spawning GDB with tmux panes
Adapted from https://github.com/cyrus-and/gdb-dashboard/issues/63.
2022-03-29 15:16:02 +05:30
77f28cf4ba fish: functions/rgc/rgf: Do not colourise ripgrep output
This allows us to drop having to run AnsiEsc.
2022-03-28 17:10:31 +05:30
ab2d063759 fish: setup: Disable colouring in log and debug output for GStreamer 2022-03-27 19:26:17 +05:30
8d216bc1e6 fish: setup: Drop TERM setting for kitty 2022-03-27 18:16:10 +05:30
81bf6122dc fish: functions: Use a new alias for verbose git status 2022-03-22 14:10:04 +05:30
5ed0951392 fish: Start tmux sessions on login 2022-03-17 09:14:06 +05:30
f99925d532 fish: functions/ta: Rename to ta & allow selection via fzf 2022-03-17 09:03:21 +05:30
a319c28964 fish: functions/fish_prompt: Add virtualfish 2022-03-15 00:12:05 +05:30
66cda3ef9b fish: functions: Rename vf to vfv 2022-03-15 00:12:05 +05:30
7b84c0eb20 Revert "fish/functions/gl: git: Manually set the file type to git when calling nvim"
This reverts commit a30eda8531.

Fixed upstream with https://github.com/neovim/neovim/pull/17517.
2022-02-26 11:04:30 +05:30
2776d00572 fish: functions/lt: Add an exa alias with tree option 2022-02-17 20:58:36 +05:30
6bbc55a2c2 fish: functions/l/ll: Drop the -h option
exa prints human readable sizes by default, so the -h option no longer
applies.
2022-02-17 20:52:14 +05:30
cd95166cfb fish: functions/hf: Add an alias for htop with filter 2022-02-01 16:31:17 +05:30
371794dfc7 fish: functions/topf: Add an alias for top 2022-02-01 11:56:15 +05:30
674e3fa3f6 fish: conf.d/setup: Set environment variables required by wayland 2022-01-28 20:52:47 +05:30
3600310085 fish: conf.d/setup: Set environment variable required by ssh-agent 2022-01-28 12:07:10 +05:30
a6b2242260 Revert "fish: conf.d/setup: Add QT environment variables for Wayland"
This reverts commit ca802a885f.

Not required anymore since it is fixed with previous commit 3cd3e1e.
2022-01-28 12:06:39 +05:30
ca802a885f fish: conf.d/setup: Add QT environment variables for Wayland
See https://wiki.archlinux.org/title/Wayland#Qt.

For some reason, even after setting this in systemd environment
variables, QT_QPA_PLATFORM does not get set.
2022-01-26 20:55:39 +05:30
0f2e1d3d1e fish: functions/b: Take number of levels to go back up the directory 2022-01-24 13:23:35 +05:30
aa6c176757 fish: functions: Add aliases for fetch & merge 2022-01-22 17:16:38 +05:30
873f3643aa fish: functions: Add alias to switch git repo between HTTPS and SSH
Taken from
https://github.com/whonore/dotfiles/blob/main/fish/functions/git_remote_toggle.fish
2022-01-15 17:42:51 +05:30
ef84036ec3 fish: conf/setup: Set XDG base directory environment variables 2022-01-12 17:39:10 +05:30
389845a79e fish: functions/rfc: Enable preview support
RFC files are text files, using anything other than less like bat will
not add much value.
2022-01-10 14:23:49 +05:30
e3d3e8b986 fish: functions: Add an alias to coqtop
Wrap coqtop in rlwrap and create an alias for that.
2022-01-07 20:39:57 +05:30
426cdd7ee8 fish: functions: Add an alias to easily get neovim start up time 2022-01-07 14:05:21 +05:30
a30eda8531 fish/functions/gl: git: Manually set the file type to git when calling nvim
See discussion in
https://github.com/neovim/neovim/issues/16940
2022-01-06 15:15:20 +05:30
307ae9eb7f fish: functions: gd: Allow passing arguments 2022-01-05 13:03:59 +05:30
22b9c09391 fish: functions: Add aliases for git difftool 2022-01-04 19:35:56 +05:30
95a247891e fish: conf/setup: Pass the shell syntax to use for fnm
From the twitter discussion with fnm author, shell inference seems to be
slow. Passing the shell to use manually seems to speed this up.

fnm env --log-level=quiet | source

Executed in  534.50 millis    fish           external
   usr time    0.62 millis  620.00 micros    0.00 millis
   sys time    4.76 millis    0.00 micros    4.76 millis

fnm env --shell=fish --log-level=quiet | source

Executed in    1.51 millis    fish           external
   usr time    1.06 millis    0.00 micros    1.06 millis
   sys time    0.58 millis  579.00 micros    0.00 millis

Also, see the github issue
https://github.com/Schniz/fnm/issues/621
2022-01-03 20:26:47 +05:30
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
dc00cca6ca fish: conf/fnm: Switch to required node version automatically 2021-12-28 19:24:45 +05:30
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
e661dded6c fish: functions: Add aliases for ls/exa and mkdir 2021-12-21 09:26:36 +05:30
64358a0170 fish: Add an alias to reload kitty configuration 2021-12-18 11:00:41 +05:30
5a6981e6f7 fish: functions: Use fzf git browse function for git log 2021-12-17 09:58:18 +05:30
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
f839a3bfff fish: Add the most commonly used git aliases 2021-12-14 15:44:33 +05:30
de0a69ee11 fish: Add an alias to ps_mem 2021-12-13 15:15:01 +05:30
47e8843882 fish: Drop use of nvr 2021-12-13 11:06:49 +05:30