Compare commits

..

1 Commits

Author SHA1 Message Date
mkurz bd7834626d „.DS_Store“ löschen 2022-12-22 15:16:13 +01:00
4 changed files with 35 additions and 401 deletions
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -40,5 +40,5 @@ sudo dnf install curl git zsh -y
Installer script for ohmyzsh, starship theme and plugins (aliases) Installer script for ohmyzsh, starship theme and plugins (aliases)
``` ```
curl -s https://scm.i-blacknet.de/mkurz/starship-theme/raw/branch/main/install.sh | bash -s curl -s https://scm.i-blacknet.de/mkurz/starship-theme/raw/branch/master/install.sh | bash -s
``` ```
+6 -27
View File
@@ -1,47 +1,26 @@
#!/usr/bin/bash #!/usr/bin/bash
cd ~ cd ~
cp ~/.zshrc ~/.zshrc.bak
if [[ ! -f $(which starship 2>/dev/null) ]]; then
echo "Installing starship..."
sh -c "$(curl -fsSL https://starship.rs/install.sh)" ""
fi
# check if .config folder exists
if [ ! -d ~/.conig ]; then
mkdir ~/.config
fi
# check if oh my zsh installed # check if oh my zsh installed
if [ ! -d ~/.oh-my-zsh ]; then if [ ! -d "~/.oh-my-zsh" ]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
fi fi
# remove Powerlevel10k zshrc integration (works only with my installation otherwise)
if [ $(sed -n '/^# Enable Powerlevel10k instant prompt/=' ~/.zshrc) ]; then
sed -i '1,6d' ~/.zshrc
fi
if [ -n $(sed -n '/source ~\/.p10k.zsh/=' ~/.zshrc) ]; then
sed -i -e '/# To customize prompt, run `p10k configure` or edit ~\/.p10k.zsh./d' ~/.zshrc
sed -i -e '/^\[\[ \! -f ~\/.p10k.zsh .*/d' ~/.zshrc
sed -i -e 's/^ZSH_THEME="powerlevel10k\/powerlevel10k"/#ZSH_THEME="powerlevel10k\/powerlevel10k"/' ~/.zshrc
fi
# install starship theme & alias plugin # install starship theme & alias plugin
if [ ! -d ~/.oh-my-zsh/custom/plugins/rainbow-alias ]; then if [ ! -d "~/.oh-my-zsh/custom/plugins/rainbow-alias" ]; then
mkdir -p ~/.oh-my-zsh/custom/plugins/rainbow-alias/ 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 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 fi
curl -o ~/.config/starship.toml https://scm.i-blacknet.de/mkurz/starship-theme/raw/branch/main/starship.toml curl -o ~/.config/starship.toml https://scm.i-blacknet.de/mkurz/starship-theme/raw/branch/main/starship.toml
# install needfull plugins # install needfull plugins
if [ ! -d ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions ]; then 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 git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
fi fi
if [ ! -d ~/.oh-my-zsh/custom/plugins/zsh-history-substring-search ]; then 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 git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
fi fi
if [ ! -d ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting ]; then 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 git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
fi fi
@@ -59,7 +38,7 @@ if [ -z $(sed -n '/zsh-syntax-highlighting/=' ~/.zshrc) ]; then
sed -i -e 's/\(^plugins=([^)]*\)/\1 zsh-syntax-highlighting/' ~/.zshrc sed -i -e 's/\(^plugins=([^)]*\)/\1 zsh-syntax-highlighting/' ~/.zshrc
fi fi
echo -e '\neval "$(starship init zsh)"' >> ~/.zshrc echo "eval "\""$(starship init zsh)"\"" >> ~/.zshrc
echo "Change Shell to zsh when you want!" echo "Change Shell to zsh when you want!"
echo "chsh -s $(which zsh)" echo "chsh -s $(which zsh)"
+28 -373
View File
@@ -1,6 +1,6 @@
format = """ format = """
$os\ $env_var\
[](fg:white bg:black)\ [](fg:white)\
$username\ $username\
$hostname\ $hostname\
[](fg:black bg:#6D8DD1)\ [](fg:black bg:#6D8DD1)\
@@ -10,20 +10,11 @@ $git_branch\
$git_state\ $git_state\
$git_status\ $git_status\
$git_metrics\ $git_metrics\
[](fg:#47CB6B bg:#FCA17D)\ [](fg:#86BBD8 bg:#33658A)\
$c\
$dart\
$golang\
$java\
$nodejs\
$php\
$python\
$rust\
[](fg:#FCA17D bg:#33658A)\
$docker_context\ $docker_context\
[](fg:#33658A)\ [](fg:#33658A bg:black)\
$fill\ $fill\
[](fg:#33658A)\ [](fg:#33658A bg:black)\
$jobs\ $jobs\
[](fg:yellow bg:#33658A)\ [](fg:yellow bg:#33658A)\
$cmd_duration\ $cmd_duration\
@@ -31,13 +22,11 @@ $cmd_duration\
$memory_usage\ $memory_usage\
[](fg:white bg:#47CB6B)\ [](fg:white bg:#47CB6B)\
$time\ $time\
$battery\
[ ](fg:white)\ [ ](fg:white)\
$line_break\ $line_break\
$character""" $character"""
scan_timeout = 30 # Disable the blank line at the start of the prompt
command_timeout = 500
# add_newline = false # add_newline = false
[fill] [fill]
@@ -48,79 +37,45 @@ success_symbol = "[](purple)"
error_symbol = "[](red)" error_symbol = "[](red)"
vicmd_symbol = "[](green)" vicmd_symbol = "[](green)"
# You can also replace your username with a neat symbol like  to save some space
[username] [username]
show_always = true show_always = false
style_user = "fg:yellow bg:black" style_user = "fg:yellow bg:black"
style_root = "fg:#CE4B4E bg:black" style_root = "fg:#CE4B4E bg:black"
format = '[ $user ]($style)' format = '[ $user]($style)'
[hostname] [hostname]
ssh_only = true ssh_only = true
ssh_symbol = "" ssh_symbol = ""
format = "[@](fg:yellow bg:black)[$hostname](fg:yellow bg:black)[ $ssh_symbol ](fg:yellow bg:black)" format = "[@](fg:yellow bg:black)[$hostname](fg:yellow bg:black) [$ssh_symbol ](fg:yellow bg:black)"
trim_at = "." trim_at = ".companyname.com"
disabled = false disabled = false
[os] [env_var.STARSHIP_DISTRO]
format = '[ $symbol](fg:black bg:white)' format = '[ $env_value ](fg:black bg:white)'
variable = "STARSHIP_DISTRO"
disabled = false disabled = false
[os.symbols]
Alpine = " "
Amazon = " "
Android = " "
Arch = " "
CentOS = " "
Debian = " "
DragonFly = " "
Emscripten = " "
EndeavourOS = " "
Fedora = " "
FreeBSD = " "
Garuda = "﯑ "
Gentoo = " "
HardenedBSD = "ﲊ "
Illumos = " "
Linux = " "
Macos = " "
Manjaro = " "
Mariner = " "
MidnightBSD = " "
Mint = " "
NetBSD = " "
NixOS = " "
OpenBSD = " "
openSUSE = " "
OracleLinux = " "
Pop = " "
Raspbian = " "
Redhat = " "
RedHatEnterprise = " "
Redox = " "
Solus = "ﴱ "
SUSE = " "
Ubuntu = " "
Unknown = " "
Windows = " "
[directory] [directory]
style = "bg:#6D8DD1" style = "bg:#6D8DD1"
read_only = " " read_only = " "
format = "[ $path[$read_only](fg:yellow bg:#6D8DD1) ]($style)" format = "[ $path ]($style)"
truncation_length = 3 truncation_length = 3
truncation_symbol = "…/" truncation_symbol = "…/"
truncate_to_repo = false
# Here is how you can shorten some long paths by text replacement
# similar to mapped_locations in Oh My Posh:
[directory.substitutions] [directory.substitutions]
"Important Documents" = "󰈙󱈸 " "Documents" = " "
"Documents" = "󰈙 "
"Downloads" = " " "Downloads" = " "
"Music" = "󰝚 " "Music" = " "
"Pictures" = " " "Pictures" = " "
"Development" = "" "~" = " ~"
"Developer" = " " # Keep in mind that the order matters. For example:
"Dev" = " " # "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] [docker_context]
symbol = " " symbol = " "
@@ -141,13 +96,10 @@ behind = "⇣${count}"
[git_state] [git_state]
style = "fg:black bg:#47CB6B" style = "fg:black bg:#47CB6B"
format = '\([$state( $progress_current of $progress_total)]($style)\) ' format = '\([$state( $progress_current/$progress_total)]($style)\) '
#style = "bright-black" #style = "bright-black"
[git_metrics] [git_metrics]
added_style = "fg:black bg:#47CB6B"
deleted_style = "fg:white bold bg:#47CB6B"
format = '[ +$added |]($added_style)[ -$deleted ](fg:red bold bg:#47CB6B)'
disabled = false disabled = false
[cmd_duration] [cmd_duration]
@@ -170,302 +122,5 @@ format = "[ ${ram_pct} $symbol ]($style)"
[time] [time]
disabled = false disabled = false
time_format = "%R" # Hour:Minute Format time_format = "%R" # Hour:Minute Format
format = '[](fg:white)[ $time ](fg:black bg:white)' format = '[](fg:white)[ $time ](fg:black bg:white)'
[battery]
full_symbol = '󰁹 '
charging_symbol = '󱊥 '
discharging_symbol = '󱊣 '
unknown_symbol = '󱊢 '
empty_symbol = '󰂎 '
format = '[](fg:white)[ $symbol$percentage ]($style)'
[[battery.display]]
threshold = 10
style = 'bold red bg:black'
[[battery.display]]
threshold = 30
style = 'bold yellow bg:black'
[[battery.display]]
threshold = 50
style = 'bold purpel bg:black'
[[battery.display]]
threshold = 100
style = 'bold green bg:black'
[aws]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[buf]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[c]
symbol = " "
style = "fg:white bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[conda]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[kubernetes]
symbol = '☸ '
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[dart]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = ['dart']
detect_files = [
'pubspec.yaml',
'pubspec.yml',
'pubspec.lock',
]
detect_folders = ['.dart_tool']
[elixir]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[elm]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = ['elm']
detect_files = [
'elm.json',
'elm-package.json',
'.elm-version',
]
detect_folders = ['elm-stuff']
[golang]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = ['go']
detect_files = [
'go.mod',
'go.sum',
'glide.yaml',
'Gopkg.yml',
'Gopkg.lock',
'.go-version',
]
detect_folders = ['Godeps']
[guix_shell]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[haskell]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[haxe]
symbol = "⌘ "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[hg_branch]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[java]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = [
'java',
'class',
'jar',
'gradle',
'clj',
'cljc',
]
detect_files = [
'pom.xml',
'build.gradle.kts',
'build.sbt',
'.java-version',
'deps.edn',
'project.clj',
'build.boot',
]
detect_folders = []
[julia]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = ['jl']
detect_files = [
'Project.toml',
'Manifest.toml',
]
detect_folders = []
[lua]
symbol = "󰢱 "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = ['lua']
detect_files = ['.lua-version']
detect_folders = ['lua']
[meson]
symbol = "喝 "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[nim]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = [
'nim',
'nims',
'nimble',
]
detect_files = ['nim.cfg']
detect_folders = []
[nix_shell]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[nodejs]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = [
'js',
'mjs',
'cjs',
'ts',
]
detect_files = [
'package.json',
'.node-version',
'.nvmrc',
]
detect_folders = ['node_modules']
[package]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[perl]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
disabled = true
detect_extensions = [
'pl',
'pm',
'pod',
]
detect_files = [
'Makefile.PL',
'Build.PL',
'cpanfile',
'cpanfile.snapshot',
'META.json',
'META.yml',
'.perl-version',
]
detect_folders = []
[php]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = ['php']
detect_files = [
'composer.json',
'.php-version',
]
detect_folders = []
[python]
symbol = " "
style = "fg:black bg:#FCA17D"
pyenv_prefix = 'pyenv '
python_binary = [
'python',
'python3',
'python2',
]
format = '[ ${symbol} ${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
version_format = 'v${raw}'
detect_extensions = ['py']
detect_files = [
'requirements.txt',
'.python-version',
'pyproject.toml',
'Pipfile',
'tox.ini',
'setup.py',
'__init__.py',
]
detect_folders = []
[rlang]
symbol = "ﳒ "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
[ruby]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = ['rb']
detect_files = [
'Gemfile',
'.ruby-version',
]
detect_folders = []
[rust]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = ['rs']
detect_files = ['Cargo.toml']
detect_folders = []
[scala]
symbol = " "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'
detect_extensions = [
'sbt',
'scala',
]
detect_files = [
'.scalaenv',
'.sbtenv',
'build.sbt',
]
detect_folders = ['.metals']
[spack]
symbol = "🅢 "
style = "fg:black bg:#FCA17D"
format = '[ $symbol ($version) ]($style)'