diff --git a/config/bash/bashrc b/config/bash/bashrc index 42deba2..70f7b66 100644 --- a/config/bash/bashrc +++ b/config/bash/bashrc @@ -10,23 +10,11 @@ HISTSIZE=2000 HISTFILESIZE=2000 HISTCONTROL=ignoreboth:erasedups -alias ls='eza' -alias l='ls --color=auto --group-directories-first' -alias ll='l -alF' -alias la='ll -R' -alias g='git' -alias nv='nvim' - export GPG_TTY=$(tty) export THEME="${THEME:-midnight}" export FZF_COMPLETION_TRIGGER=';' export FZF_TMUX=1 -eval "$(fzf --bash)" -eval "$(zoxide init bash)" -eval "$(direnv hook bash)" -eval "$(starship init bash)" - fzf-config-widget() { local file file="$(FZF_CTRL_T_COMMAND="fd --type file --hidden . \"$XDG_CONFIG_HOME\"/nix | sed \"s|$HOME|~|g\"" fzf --reverse)" || return diff --git a/config/bash/inputrc b/config/bash/inputrc index 0a75ab8..797a442 100644 --- a/config/bash/inputrc +++ b/config/bash/inputrc @@ -9,6 +9,7 @@ set show-all-if-ambiguous on $if mode=vi set keymap vi-command + "\C-l": clear-screen "\C-p": previous-history "\C-n": next-history "\C-j": backward-char @@ -16,6 +17,7 @@ $if mode=vi "\e[3~": delete-char set keymap vi-insert + "\C-l": clear-screen "\C-p": previous-history "\C-n": next-history "\C-j": backward-char diff --git a/home/modules/shell.nix b/home/modules/shell.nix index c701a0c..312ac67 100644 --- a/home/modules/shell.nix +++ b/home/modules/shell.nix @@ -192,20 +192,26 @@ in } ''; - programs.bash = lib.mkIf (!hostConfig.isNixOS) { + programs.bash = { enable = true; + shellAliases = { + ls = "eza"; + l = "ls --color=auto --group-directories-first"; + ll = "l -alF"; + la = "ll -R"; + g = "git"; + nv = "nvim"; + }; initExtra = '' - source "${pkgs.blesh}/share/blesh/ble.sh" --noattach export INPUTRC="$HOME/.config/nix/config/bash/inputrc" export THEME="''${THEME:-midnight}" [ -f "$HOME/.config/nix/config/bash/bashrc" ] && . "$HOME/.config/nix/config/bash/bashrc" - [[ ''${BLE_VERSION-} ]] && ble-attach ''; }; programs.starship = { enable = true; - enableBashIntegration = false; + enableBashIntegration = true; settings = { format = lib.concatStrings [ "$directory" @@ -217,15 +223,19 @@ in ]; add_newline = true; character = { - success_symbol = "[>](bold)"; + success_symbol = "[>](bold magenta)"; error_symbol = "[>](bold red)"; - vimcmd_symbol = "[<](bold)"; + vimcmd_symbol = "[<](bold magenta)"; }; directory = { + style = "bold blue"; truncation_length = 0; truncate_to_repo = false; }; - git_branch.format = "[$branch]($style) "; + git_branch = { + format = "[$branch]($style) "; + style = "242"; + }; git_status = { format = "([$all_status$ahead_behind]($style) )"; ahead = "^"; @@ -247,7 +257,7 @@ in programs.fzf = { enable = true; - enableBashIntegration = false; + enableBashIntegration = true; defaultCommand = "rg --files --hidden"; defaultOptions = [ "--bind=ctrl-a:select-all" @@ -263,18 +273,18 @@ in programs.eza = { enable = true; - enableBashIntegration = false; + enableBashIntegration = true; git = true; }; programs.zoxide = { enable = true; - enableBashIntegration = false; + enableBashIntegration = true; }; programs.direnv = { enable = true; - enableBashIntegration = false; + enableBashIntegration = true; nix-direnv.enable = true; config.global = { hide_env_diff = true; diff --git a/hosts/xps15/configuration.nix b/hosts/xps15/configuration.nix index 94af9f5..c123915 100644 --- a/hosts/xps15/configuration.nix +++ b/hosts/xps15/configuration.nix @@ -84,16 +84,7 @@ in shell = pkgs.bash; }; - programs.bash = { - enable = true; - shellInit = '' - export INPUTRC="$HOME/.config/nix/config/bash/inputrc" - export THEME="midnight" - ''; - interactiveShellInit = '' - [ -f "$HOME/.config/nix/config/bash/bashrc" ] && . "$HOME/.config/nix/config/bash/bashrc" - ''; -}; + programs.bash.enable = true; programs.hyprland = { enable = true; portalPackage = pkgs.xdg-desktop-portal-hyprland;