declutter the console, adds fzf and simpler theme for starship
This commit is contained in:
parent
26b1a61b2c
commit
93e4f8462e
31
.bashrc
31
.bashrc
@ -103,6 +103,8 @@ fi
|
||||
if ! command -v starship &> /dev/null; then
|
||||
echo "FYI, starship not found"
|
||||
else
|
||||
export STARSHIP_ENABLE_RIGHT_PROMPT=true
|
||||
export STARSHIP_ENABLE_BASH_CONTINUATION=true
|
||||
eval "$(starship init bash)"
|
||||
fi
|
||||
|
||||
@ -142,6 +144,35 @@ launch_zellij_conditionally() {
|
||||
|
||||
# launch_zellij_conditionally
|
||||
|
||||
# Source ble.sh if it exists
|
||||
if [[ -f "${HOME}/.nix-profile/share/blesh/ble.sh" ]]; then
|
||||
source "${HOME}/.nix-profile/share/blesh/ble.sh"
|
||||
|
||||
bleopt prompt_ps1_final='$(starship module character)'
|
||||
|
||||
# Basic ble.sh settings
|
||||
bleopt complete_menu_complete=1
|
||||
bleopt complete_auto_complete=1
|
||||
|
||||
# Custom function for fzf history search
|
||||
function fzf_history_search() {
|
||||
local selected
|
||||
selected=$(history | fzf --tac --height=40% --layout=reverse --border --info=inline \
|
||||
--query="$READLINE_LINE" \
|
||||
--color 'fg:#ebdbb2,bg:#282828,hl:#fabd2f,fg+:#ebdbb2,bg+:#3c3836,hl+:#fabd2f' \
|
||||
--color 'info:#83a598,prompt:#bdae93,spinner:#fabd2f,pointer:#83a598,marker:#fe8019,header:#665c54' \
|
||||
| sed 's/^ *[0-9]* *//')
|
||||
if [[ -n "$selected" ]]; then
|
||||
READLINE_LINE="$selected"
|
||||
READLINE_POINT=${#selected}
|
||||
fi
|
||||
ble-redraw-prompt
|
||||
}
|
||||
|
||||
# Bind Ctrl+R to our custom function
|
||||
bind -x '"\C-r": fzf_history_search'
|
||||
fi
|
||||
|
||||
# Display a welcome message for interactive shells
|
||||
if [ -t 1 ]; then
|
||||
dotf term
|
||||
|
21
config/home-manager/packages/common/bash.nix
Normal file
21
config/home-manager/packages/common/bash.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
defaultCommand = "fd --type f";
|
||||
defaultOptions = [
|
||||
"--height 40%"
|
||||
"--layout=reverse"
|
||||
"--border"
|
||||
"--inline-info"
|
||||
"--color 'fg:#ebdbb2,bg:#282828,hl:#fabd2f,fg+:#ebdbb2,bg+:#3c3836,hl+:#fabd2f'"
|
||||
"--color 'info:#83a598,prompt:#bdae93,spinner:#fabd2f,pointer:#83a598,marker:#fe8019,header:#665c54'"
|
||||
];
|
||||
};
|
||||
}
|
@ -58,7 +58,6 @@
|
||||
# Development utilities
|
||||
delta # Better git diff
|
||||
difftastic # Structural diff tool
|
||||
mcfly # Better shell history
|
||||
fzf # Fuzzy finder
|
||||
tokei # Code statistics
|
||||
tealdeer # Modern tldr client
|
||||
@ -66,6 +65,7 @@
|
||||
|
||||
# Shell and terminal
|
||||
starship # Cross-shell prompt
|
||||
blesh # Bash ble.sh
|
||||
zellij # Modern terminal multiplexer
|
||||
screen # Terminal multiplexer
|
||||
|
||||
|
@ -1,180 +1,170 @@
|
||||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
format = """
|
||||
[](color_orange)\
|
||||
$os\
|
||||
$username\
|
||||
[](bg:color_yellow fg:color_orange)\
|
||||
$directory\
|
||||
[](fg:color_yellow bg:color_bg3)\
|
||||
$docker_context\
|
||||
$conda\
|
||||
[](fg:color_bg3 bg:color_bg1)\
|
||||
[ ](fg:color_bg1)\
|
||||
"""
|
||||
|
||||
right_format = """
|
||||
[](color_aqua)\
|
||||
$git_branch\
|
||||
$git_status\
|
||||
[](fg:color_blue bg:color_aqua)\
|
||||
$c\
|
||||
$rust\
|
||||
$golang\
|
||||
$nodejs\
|
||||
$php\
|
||||
$java\
|
||||
$kotlin\
|
||||
$haskell\
|
||||
$python\
|
||||
[](fg:color_blue bg:color_bg1)\
|
||||
$time\
|
||||
[ ](fg:color_bg1)\
|
||||
"""
|
||||
|
||||
palette = 'gruvbox_dark'
|
||||
|
||||
[palettes.gruvbox_dark]
|
||||
color_fg0 = '#fbf1c7'
|
||||
color_bg1 = '#3c3836'
|
||||
color_bg3 = '#665c54'
|
||||
color_blue = '#458588'
|
||||
color_aqua = '#689d6a'
|
||||
color_green = '#98971a'
|
||||
color_orange = '#d65d0e'
|
||||
color_purple = '#b16286'
|
||||
color_red = '#cc241d'
|
||||
color_yellow = '#d79921'
|
||||
|
||||
[os]
|
||||
disabled = false
|
||||
style = "bg:color_orange fg:color_fg0"
|
||||
|
||||
[os.symbols]
|
||||
Windows = ""
|
||||
Ubuntu = ""
|
||||
SUSE = ""
|
||||
Raspbian = ""
|
||||
Mint = ""
|
||||
Macos = ""
|
||||
Manjaro = ""
|
||||
Linux = ""
|
||||
Gentoo = ""
|
||||
Fedora = ""
|
||||
Alpine = ""
|
||||
Amazon = ""
|
||||
Android = ""
|
||||
Arch = ""
|
||||
Artix = ""
|
||||
EndeavourOS = ""
|
||||
CentOS = ""
|
||||
Debian = ""
|
||||
Redhat = ""
|
||||
RedHatEnterprise = ""
|
||||
|
||||
[username]
|
||||
show_always = true
|
||||
style_user = "bg:color_orange fg:color_fg0"
|
||||
style_root = "bg:color_orange fg:color_fg0"
|
||||
format = '[ $user ]($style)'
|
||||
|
||||
[directory]
|
||||
style = "fg:color_fg0 bg:color_yellow"
|
||||
format = "[ $path ]($style)"
|
||||
truncation_length = 3
|
||||
truncation_symbol = "…/"
|
||||
|
||||
[directory.substitutions]
|
||||
"Documents" = " "
|
||||
"Downloads" = " "
|
||||
"Music" = " "
|
||||
"Pictures" = " "
|
||||
"Developer" = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = ""
|
||||
style = "bg:color_aqua"
|
||||
format = '[[ $symbol $branch ](fg:color_fg0 bg:color_aqua)]($style)'
|
||||
|
||||
[git_status]
|
||||
conflicted = ' 🏳'
|
||||
ahead = ' 🏎💨'
|
||||
untracked = ' [?\($count\)](fg:color_red bg:color_aqua)'
|
||||
modified = ' [M\($count\)](fg:color_yellow bg:color_aqua)'
|
||||
staged = ' [S\($count\)](fg:color_green bg:color_aqua)'
|
||||
renamed = ' [->\($count\)](fg:color_blue bg:color_aqua)'
|
||||
deleted = ' [D$count](fg:red)'
|
||||
style = "bg:color_aqua"
|
||||
format = '[[($ahead_behind$untracked$modified$staged)](fg:color_fg0 bg:color_aqua)]($style)'
|
||||
|
||||
[nodejs]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
[buf]
|
||||
symbol = " "
|
||||
|
||||
[c]
|
||||
symbol = " "
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[rust]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[crystal]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
[directory]
|
||||
read_only = " "
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[fennel]
|
||||
symbol = " "
|
||||
|
||||
[fossil_branch]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = ' '
|
||||
|
||||
[golang]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
[guix_shell]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[haxe]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[hostname]
|
||||
ssh_symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[kotlin]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
[lua]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[meson]
|
||||
symbol = " "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[ocaml]
|
||||
symbol = " "
|
||||
|
||||
[os.symbols]
|
||||
Alpaquita = " "
|
||||
Alpine = " "
|
||||
AlmaLinux = " "
|
||||
Amazon = " "
|
||||
Android = " "
|
||||
Arch = " "
|
||||
Artix = " "
|
||||
CentOS = " "
|
||||
Debian = " "
|
||||
DragonFly = " "
|
||||
Emscripten = " "
|
||||
EndeavourOS = " "
|
||||
Fedora = " "
|
||||
FreeBSD = " "
|
||||
Garuda = " "
|
||||
Gentoo = " "
|
||||
HardenedBSD = " "
|
||||
Illumos = " "
|
||||
Kali = " "
|
||||
Linux = " "
|
||||
Mabox = " "
|
||||
Macos = " "
|
||||
Manjaro = " "
|
||||
Mariner = " "
|
||||
MidnightBSD = " "
|
||||
Mint = " "
|
||||
NetBSD = " "
|
||||
NixOS = " "
|
||||
OpenBSD = " "
|
||||
openSUSE = " "
|
||||
OracleLinux = " "
|
||||
Pop = " "
|
||||
Raspbian = " "
|
||||
Redhat = " "
|
||||
RedHatEnterprise = " "
|
||||
RockyLinux = " "
|
||||
Redox = " "
|
||||
Solus = " "
|
||||
SUSE = " "
|
||||
Ubuntu = " "
|
||||
Unknown = " "
|
||||
Void = " "
|
||||
Windows = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[perl]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[pijul_channel]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
symbol = " "
|
||||
|
||||
[docker_context]
|
||||
symbol = ""
|
||||
style = "bg:color_bg3"
|
||||
format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)'
|
||||
[rlang]
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
style = "bg:color_bg3"
|
||||
format = '[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)'
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
time_format = "%R"
|
||||
style = "bg:color_bg1"
|
||||
format = '[[ $time ](fg:color_fg0 bg:color_bg1)]($style)'
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[line_break]
|
||||
disabled = false
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[character]
|
||||
disabled = false
|
||||
success_symbol = '[](bold fg:color_green)'
|
||||
error_symbol = '[](bold fg:color_red)'
|
||||
vimcmd_symbol = '[](bold fg:color_green)'
|
||||
vimcmd_replace_one_symbol = '[](bold fg:color_purple)'
|
||||
vimcmd_replace_symbol = '[](bold fg:color_purple)'
|
||||
vimcmd_visual_symbol = '[](bold fg:color_yellow)'
|
||||
[swift]
|
||||
symbol = " "
|
||||
|
||||
[zig]
|
||||
symbol = " "
|
||||
|
||||
[gradle]
|
||||
symbol = " "
|
Loading…
x
Reference in New Issue
Block a user