1
Fork 0

Started working on guest@euporie

This commit is contained in:
Matei Adriel 2023-05-28 02:00:10 +02:00
parent 0503a81ee8
commit 230a739327
No known key found for this signature in database
62 changed files with 188 additions and 135 deletions
home/features/cli/fish

View file

@ -0,0 +1,42 @@
# {{{ Start tmux if not already inside tmux
if status is-interactive
and not set -q TMUX
and not set -q NO_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
# }}}
# {{{ Keybinds
function fish_user_key_bindings
# {{{ Use vim-style keybinds
# 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>
# }}}
# {{{ C-x to clear screen
bind -M default \cx "clear && commandline -f repaint"
bind -M insert \cx "clear && commandline -f repaint"
# }}}
# {{{ C-enter to run command through less
bind -M default \e\[13\;2u "commandline -a ' | less' && commandline -f execute"
bind -M insert \e\[13\;2u "commandline -a ' | less' && commandline -f execute"
# }}}
# {{{ C-g to open neogit
bind -M default \cg "nvim +Neogit"
bind -M insert \cg "nvim +Neogit"
# }}}
end
# }}}

View file

@ -0,0 +1,33 @@
{ pkgs, ... }:
{
programs.fish = {
enable = true;
shellAbbrs = {
battery = "acpi";
};
shellAliases = {
cat = "bat";
df = "df -h";
du = "du -h";
duh = "du -hd 1"; # short for du here
};
# with pkgs.fishPlugins;
plugins = [
# 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;
};
}