2021-10-29 17:31:16 +00:00
|
|
|
|
{ config, pkgs, ... }:
|
2021-09-29 23:00:14 +00:00
|
|
|
|
|
|
|
|
|
{
|
2021-12-08 22:13:43 +00:00
|
|
|
|
imports = [
|
|
|
|
|
./tide/nix-shell.nix
|
|
|
|
|
];
|
2021-09-29 23:00:14 +00:00
|
|
|
|
|
2022-06-07 21:27:18 +00:00
|
|
|
|
home.packages = [ pkgs.timg ];
|
|
|
|
|
|
2021-12-08 22:13:43 +00:00
|
|
|
|
programs.fish = {
|
|
|
|
|
enable = true;
|
|
|
|
|
package = pkgs.unstable.fish;
|
|
|
|
|
functions = { };
|
2021-09-29 23:00:14 +00:00
|
|
|
|
|
2021-12-08 22:13:43 +00:00
|
|
|
|
tide = {
|
|
|
|
|
nix-shell.enable = true;
|
|
|
|
|
};
|
2021-09-29 23:00:14 +00:00
|
|
|
|
|
2021-12-08 22:13:43 +00:00
|
|
|
|
shellAliases = {
|
|
|
|
|
cat = "bat --theme=GitHub ";
|
|
|
|
|
l = "exa -l --color=always ";
|
2021-09-29 23:00:14 +00:00
|
|
|
|
|
2021-12-08 22:13:43 +00:00
|
|
|
|
# My own commands for easy access
|
|
|
|
|
thisterm = "cd ~/Projects/uw/$CURRENT_TERM";
|
|
|
|
|
today = "date +%F";
|
|
|
|
|
};
|
2021-09-29 23:00:14 +00:00
|
|
|
|
|
2021-12-08 22:13:43 +00:00
|
|
|
|
shellInit = ''
|
|
|
|
|
# Source brew integration
|
|
|
|
|
if test -e /opt/homebrew/bin/brew
|
|
|
|
|
/opt/homebrew/bin/brew shellenv | source
|
|
|
|
|
end
|
|
|
|
|
'';
|
2021-10-09 02:52:28 +00:00
|
|
|
|
|
2021-12-08 22:13:43 +00:00
|
|
|
|
interactiveShellInit = ''
|
2022-05-30 20:33:24 +00:00
|
|
|
|
function fish_greeting
|
2022-06-07 21:27:18 +00:00
|
|
|
|
${pkgs.timg}/bin/timg ${./arona.jpg}
|
|
|
|
|
printf (env LANG=ja_JP.UTF-8 date +"ご主人様、お帰りなさい!\n今日は%A、%Y年%m月%d日ですねー!今の時間って、%H時%M分です〜 \n言って言ってご主人様、コンピュターちゃんと何がするつもりでしょーか?〜エヘヘっ\n")
|
2022-05-30 20:33:24 +00:00
|
|
|
|
end
|
2021-09-29 23:00:14 +00:00
|
|
|
|
|
2021-12-08 22:13:43 +00:00
|
|
|
|
# Set up an editor alias
|
|
|
|
|
if test -n "$EDITOR"
|
|
|
|
|
alias e="$EDITOR"
|
|
|
|
|
else
|
|
|
|
|
alias e="kak"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Source iTerm2 integration
|
2022-06-10 17:41:53 +00:00
|
|
|
|
if test -e ~/.iterm2_shell_integration.fish; and test $__CFBundleIdentifier = "com.googlecode.iterm2"
|
|
|
|
|
source ~/.iterm2_shell_integration.fish
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Source Kitty integration
|
|
|
|
|
if set -q KITTY_INSTALLATION_DIR
|
|
|
|
|
set --global KITTY_SHELL_INTEGRATION enabled
|
|
|
|
|
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
|
|
|
|
|
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
|
2022-07-14 23:26:09 +00:00
|
|
|
|
|
|
|
|
|
# Add fish to PATH if installed as a MacOS App
|
|
|
|
|
test -e $KITTY_INSTALLATION_DIR/../../MacOS && set -x PATH $PATH "$KITTY_INSTALLATION_DIR/../../MacOS"
|
2022-06-10 17:41:53 +00:00
|
|
|
|
end
|
2021-12-08 22:13:43 +00:00
|
|
|
|
|
|
|
|
|
# Enable vi keybindings
|
|
|
|
|
fish_vi_key_bindings
|
|
|
|
|
## Set some kak-focused keybindings
|
|
|
|
|
bind -M default gi beginning-of-line
|
|
|
|
|
bind -M default gl end-of-line
|
2022-04-25 20:57:23 +00:00
|
|
|
|
|
|
|
|
|
# Set up direnv
|
|
|
|
|
${pkgs.direnv}/bin/direnv hook fish | source
|
2021-12-08 22:13:43 +00:00
|
|
|
|
'';
|
|
|
|
|
plugins = [
|
|
|
|
|
{
|
|
|
|
|
name = "tide";
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
|
owner = "IlanCosman";
|
|
|
|
|
repo = "tide";
|
|
|
|
|
rev = "3787c725f7f6a0253f59a2c0e9fde03202689c6c";
|
|
|
|
|
sha256 = "00zsib1q21bgxffjlyxf5rgcyq3h1ixwznwvid9k6mkkmwixv9lj";
|
2021-09-29 23:08:16 +00:00
|
|
|
|
};
|
2021-12-08 22:13:43 +00:00
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = "fzf";
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
|
owner = "jethrokuan";
|
|
|
|
|
repo = "fzf";
|
|
|
|
|
rev = "479fa67d7439b23095e01b64987ae79a91a4e283";
|
|
|
|
|
sha256 = "0k6l21j192hrhy95092dm8029p52aakvzis7jiw48wnbckyidi6v";
|
2021-09-29 23:00:14 +00:00
|
|
|
|
};
|
2021-12-08 22:13:43 +00:00
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Source files
|
|
|
|
|
home.file = {
|
|
|
|
|
"fish/change_cmd.fish" = {
|
|
|
|
|
source = ./. + "/change_cmd.fish";
|
|
|
|
|
target = ".config/fish/conf.d/change_cmd.fish";
|
|
|
|
|
};
|
|
|
|
|
"fish/pls.fish" = {
|
|
|
|
|
source = ./. + "/pls.fish";
|
|
|
|
|
target = ".config/fish/conf.d/pls.fish";
|
2021-09-29 23:00:14 +00:00
|
|
|
|
};
|
2021-12-08 22:13:43 +00:00
|
|
|
|
};
|
2021-09-29 23:00:14 +00:00
|
|
|
|
}
|