From 625f1ed5b661e8a2810a2449c33dcdd971b1edfa Mon Sep 17 00:00:00 2001 From: Bartek Stalewski Date: Sun, 9 Aug 2020 23:44:31 +0200 Subject: [PATCH] switch to starship --- conf/fdignore | 1 - conf/starship.toml | 44 ++++++++++++++++++++++++++++++++++++++++++++ install.sh | 11 ++++++----- zsh/zshrc | 5 +++-- 4 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 conf/starship.toml diff --git a/conf/fdignore b/conf/fdignore index d8f5bbf..fd4f47f 100644 --- a/conf/fdignore +++ b/conf/fdignore @@ -9,7 +9,6 @@ .cups .local .cache -.config .lesshst .hushlogin .zcompdump* diff --git a/conf/starship.toml b/conf/starship.toml new file mode 100644 index 0000000..9193cbf --- /dev/null +++ b/conf/starship.toml @@ -0,0 +1,44 @@ +add_newline = false +prompt_order = [ + "username", + "hostname", +# "kubernetes", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", +# "docker_context", +# "terraform", +# "aws", + "cmd_duration", + "line_break", + "battery", + "character", +] + +[character] +use_symbol_for_status = true +[git_branch] +symbol = " " +style = "" + +[cmd_duration] +prefix = "" + +[git_status] +prefix = "" +suffix = "" +untracked = " !" +untracked_count.enabled = true +modified_count.enabled = true +deleted_count.enabled = true +staged = " +" +staged_count.enabled=true +show_sync_count = true + +[hostname] +style = "" + +[username] +style_user = "" diff --git a/install.sh b/install.sh index 8ba76b8..73ac5ce 100644 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/sh -# cleaning +# cleaning & preparing rm -rf ~/.bash* ~/.profile rm -rf ~/.dotfiles @@ -10,7 +10,6 @@ git clone https://github.com/ftpd/dotfiles.git ~/.dotfiles ## vim # cleaning rm -rf ~/.vim* -rm -rf ~/.config/nvim # installing mkdir -p ~/.config ln -sf ~/.dotfiles/vim ~/.vim @@ -42,8 +41,10 @@ mkdir -p ~/.zsh/plugins ~/.zsh/themes # dependiences git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.zsh/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/plugins/zsh-syntax-highlighting -git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.zsh/themes/powerlevel10k -# install +#git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.zsh/themes/powerlevel10k +# installing +curl -fsSL https://starship.rs/install.sh | bash ln -sf ~/.dotfiles/zsh/zshrc ~/.zshrc -ln -sf ~/.dotfiles/zsh/p10k.zsh ~/.p10k.zsh +ln -sh ~/.dotfiles/conf/starship.toml ~/.config +#ln -sf ~/.dotfiles/zsh/p10k.zsh ~/.p10k.zsh touch ~/.zshrc.local diff --git a/zsh/zshrc b/zsh/zshrc index 40a48c4..427eca4 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -9,8 +9,8 @@ alias ll='ls -lh' source ~/.zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh source ~/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -source ~/.zsh/themes/powerlevel10k/powerlevel10k.zsh-theme -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +#source ~/.zsh/themes/powerlevel10k/powerlevel10k.zsh-theme +#[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh export FZF_DEFAULT_COMMAND='git ls-files --cached --others --exclude-standard 2>/dev/null|fd -H' @@ -24,4 +24,5 @@ _fzf_compgen_dir() { fd -H --type d . "$1" } +eval "$(starship init zsh)" [ -e ~/.zshrc.local ] && source ~/.zshrc.local