Initial Release

This commit is contained in:
BlackNet Dev
2022-12-22 15:12:46 +01:00
commit 65590f5427
4 changed files with 214 additions and 0 deletions
Vendored
BIN
View File
Binary file not shown.
+44
View File
@@ -0,0 +1,44 @@
# starship zsh-Theme
**How to Install**
You will need following packages and the starship binary as self, go to the website and install it.
```
https://starship.rs/de-de/
```
You also need a NerdFont for the symbols.
```
https://www.nerdfonts.com/font-downloads
```
Install the required packages for your distribution
```
curl git zsh
```
**ArchLinux / Manjaro**
```
sudo pacman -S zsh curl git zsh --noconfirm
```
**Debian / Ubuntu**
```
sudo apt install curl git zsh -y
```
**Fedora / Red Hat / CentOS**
```
sudo dnf install curl git zsh -y
```
Installer script for ohmyzsh, starship theme and plugins (aliases)
```
curl -s https://scm.i-blacknet.de/mkurz/starship-theme/raw/branch/master/install.sh | bash -s
```
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/bash
cd ~
# check if oh my zsh installed
if [ ! -d "~/.oh-my-zsh" ]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
fi
# install starship theme & alias plugin
if [ ! -d "~/.oh-my-zsh/custom/plugins/rainbow-alias" ]; then
mkdir -p ~/.oh-my-zsh/custom/plugins/rainbow-alias/
curl -o ~/.oh-my-zsh/custom/plugins/rainbow-alias/rainbow-alias.plugin.zsh https://scm.i-blacknet.de/mkurz/rainbow-zsh-theme/raw/branch/master/rainbow-alias.plugin.zsh
fi
curl -o ~/.config/starship.toml https://scm.i-blacknet.de/mkurz/starship-theme/raw/branch/main/starship.toml
# install needfull plugins
if [ ! -d "~/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
fi
if [ ! -d "~/.oh-my-zsh/custom/plugins/zsh-history-substring-search" ]; then
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
fi
if [ ! -d "~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
fi
# add neefull plugins
if [ -z $(sed -n '/rainbow-alias/=' ~/.zshrc) ]; then
sed -i -e 's/\(^plugins=([^)]*\)/\1 rainbow-alias/' ~/.zshrc
fi
if [ -z $(sed -n '/zsh-autosuggestions/=' ~/.zshrc) ]; then
sed -i -e 's/\(^plugins=([^)]*\)/\1 zsh-autosuggestions/' ~/.zshrc
fi
if [ -z $(sed -n '/zsh-history-substring-search/=' ~/.zshrc) ]; then
sed -i -e 's/\(^plugins=([^)]*\)/\1 zsh-history-substring-search/' ~/.zshrc
fi
if [ -z $(sed -n '/zsh-syntax-highlighting/=' ~/.zshrc) ]; then
sed -i -e 's/\(^plugins=([^)]*\)/\1 zsh-syntax-highlighting/' ~/.zshrc
fi
echo "eval "\""$(starship init zsh)"\"" >> ~/.zshrc
echo "Change Shell to zsh when you want!"
echo "chsh -s $(which zsh)"
+126
View File
@@ -0,0 +1,126 @@
format = """
$env_var\
[](fg:white)\
$username\
$hostname\
[](fg:black bg:#6D8DD1)\
$directory\
[](fg:#6D8DD1 bg:#47CB6B)\
$git_branch\
$git_state\
$git_status\
$git_metrics\
[](fg:#86BBD8 bg:#33658A)\
$docker_context\
[](fg:#33658A bg:black)\
$fill\
[](fg:#33658A bg:black)\
$jobs\
[](fg:yellow bg:#33658A)\
$cmd_duration\
[](fg:#47CB6B bg:yellow)\
$memory_usage\
[](fg:white bg:#47CB6B)\
$time\
[ ](fg:white)\
$line_break\
$character"""
# Disable the blank line at the start of the prompt
# add_newline = false
[fill]
symbol = " "
[character]
success_symbol = "[](purple)"
error_symbol = "[](red)"
vicmd_symbol = "[](green)"
# You can also replace your username with a neat symbol like  to save some space
[username]
show_always = false
style_user = "fg:yellow bg:black"
style_root = "fg:#CE4B4E bg:black"
format = '[ $user]($style)'
[hostname]
ssh_only = true
ssh_symbol = ""
format = "[@](fg:yellow bg:black)[$hostname](fg:yellow bg:black) [$ssh_symbol ](fg:yellow bg:black)"
trim_at = ".companyname.com"
disabled = false
[env_var.STARSHIP_DISTRO]
format = '[ $env_value ](fg:black bg:white)'
variable = "STARSHIP_DISTRO"
disabled = false
[directory]
style = "bg:#6D8DD1"
read_only = " "
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
# Here is how you can shorten some long paths by text replacement
# similar to mapped_locations in Oh My Posh:
[directory.substitutions]
"Documents" = " "
"Downloads" = " "
"Music" = " "
"Pictures" = " "
"~" = " ~"
# Keep in mind that the order matters. For example:
# "Important Documents" = "  "
# will not be replaced, because "Documents" was already substituted before.
# So either put "Important Documents" before "Documents" or use the substituted version:
# "Important  " = "  "
[docker_context]
symbol = " "
style = "bg:#06969A"
format = '[ $symbol $context ]($style) $path'
[git_branch]
symbol = ""
style = "fg:black bg:#47CB6B"
format = '[ $symbol $branch ]($style)'
[git_status]
style = "fg:black bg:#47CB6B"
format = '[$all_status$ahead_behind]($style)'
ahead = "⇡${count}"
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
behind = "⇣${count}"
[git_state]
style = "fg:black bg:#47CB6B"
format = '\([$state( $progress_current/$progress_total)]($style)\) '
#style = "bright-black"
[git_metrics]
disabled = false
[cmd_duration]
format = "[ took $duration  ](fg:black bg:yellow)"
style = "gb:yellow"
[jobs]
symbol = ""
number_threshold = 1
format = "[ $symbol ](fg:bold red bg:#33658A)"
style = "bg:33658A"
[memory_usage]
disabled = false
threshold = -1
symbol = ""
style = "fg:black bg:#47CB6B"
format = "[ ${ram_pct} $symbol ]($style)"
[time]
disabled = false
time_format = "%R" # Hour:Minute Format
format = '[](fg:white)[ $time  ](fg:black bg:white)'