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
|
if ! command -v starship &> /dev/null; then
|
||||||
echo "FYI, starship not found"
|
echo "FYI, starship not found"
|
||||||
else
|
else
|
||||||
|
export STARSHIP_ENABLE_RIGHT_PROMPT=true
|
||||||
|
export STARSHIP_ENABLE_BASH_CONTINUATION=true
|
||||||
eval "$(starship init bash)"
|
eval "$(starship init bash)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -142,6 +144,35 @@ launch_zellij_conditionally() {
|
|||||||
|
|
||||||
# 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
|
# Display a welcome message for interactive shells
|
||||||
if [ -t 1 ]; then
|
if [ -t 1 ]; then
|
||||||
dotf term
|
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
|
# Development utilities
|
||||||
delta # Better git diff
|
delta # Better git diff
|
||||||
difftastic # Structural diff tool
|
difftastic # Structural diff tool
|
||||||
mcfly # Better shell history
|
|
||||||
fzf # Fuzzy finder
|
fzf # Fuzzy finder
|
||||||
tokei # Code statistics
|
tokei # Code statistics
|
||||||
tealdeer # Modern tldr client
|
tealdeer # Modern tldr client
|
||||||
@ -66,6 +65,7 @@
|
|||||||
|
|
||||||
# Shell and terminal
|
# Shell and terminal
|
||||||
starship # Cross-shell prompt
|
starship # Cross-shell prompt
|
||||||
|
blesh # Bash ble.sh
|
||||||
zellij # Modern terminal multiplexer
|
zellij # Modern terminal multiplexer
|
||||||
screen # Terminal multiplexer
|
screen # Terminal multiplexer
|
||||||
|
|
||||||
|
@ -1,180 +1,170 @@
|
|||||||
"$schema" = 'https://starship.rs/config-schema.json'
|
[aws]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
format = """
|
[buf]
|
||||||
[](color_orange)\
|
symbol = " "
|
||||||
$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)'
|
|
||||||
|
|
||||||
[c]
|
[c]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
style = "bg:color_blue"
|
|
||||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
|
||||||
|
|
||||||
[rust]
|
[conda]
|
||||||
symbol = ""
|
symbol = " "
|
||||||
style = "bg:color_blue"
|
|
||||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
[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]
|
[golang]
|
||||||
symbol = ""
|
symbol = " "
|
||||||
style = "bg:color_blue"
|
|
||||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
|
||||||
|
|
||||||
[php]
|
[guix_shell]
|
||||||
symbol = ""
|
symbol = " "
|
||||||
style = "bg:color_blue"
|
|
||||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
[haskell]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[haxe]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[hg_branch]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
ssh_symbol = " "
|
||||||
|
|
||||||
[java]
|
[java]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
style = "bg:color_blue"
|
|
||||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
[julia]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
[kotlin]
|
[kotlin]
|
||||||
symbol = ""
|
symbol = " "
|
||||||
style = "bg:color_blue"
|
|
||||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
|
||||||
|
|
||||||
[haskell]
|
[lua]
|
||||||
symbol = ""
|
symbol = " "
|
||||||
style = "bg:color_blue"
|
|
||||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
[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]
|
[python]
|
||||||
symbol = ""
|
symbol = " "
|
||||||
style = "bg:color_blue"
|
|
||||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
|
||||||
|
|
||||||
[docker_context]
|
[rlang]
|
||||||
symbol = ""
|
symbol = " "
|
||||||
style = "bg:color_bg3"
|
|
||||||
format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)'
|
|
||||||
|
|
||||||
[conda]
|
[ruby]
|
||||||
style = "bg:color_bg3"
|
symbol = " "
|
||||||
format = '[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)'
|
|
||||||
|
|
||||||
[time]
|
[rust]
|
||||||
disabled = false
|
symbol = " "
|
||||||
time_format = "%R"
|
|
||||||
style = "bg:color_bg1"
|
|
||||||
format = '[[ $time ](fg:color_fg0 bg:color_bg1)]($style)'
|
|
||||||
|
|
||||||
[line_break]
|
[scala]
|
||||||
disabled = false
|
symbol = " "
|
||||||
|
|
||||||
[character]
|
[swift]
|
||||||
disabled = false
|
symbol = " "
|
||||||
success_symbol = '[](bold fg:color_green)'
|
|
||||||
error_symbol = '[](bold fg:color_red)'
|
[zig]
|
||||||
vimcmd_symbol = '[](bold fg:color_green)'
|
symbol = " "
|
||||||
vimcmd_replace_one_symbol = '[](bold fg:color_purple)'
|
|
||||||
vimcmd_replace_symbol = '[](bold fg:color_purple)'
|
[gradle]
|
||||||
vimcmd_visual_symbol = '[](bold fg:color_yellow)'
|
symbol = " "
|
Loading…
x
Reference in New Issue
Block a user