Skip to content

Commit

Permalink
just go back to p10k because starship is too fucking slow :clown:
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnymeller committed May 25, 2024
1 parent 341c678 commit 80d0145
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
14 changes: 8 additions & 6 deletions dotfiles/zsh/.p10k.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
dir # current directory
vcs # git status
command_execution_time # previous command duration
virtualenv # python virtual environment
prompt_char # prompt symbol
)

Expand All @@ -55,9 +54,9 @@
nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
# node_version # node.js version
# go_version # go version (https://golang.org)
# rust_version # rustc version (https://www.rust-lang.org)
node_version # node.js version
go_version # go version (https://golang.org)
rust_version # rustc version (https://www.rust-lang.org)
# dotnet_version # .NET version (https://dotnet.microsoft.com)
# php_version # php version (https://www.php.net/)
# laravel_version # laravel php framework version (https://laravel.com/)
Expand Down Expand Up @@ -100,7 +99,7 @@
timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
# cpu_arch # CPU architecture
# time # current time
time # current time
# ip # ip address and bandwidth usage for a specified network interface
# public_ip # public IP address
# proxy # system-wide http/https/ftp proxy
Expand Down Expand Up @@ -159,6 +158,8 @@
typeset -g POWERLEVEL9K_RULER_CHAR='' # reasonable alternative: '·'
typeset -g POWERLEVEL9K_RULER_FOREGROUND=7


typeset -g POWERLEVEL9K_TERM_SHELL_INTEGRATION=true
# Filler between left and right prompt on the first prompt line. You can set it to '·' or '─'
# to make it easier to see the alignment between left and right prompt and to separate prompt
# from command output. It serves the same purpose as ruler (see above) without increasing
Expand Down Expand Up @@ -467,6 +468,7 @@
# config: `git config bash.showDirtyState false`.
typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1

# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME=true
# Don't show Git status in prompt for repositories whose workdir matches this pattern.
# For example, if set to '~', the Git repository at $HOME/.git will be ignored.
# Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.
Expand Down Expand Up @@ -1627,7 +1629,7 @@
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet

# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
Expand Down
20 changes: 14 additions & 6 deletions programs/zsh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
zsh-autocomplete
zsh-completions
];
programs.starship = {
enable = true;
};
programs.zsh = {
enable = true;
enableCompletion = false;
Expand All @@ -28,13 +25,20 @@
initExtraFirst = ''
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
export STARSHIP_CONFIG=~/.nixdots/dotfiles/starship.toml
# NOTE: anything that requires input has to go above this!
# 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
source ${pkgs.zsh-autocomplete}/share/zsh-autocomplete/zsh-autocomplete.plugin.zsh
'';

initExtra = ''
# source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
# source ${config.xdg.configHome}/zsh/.p10k.zsh
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
source ${config.xdg.configHome}/zsh/.p10k.zsh
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
source ${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh
Expand All @@ -50,6 +54,7 @@
set -o vi
export PATH=$HOME/.cargo/bin:$PATH # add cargo to the front of the path so dev tools are used > sys
export PATH=$PATH:/$HOME/.nix-profile/bin
export TWM_DEFAULT="default"
export EDITOR="nv"
Expand Down Expand Up @@ -78,6 +83,9 @@

programs.bash.enable = true; # just in case

# copy our powerlevel10k config over
home.file.".config/zsh/.p10k.zsh".source = ../../dotfiles/zsh/.p10k.zsh;

programs.command-not-found.enable = false;
programs.nix-index = {
enable = true;
Expand Down

0 comments on commit 80d0145

Please sign in to comment.