From 3ee39ff0c97bc62259845bb44ab93409d82aa84f Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Thu, 10 Oct 2024 23:23:25 +0200 Subject: [PATCH] Added ble.sh --- blerc | 32 ++++++++++++++++++++++++++++++++ config/starship.toml | 13 ++++++++++--- update.sh | 13 +++++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 blerc diff --git a/blerc b/blerc new file mode 100644 index 0000000..29741e9 --- /dev/null +++ b/blerc @@ -0,0 +1,32 @@ +# Disable syntax highlighting +bleopt highlight_syntax= + +# Disable highlighting based on filenames +bleopt highlight_filename= + +# Disable highlighting based on variable types +bleopt highlight_variable= + +# highlighting for completions +ble-face -s auto_complete none +ble-face -s menu_desc_default none +ble-face -s menu_desc_type none +ble-face -s menu_desc_quote none +ble-face -s menu_filter_fixed bold +ble-face -s menu_filter_input none + +ble-face -s filename_directory underline,none +ble-face -s filename_directory_sticky underline,none +ble-face -s filename_link underline,none +ble-face -s filename_orphan underline,none +ble-face -s filename_executable underline,none +ble-face -s filename_setuid underline,none +ble-face -s filename_setgid underline,none +ble-face -s filename_other underline +ble-face -s filename_socket underline,none +ble-face -s filename_pipe underline,none +ble-face -s filename_character underline,none +ble-face -s filename_block underline,none +ble-face -s filename_warning underline,none +ble-face -s filename_url underline,none +ble-face -s filename_ls_colors underline diff --git a/config/starship.toml b/config/starship.toml index b6412b4..8c3cf9d 100644 --- a/config/starship.toml +++ b/config/starship.toml @@ -1,3 +1,10 @@ +add_newline = false +# A minimal left prompt +format = """$directory$character""" +# move the rest of the prompt to the right +right_format = """$all""" +command_timeout = 1000 + [character] success_symbol = "[>](bold green)" error_symbol = "[x](bold red)" @@ -13,6 +20,9 @@ diverged = "<>" renamed = "r" deleted = "x" +[git_branch] +format = '[$symbol$branch(:$remote_branch)]($style)' + [aws] symbol = "aws " @@ -70,9 +80,6 @@ symbol = "fossil " [gcloud] symbol = "gcp " -[git_branch] -symbol = "git " - [gleam] symbol = "gleam " diff --git a/update.sh b/update.sh index 3c39e71..640ca52 100755 --- a/update.sh +++ b/update.sh @@ -199,6 +199,14 @@ cd ~ curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo nala install -y nodejs +# Install ble.sh +printf -- '\033[33m Installing ble.sh\n\033[37m' +if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi +cd ~ +git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git +make -C ble.sh install PREFIX=~/.local +if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi + # Install platformio printf -- '\033[33m Installing platformio\n\033[37m' if [ $VER == "24.04" ]; then @@ -336,6 +344,10 @@ printf -- '\033[33m Symlinking rp2040 flash script\n\033[37m' mkdir -p ~/.local/bin ln -sf ~/code_server/pico-load.sh ~/.local/bin/pico-load +# Symlink blerc +printf -- '\033[33m Symlinking blerc\n\033[37m' +ln -sf ~/code_server/blerc ~/.blerc + # Symlink update script printf -- '\033[33m Symlinking update script\n\033[37m' mkdir -p ~/.local/bin @@ -359,6 +371,7 @@ echo 'alias ls="eza -1 -l --icons=auto -h -g -o --no-permissions -a"' >> ~/.bash echo 'alias lsg="eza -1 -l --icons=auto --git-repos --git -h -g -o --no-permissions -a"' >> ~/.bashrc echo 'alias lss="eza -1 -l --icons=auto -h -g --total-size -o --no-permissions -a"' >> ~/.bashrc echo 'source ~/.fzf.bash' >> ~/.bashrc +echo 'source ~/.local/share/blesh/ble.sh' >> ~/.bashrc echo 'eval "$(zoxide init bash)"' >> ~/.bashrc echo 'eval "$(starship init bash)"' >> ~/.bashrc