diff --git a/starship/.config/starship.toml b/starship/.config/starship.toml deleted file mode 100644 index 5e5d487..0000000 --- a/starship/.config/starship.toml +++ /dev/null @@ -1,70 +0,0 @@ -# ~/.config/starship.toml - -format = """ -$character\ -$directory\ -$python\ -$fill\ -$git_branch$git_commit$git_state$git_status -[>... ](fg:purple) -""" - -#right_format = "$memory_usage$git_metrics" -scan_timeout = 10 -add_newline = false -palette = 'dracula' - -[character] -error_symbol = '[\(ಠ_ಠ\)](fg:red)' -success_symbol = '[¯\\_\(ツ\)_/¯](fg:green)' - -[directory] -truncation_length = 3 - -[fill] -symbol = '-' -style = 'bold grey' - -[python] -format = '$symbol($virtualenv)($style)' - -[git_branch] -symbol = '🌱 ' -truncation_length = 4 -truncation_symbol = '' -always_show_remote = true -format = '[$symbol$branch(:$remote_branch)]($style) ' - -[git_status] -style = 'bold white' -conflicted = '🏳' -#ahead = '🏎💨' -#behind = '😰' -#diverged = '😵' -up_to_date = '✓' -#untracked = '🤷' -#stashed = '📦' -modified = '📝' -staged = '[++\($count\)](green)' -renamed = '👅' -deleted = '🗑' - -[memory_usage] -disabled = false -format = ' $symbol [${ram_pct}](${style})' -threshold = -1 -symbol = '🧙' -style = 'bold green' - -[palettes.dracula] -black = '#282a36' -grey ='#44475a' -white = '#f8f8f2' -blue ='#6272a4' -cyan = '#8be9fd' -green = '#50fa7b' -orange = '#ffb86c' -pink = '#ff79c6' -purple = '#bd93f9' -red = '#ff5555' -yellow = '#f1fa8c' diff --git a/tmuxp/Work.yaml b/tmuxp/Work.yaml index 970527e..d39ad16 100644 --- a/tmuxp/Work.yaml +++ b/tmuxp/Work.yaml @@ -1,54 +1,31 @@ -session_name: Northpass +session_name: Work windows: -- layout: c39e,229x45,0,0,1 +- layout: b7be,192x52,0,0,1 options: {} panes: - focus: 'true' - shell_command: zsh - start_directory: /Users/normrasmussen/Documents/Work + shell_command: nvim + start_directory: /Users/normrasmussen/Documents/Work/CustomerNotes window_name: notes -- focus: 'true' - layout: c39f,229x45,0,0,2 +- layout: b7bf,192x52,0,0,2 options: {} panes: - focus: 'true' - shell_command: Python - start_directory: /Users/normrasmussen/.dotfiles/tmuxp + shell_command: nvim + start_directory: /Users/normrasmussen/Documents/Work/Custom_Templates window_name: templates -- layout: 40b3,229x45,0,0[229x42,0,0,3,229x2,0,43,4] +- layout: 08ba,192x52,0,0[192x40,0,0,4,192x11,0,41,11] options: {} panes: - focus: 'true' shell_command: - - cd /Users/normrasmussen/Documents/Work/Scripts/GoogleScripts/Luminate_API_Exam - - zsh - - shell_command: - - cd /Users/normrasmussen/Documents/Work/Scripts/API_Tests - - zsh + - cd /Users/normrasmussen/Documents/Work/Scripts window_name: scripts -- layout: c3c2,196x45,0,0,5 +- focus: 'true' + layout: 9c3d,192x52,0,0[192x41,0,0,5,192x10,0,42,16] options: {} panes: - - focus: 'true' - shell_command: zsh - start_directory: /Users/normrasmussen/.dotfiles - window_name: dots -- layout: 60a9,229x45,0,0[229x42,0,0,6,229x2,0,43,18] - options: {} - panes: - - focus: 'true' - shell_command: zsh - - zsh - start_directory: /Users/normrasmussen/Documents/Projects/nginx_docs - window_name: nginx -- layout: 0ceb,229x45,0,0{115x45,0,0,11,113x45,116,0,14} - options: {} - panes: - - focus: 'true' - shell_command: - - cd /Users/normrasmussen/Documents/Projects - - zsh - shell_command: - - cd /Users/normrasmussen - - zsh - window_name: zsh + - cd /Users/normrasmussen/.dotfiles + - focus: 'true' + window_name: dots diff --git a/zsh/.zshrc b/zsh/.zshrc index 8cc64e7..9853c55 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,11 +1,13 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 - -plug "jeffreytse/zsh-vi-mode" -plug "wbingli/zsh-wakatime" -# plug "zap-zsh/supercharge" -plug "zsh-users/zsh-autosuggestions" -plug "zsh-users/zsh-syntax-highlighting" "122dc46" +# autoload -Uz compinit; compinit; _comp_options+=(globdots); # User configuration export DOT="~/.dotfiles" @@ -18,21 +20,21 @@ export VISUAL='nvim' export PYTHONPATH="/opt/homebrew/bin/python3:$PYTHONPATH" export PYENV_ROOT="$HOME/.pyenv" command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" # Function to Correctly Source $VIRTUAL_ENV for Neovim function nvimvenv { - if [[ -e "$VIRTUAL_ENV" && -f "$VIRTUAL_ENV/bin/activate" ]]; then - source "$VIRTUAL_ENV/bin/activate" - command nvim "$@" - deactivate - else - command nvim "$@" - fi + if [[ -e "$VIRTUAL_ENV" && -f "$VIRTUAL_ENV/bin/activate" ]]; then + source "$VIRTUAL_ENV/bin/activate" + command nvim "$@" + deactivate + else + command nvim "$@" + fi } alias nvim=nvimvenv - # alias nvim-minimal="NVIM_APPNAME=Minivim nvim" # alias nvim-arduino="NVIM_APPNAME=Arduino nvim" @@ -50,10 +52,12 @@ alias nvim=nvimvenv #bindkey -s ^a "nvims\n" # source /Users/normrasmussen/.docker/init-zsh.sh || true # Added by Docker Desktop -# export PATH="$PATH:$HOME/.rvm/bin" +export PATH="$PATH:$HOME/.rvm/bin" [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh export PATH="/opt/homebrew/sbin:$PATH" export PATH="/opt/homebrew/bin:$PATH" -eval "$(starship init zsh)" -source ~/.dotfiles/zsh/.zshrc +source /opt/homebrew/share/powerlevel10k/powerlevel10k.zsh-theme + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh diff --git a/zsh/.zshrc.minimal b/zsh/.zshrc.minimal new file mode 100644 index 0000000..775f1cb --- /dev/null +++ b/zsh/.zshrc.minimal @@ -0,0 +1,8 @@ +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 + +# User configuration +export DOT="~/.dotfiles" +alias vim='vim -S ~/.vimrc' +alias nvim='nvim' +source ~/.dotfiles/zsh/.zshrc diff --git a/zsh/zsh-autosuggestions b/zsh/zsh-autosuggestions deleted file mode 160000 index 9908eb4..0000000 --- a/zsh/zsh-autosuggestions +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9908eb49a3fd18e25cfd8a0b9aa841e58429e59d diff --git a/zsh_issues.md b/zsh_issues.md new file mode 100644 index 0000000..9faf1f5 --- /dev/null +++ b/zsh_issues.md @@ -0,0 +1,15 @@ +--- +title: "Test" +date: 2023-09-12T17:19:08Z +draft: false +--- + +Yesterday, I could not get my ZSH shell to work at all. As I kept trying things, I was getting all these weird errors. I started posting about this on Mastodon too. + +[Mastodon Thread](https://fosstodon.org/@notnorm/111047573608738701) where I kept asking myself - no responses! + +Finally, I realized the issue. And that was the [Starship](https://www.starship.rs) cross-shell prompt. Turns out, it was making everything really really slow. + +I finally got it fixed by doing the following: +* Delete everything from `~/.zsh_sessions/` and `~/.zsh_history`. +* Do not use `source ~/.zshrc` and definitely don't use it in your `zshrc` file! Instead of `source` use `exec zsh`