Files
nixos-config/modules/user/shell/interactive.sh
T
kiskaadee ea6774eca1 refactor(config): externalize alacritty, starship, fastfetch, and interactive shell scripts
- Externalize Alacritty settings into `modules/user/config/alacritty/alacritty.toml` and load via `builtins.fromTOML`.
- Move Starship prompt configuration to `modules/user/config/starship.toml`.
- Migrate Fastfetch JSONC dashboard structure to `modules/user/config/fastfetch/config.jsonc` via `home.file`.
- Isolate Bash Readline word deletion keybindings and startup greeting logic into `modules/user/shell/interactive.sh`.

Rationale: Decouples large inline configuration blocks from Nix modules, improving readability and maintainability while keeping dotfiles clean and modular.
2026-09-08 13:30:58 -05:00

19 lines
660 B
Bash

# --- Word Deletion & Readline Keybindings ---
if [[ -n "$BASH_VERSION" ]] && [[ "$-" == *i* ]]; then
# Ctrl+W: Delete entire word under cursor (backward-word + kill-word)
bind '"\C-w": "\eb\ed"' 2>/dev/null
# Ctrl+Delete: Forward word delete (matches Alacritty \e[3;5~)
bind '"\e[3;5~": kill-word' 2>/dev/null
# Ctrl+Backspace / Alt+Backspace: Backward word delete (start to cursor)
bind '"\e\x7f": backward-kill-word' 2>/dev/null
bind '"\e\b": backward-kill-word' 2>/dev/null
fi
# --- Visual Entry ---
# Display system information dashboard upon opening interactive shells
if [[ $- == *i* ]]; then
fastfetch --logo none
fi