summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--bashrc7
-rw-r--r--install.conf.yaml2
-rw-r--r--shell/wsl.sh1
-rw-r--r--starship.toml118
-rw-r--r--wt.json2
-rw-r--r--zsh/setopt.zsh9
-rw-r--r--zshrc11
7 files changed, 139 insertions, 11 deletions
diff --git a/bashrc b/bashrc
index b7a2981..2f1d292 100644
--- a/bashrc
+++ b/bashrc
@@ -6,3 +6,10 @@ source $DOTFILES/shell/env.sh
source $DOTFILES/shell/aliases.sh
[ -n "${WSL_DISTRO_NAME+1}" ] && source $DOTFILES/shell/wsl.sh
[ -n "${WSL_DISTRO_NAME+1}" ] && source $DOTFILES/shell/gpg.sh
+
+eval "$(starship init bash)"
+
+function set_win_title() {
+ echo -ne "\033]0;$USER@$HOSTNAME: ${PWD/$HOME/'~'}\007"
+}
+starship_precmd_user_func="set_win_title"
diff --git a/install.conf.yaml b/install.conf.yaml
index 6b00c25..a82fc83 100644
--- a/install.conf.yaml
+++ b/install.conf.yaml
@@ -12,6 +12,8 @@
- shell:
- command: git submodule update --init --recursive
description: Installing submodules
+ - command: sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir "${HOME}/.local/bin" --yes
+ description: Installing Starship
- command: curl -sfL git.io/antibody | sh -s - -b "${HOME}/.local/bin"
description: Installing antibody
- command: (cd ${HOME}/dotfiles/zsh; antibody bundle < plugins.txt > plugins.zsh)
diff --git a/shell/wsl.sh b/shell/wsl.sh
index 7fe3368..5e1e186 100644
--- a/shell/wsl.sh
+++ b/shell/wsl.sh
@@ -15,6 +15,7 @@ export EDITOR="code --wait"
export DOCKER_HOST=${DOCKER_HOST:-tcp://0.0.0.0:2375}
export DOCKER_MACHINE_NAME=${DOCKER_MACHINE_NAME:-$HOST}
+# unalias cb 2>/dev/null
alias cb=clip.exe
alias wsl=wsl.exe
alias ykman='/mnt/c/Program\ Files/Yubico/YubiKey\ Manager/ykman.exe'
diff --git a/starship.toml b/starship.toml
index e69de29..73a762b 100644
--- a/starship.toml
+++ b/starship.toml
@@ -0,0 +1,118 @@
+format = """
+$all\
+"""
+
+add_newline = false
+
+right_format = """
+$cmd_duration \
+$status\
+"""
+
+[fill]
+disabled = true
+symbol = ""
+
+[aws]
+symbol = " "
+
+[conda]
+symbol = " "
+
+[cmd_duration]
+disabled = true
+format = "[$duration](bold yellow)"
+show_notifications = true
+min_time_to_notify = 1_000
+
+[dart]
+symbol = " "
+
+[directory]
+read_only = " "
+fish_style_pwd_dir_length = 1
+
+[directory.substitutions]
+"~/win" = " ~"
+"/mnt/c/Users/tobyv" = " ~"
+"/mnt/c" = ' C:'
+"/mnt/d" = ' D:'
+"/mnt/e" = ' E:'
+
+[docker_context]
+symbol = " "
+
+[elixir]
+symbol = " "
+
+[elm]
+symbol = " "
+
+[git_branch]
+symbol = " "
+
+[golang]
+symbol = " "
+
+[hg_branch]
+symbol = " "
+
+[java]
+symbol = " "
+
+[julia]
+symbol = " "
+
+[memory_usage]
+symbol = " "
+
+[nim]
+symbol = " "
+
+[nix_shell]
+symbol = " "
+
+[package]
+symbol = " "
+
+[perl]
+symbol = " "
+
+[php]
+symbol = " "
+
+[python]
+symbol = " "
+
+[ruby]
+symbol = " "
+
+[rust]
+symbol = " "
+
+[scala]
+symbol = " "
+
+[shlvl]
+symbol = " "
+
+[status]
+disabled = true
+format = "[$symbol$maybe_int]($style)"
+pipestatus_format = "\\[$pipestatus\\]"
+pipestatus = true
+map_symbol = true
+style = "red"
+symbol = "☓"
+recognize_signal_code = true
+success_symbol = "[✓](bright-green)"
+signal_symbol = "[⚡](bright-yellow)"
+not_executable_symbol = "!"
+not_found_symbol = "?"
+sigint_symbol = ""
+
+# pipestatus_format = "\\[$pipestatus\\]=>[$symbol$common_meaning$signal_name$maybe_int]($style)"
+
+
+[swift]
+symbol = "ﯣ "
diff --git a/wt.json b/wt.json
index 041ea1a..a743ff3 100644
--- a/wt.json
+++ b/wt.json
@@ -86,7 +86,7 @@
"cursorShape": "filledBox",
"font":
{
- "face": "Fira Code",
+ "face": "FiraCode NF",
"size": 11
},
"useAcrylic": true
diff --git a/zsh/setopt.zsh b/zsh/setopt.zsh
index 7fffab6..df15355 100644
--- a/zsh/setopt.zsh
+++ b/zsh/setopt.zsh
@@ -8,12 +8,3 @@ DISABLE_AUTO_TITLE="true"
setopt HIST_IGNORE_ALL_DUPS
setopt NO_BEEP
setopt MENU_COMPLETE
-
-function set_title() {
- folder=$(sed "s/$USER/~/g" <<<$PWD:t)
-
- window_title="\033]0;$USER@$HOST: $folder\007"
- echo -ne "$window_title"
-}
-
-autoload -Uz add-zsh-hook && add-zsh-hook precmd set_title \ No newline at end of file
diff --git a/zshrc b/zshrc
index 60ad07f..1049668 100644
--- a/zshrc
+++ b/zshrc
@@ -12,4 +12,13 @@ source $DOTFILES/zsh/aliases.zsh
source $DOTFILES/zsh/completions.zsh
source $DOTFILES/zsh/keybindings.zsh
-eval "$(starship init zsh)" \ No newline at end of file
+eval "$(starship init zsh)"
+
+function set_win_title() {
+ folder=$(sed "s/$USER/~/g" <<<$PWD:t)
+
+ window_title="\033]0;$USER@$HOST: $folder\007"
+ echo -ne "$window_title"
+}
+
+precmd_functions+=(set_win_title)