{ config, inputs, pkgs, ... }:

{
    programs.starship = {
        enable = true;
        enableBashIntegration = true;
        enableZshIntegration = false;
        settings = {
            add_newline = false;
            format = "$nix_shell$username$hostname[](bg:#0F7FCF fg:prev_bg)$directory$git_branch$git_status[](fg:prev_bg) ";
            right_format = "";
            username = {
                show_always = true;
                style_user = "bg:#121213";
                style_root = "bg:#EA2C38";
                format = "[ $user]($style)";
                disabled = false;
            };

            hostname = {
                disabled = false;
                ssh_only = false;
                format = "[@$hostname ]($style)";
                style = "bg:#121213";
            };

            directory = {
                style = "bg:#0F7FCF fg:#080808";
                format = "[ $path ]($style)";
                truncation_length = 3;
                truncation_symbol = ".../";
            };

            git_branch = {
                symbol = "";
                style = "bg:#DFD460 fg:#080808";
                format = "[](fg:prev_bg bg:#DFD460)[ $symbol $branch ]($style)";
            };

            git_status = {
                style = "bg:#DFD460 fg:#080808";
                format = "[$all_status$ahead_behind ]($style)";
            };

            nix_shell = {
                symbol = "";
                style = "bg:#0F7FCF fg:#080808";
                format = "[ $symbol ]($style)[](fg:#0F7FCF bg:#121213)";
                disabled = false;
            };
        };
    };
    programs.bash = {
        enable = true;
        enableCompletion = true;
        historySize = 10000000;
        historyFile = "${config.xdg.dataHome}/bash/history";
        initExtra = ''
            bind 'set show-all-if-ambiguous on'
            bind 'set completion-ignore-case on'
            bind 'TAB:menu-complete'
            bind '"\e[A": history-search-backward'
            bind '"\e[B": history-search-forward'
        '';
        shellAliases = {
            ll = "ls -lhat";
            ls = "ls --color=auto";
            lf = ''cd "$(${pkgs.lf}/bin/lf -print-last-dir)"'';
            wget = ''wget --hsts-file = "$XDG_DATA_HOME/wget-hsts"'';
            python = "python3";
            vim = "nvim";
            v = ''nvim -c ':lua require("oil").open()' && cd "$(cat /tmp/oil_dir 2> /dev/null || pwd)"'';
            rg = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
            reset = "tput reset";
        };
    };
}