Disabled fish greeting
This commit is contained in:
parent
01c5fe433b
commit
0ffda6f90d
|
@ -1,5 +1,7 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
imports = [ ./exa.nix ./bat.nix ./ssh.nix ./fish.nix ./tmux ./git.nix ./starship.nix ./direnv.nix ];
|
imports = [ ./exa.nix ./bat.nix ./ssh.nix
|
||||||
|
./git.nix ./starship.nix ./direnv.nix
|
||||||
|
./fish ./tmux ];
|
||||||
|
|
||||||
# Enable bash
|
# Enable bash
|
||||||
programs.bash.enable = true;
|
programs.bash.enable = true;
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
shellAbbrs = {
|
|
||||||
cat = "bat";
|
|
||||||
};
|
|
||||||
|
|
||||||
shellAliases = {
|
|
||||||
# Print available battery
|
|
||||||
battery = "acpi";
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins = with pkgs.fishPlugins; [
|
|
||||||
# Jump to directories by typing "z <directory-name>"
|
|
||||||
{
|
|
||||||
name = "z";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "jethrokuan";
|
|
||||||
repo = "z";
|
|
||||||
rev = "85f863f20f24faf675827fb00f3a4e15c7838d76";
|
|
||||||
sha256 = "1kaa0k9d535jnvy8vnyxd869jgs0ky6yg55ac1mxcxm8n0rh2mgq";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
interactiveShellInit =
|
|
||||||
# Start tmux if not already inside tmux
|
|
||||||
''
|
|
||||||
if status is-interactive
|
|
||||||
and not set -q TMUX
|
|
||||||
exec tmux attach -t Welcome || tmux || echo "Something went wrong trying to start tmux"
|
|
||||||
end
|
|
||||||
'' +
|
|
||||||
# Sets cursor based on vim mode
|
|
||||||
''
|
|
||||||
set fish_cursor_default block # Set the normal and visual mode cursors to a block
|
|
||||||
set fish_cursor_insert line # Set the insert mode cursor to a line
|
|
||||||
set fish_cursor_replace_one underscore # Set the replace mode cursor to an underscore
|
|
||||||
|
|
||||||
# Force fish to skip some checks (I think?)
|
|
||||||
set fish_vi_force_cursor
|
|
||||||
'' +
|
|
||||||
# Use vim-style keybinds
|
|
||||||
''
|
|
||||||
function fish_user_key_bindings
|
|
||||||
# Use the vim keybinds
|
|
||||||
fish_vi_key_bindings
|
|
||||||
|
|
||||||
bind -e -M insert -k f10 # unbinds f10
|
|
||||||
bind -M insert -m default -k f10 'commandline -f repaint' # Exit insert mode with <f10>
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
27
home/adrielus/features/cli/fish/config.fish
Normal file
27
home/adrielus/features/cli/fish/config.fish
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# {{{ Start tmux if not already inside tmux
|
||||||
|
if status is-interactive
|
||||||
|
and not set -q TMUX
|
||||||
|
exec tmux attach -t Welcome || tmux || echo "Something went wrong trying to start tmux"
|
||||||
|
end
|
||||||
|
# }}}
|
||||||
|
# {{{ Sets cursor based on vim mode
|
||||||
|
set fish_cursor_default block # Set the normal and visual mode cursors to a block
|
||||||
|
set fish_cursor_insert line # Set the insert mode cursor to a line
|
||||||
|
set fish_cursor_replace_one underscore # Set the replace mode cursor to an underscore
|
||||||
|
|
||||||
|
# Force fish to skip some checks (I think?)
|
||||||
|
# TODO: research why this is here
|
||||||
|
set fish_vi_force_cursor
|
||||||
|
# }}}
|
||||||
|
# {{{ Disable greeting
|
||||||
|
set fish_greeting
|
||||||
|
# }}}
|
||||||
|
# {{{ Use vim-style keybinds
|
||||||
|
function fish_user_key_bindings
|
||||||
|
# Use the vim keybinds
|
||||||
|
fish_vi_key_bindings
|
||||||
|
|
||||||
|
bind -e -M insert -k f10 # unbinds f10
|
||||||
|
bind -M insert -m default -k f10 'commandline -f repaint' # Exit insert mode with <f10>
|
||||||
|
end
|
||||||
|
# }}}
|
26
home/adrielus/features/cli/fish/default.nix
Normal file
26
home/adrielus/features/cli/fish/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
shellAbbrs = {
|
||||||
|
battery = "acpi";
|
||||||
|
cat = "bat";
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins = with pkgs.fishPlugins; [
|
||||||
|
# Jump to directories by typing "z <directory-name>"
|
||||||
|
{
|
||||||
|
name = "z";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "jethrokuan";
|
||||||
|
repo = "z";
|
||||||
|
rev = "85f863f20f24faf675827fb00f3a4e15c7838d76";
|
||||||
|
sha256 = "1kaa0k9d535jnvy8vnyxd869jgs0ky6yg55ac1mxcxm8n0rh2mgq";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
interactiveShellInit = builtins.readFile ./config.fish;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue