From 51104c5387e2cb763999c9d7b85dd77ba2aac96c Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Wed, 28 Feb 2024 20:52:51 -0800 Subject: [PATCH] shuffle around fish-config --- home.nix | 25 ------------------------- home/fish/config.fish | 18 ++++++++++++++++++ home/modules/fish.nix | 10 ++++++++++ 3 files changed, 28 insertions(+), 25 deletions(-) create mode 100644 home/fish/config.fish create mode 100644 home/modules/fish.nix diff --git a/home.nix b/home.nix index d3fa7ec..fed1ed8 100644 --- a/home.nix +++ b/home.nix @@ -49,31 +49,6 @@ MANPAGER = "nvim +Man!"; }; - programs.fish = { - enable = true; - interactiveShellInit = - builtins.readFile "${inputs.fish_theme}/fish_prompt.fish" + - '' - set -U fish_greeting - - if status is-interactive - # Commands to run in interactive sessions can go here - end - - function fish_user_key_bindings - # Execute this once per mode that emacs bindings should be used in - fish_default_key_bindings -M insert - - # Then execute the vi-bindings so they take precedence when there's a conflict. - # Without --no-erase fish_vi_key_bindings will default to - # resetting all bindings. - # The argument specifies the initial mode (insert, "default" or visual). - fish_vi_key_bindings --no-erase insert - - bind \cf 'fg 2>/dev/null; commandline -f repaint' - end - ''; - }; # wayland.windowManager.hyprland = { # enable = true; diff --git a/home/fish/config.fish b/home/fish/config.fish new file mode 100644 index 0000000..6d14a82 --- /dev/null +++ b/home/fish/config.fish @@ -0,0 +1,18 @@ +set -U fish_greeting + +if status is-interactive + # Commands to run in interactive sessions can go here +end + +function fish_user_key_bindings + # Execute this once per mode that emacs bindings should be used in + fish_default_key_bindings -M insert + + # Then execute the vi-bindings so they take precedence when there's a conflict. + # Without --no-erase fish_vi_key_bindings will default to + # resetting all bindings. + # The argument specifies the initial mode (insert, "default" or visual). + fish_vi_key_bindings --no-erase insert + + bind \cf 'fg 2>/dev/null; commandline -f repaint' +end diff --git a/home/modules/fish.nix b/home/modules/fish.nix new file mode 100644 index 0000000..35d148c --- /dev/null +++ b/home/modules/fish.nix @@ -0,0 +1,10 @@ +{ inputs, ... }: +{ + programs.fish = { + enable = true; + interactiveShellInit = + builtins.readFile "${inputs.fish_theme}/fish_prompt.fish" + "\n" + + builtins.readFile ./home/fish/config.fish + ; + }; +}