add: lf & test fish bind

This commit is contained in:
ooks-io 2023-11-27 22:54:31 +13:00
parent 2f20927f1b
commit b8183d1627
3 changed files with 24 additions and 0 deletions

View file

@ -1,6 +1,7 @@
{ pkgs, ... }: {
imports = [
./bat.nix
./lf.nix
./nvim.nix
./fzf.nix
./git.nix

View file

@ -7,6 +7,7 @@ let
hasKitty = config.programs.kitty.enable;
hasTre = hasPackage "tre-command";
hasBat = hasPackage "bat";
hasHelix = hasPackage "helix";
in
{
programs.fish = {
@ -29,6 +30,8 @@ in
hm = "home-manager --flake .";
hms = "home-manager --flake . switch";
fe = mkIf hasHelix "cd $FLAKE; hx $FLAKE";
tree = mkIf hasTre "tre";
ls = mkIf hasEza "eza --icons";
@ -40,6 +43,18 @@ in
};
functions = {
fish_greeting = "";
fish_flake_edit = ''
cd $FLAKE
hx $FLAKE
'';
fish_hello_world = ''
echo "Hello World"; string repeat -N \n --count=(math (count (fish_prompt)) - 1); commandline -f repaint
'';
fish_user_key_bindings = ''
bind --preset -M insert \co fish_hello_world
bind --preset -M insert \cf fish_flake_edit
'';
};
# kitty integration
interactiveShellInit =

View file

@ -0,0 +1,8 @@
{ pkgs, config, ... }:
{
programs.lf = {
enable = true;
};
}