2024-08-27 21:44:22 +00:00
|
|
|
{ lib, pkgs, ... }:
|
2024-08-25 15:02:35 +00:00
|
|
|
{
|
2023-11-05 09:21:37 +00:00
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
2024-08-27 21:44:22 +00:00
|
|
|
|
2023-11-05 09:21:37 +00:00
|
|
|
interactiveShellInit = ''
|
|
|
|
set fish_greeting
|
2024-09-16 05:07:58 +00:00
|
|
|
|
|
|
|
set fish_cursor_default block
|
|
|
|
set fish_cursor_insert line
|
|
|
|
set fish_cursor_replace_one underscore
|
|
|
|
set fish_cursor_replace underscore
|
|
|
|
set fish_cursor_external line
|
|
|
|
set fish_cursor_visual block
|
|
|
|
|
|
|
|
function fish_user_key_bindings
|
|
|
|
fish_default_key_bindings -M insert
|
|
|
|
fish_vi_key_bindings --no-erase insert
|
|
|
|
end
|
2023-11-05 09:21:37 +00:00
|
|
|
'';
|
2024-08-27 21:44:22 +00:00
|
|
|
|
2023-11-05 09:21:37 +00:00
|
|
|
plugins = [
|
|
|
|
{
|
|
|
|
name = "autopair";
|
2023-12-02 10:42:59 +00:00
|
|
|
inherit (pkgs.fishPlugins.autopair) src;
|
2023-11-05 09:21:37 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "done";
|
2023-12-02 10:42:59 +00:00
|
|
|
inherit (pkgs.fishPlugins.done) src;
|
2023-11-05 09:21:37 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "puffer";
|
2023-12-02 10:42:59 +00:00
|
|
|
inherit (pkgs.fishPlugins.puffer) src;
|
2023-11-05 09:21:37 +00:00
|
|
|
}
|
|
|
|
];
|
2024-08-27 21:44:22 +00:00
|
|
|
|
2024-09-15 17:21:00 +00:00
|
|
|
shellAbbrs = {
|
|
|
|
g = "git";
|
|
|
|
n = "nvim";
|
|
|
|
gi = "gitui";
|
|
|
|
sy = "systemctl";
|
|
|
|
};
|
|
|
|
|
2024-08-27 21:44:22 +00:00
|
|
|
functions =
|
|
|
|
let
|
|
|
|
jq = lib.getExe pkgs.jq;
|
|
|
|
nix = lib.getExe pkgs.nix;
|
|
|
|
curl = lib.getExe pkgs.curl;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
"pb" = ''
|
|
|
|
${jq} -Rns '{text: inputs}' | \
|
|
|
|
${curl} -s -H 'Content-Type: application/json' --data-binary @- https://pb.ny4.dev | \
|
|
|
|
${jq} -r '. | "https://pb.ny4.dev\(.path)"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
"getmnter" = ''
|
|
|
|
${nix} eval nixpkgs#{$argv}.meta.maintainers --json | \
|
|
|
|
${jq} '.[].github | "@" + .' -r
|
|
|
|
'';
|
|
|
|
};
|
2023-11-05 09:21:37 +00:00
|
|
|
};
|
|
|
|
}
|