- Source: starship/starship#921.
- Timing for
git status
: between 12 and 15 seconds.- Method of timing: likely
time git status
. - Reported time: probably wall time.
- Cold or hot: unknown.
- Method of timing: likely
- Timing for
gitstatus_query
: between 3 and 4 seconds.- Method of timing: unknown.
- Reported time: probably wall time.
- Cold or hot: unknown.
gitstatusd
command-line arguments: unknown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prompt_my_msa() { | |
p10k segment -e -t '$my_msa_content' -b black -f white | |
(( $+my_msa_content )) && return | |
typeset -g my_msa_content | |
local -r msa=~/minimal_spectrum_analyzer/build/analyzer | |
[[ -x $msa ]] || return | |
local fd | |
exec {fd}< <("$msa" --line_feed LF -a off -c 16 0<&- 2>&- &!) || return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function metronome() { | |
local -rF tick_sec=0.3 | |
while true; do | |
zselect -t $((int(ceil(tick_sec * 100)))) | |
print 2>/dev/null || break | |
done | |
} | |
function update-prompt() { | |
local -ri period=7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XTerm Control Sequences | |
Edward Moy | |
University of California, Berkeley | |
Revised by | |
Stephen Gildea | |
X Consortium (1994) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This command moves your zsh dotfiles (.zshrc, .zsh_history, etc.) | |
# from the home directory to ~/.config/zsh. It's been verified to | |
# work correctly if you are using zsh4humans. With other zsh configs | |
# your mileage may vary. | |
# | |
# How to: | |
# | |
# 1. Close all terminals except one. | |
# 2. Copy-paste this command into the only remaining terminal. | |
() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Runs "$@" in a subshell with the caller's options, sets reply=(stdout stderr) | |
# and returns the status of the executed command. Both stdout and stderr are | |
# captured completely, including NUL bytes, incomplete UTF-8 characters and | |
# trailing LF, if any. | |
# | |
# Example: | |
# | |
# % zsh-run-command ls -d ~ /garbage | |
# % printf 'status: %s\nstdout: %s\nstderr: %s\n' $? "${(q+)reply[@]}" | |
# status: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Returns a random 32-bit number. | |
# If /dev/urandom is cryptographically secure, so is srand32. | |
# | |
# If zsh is compiled with 64-bit number support, the result | |
# is non-negative. Otherwise it may be negative and the value | |
# is governed by the rules of unsigned-to-signed conversion in C. | |
# | |
# Examples: | |
# | |
# % print -r -- $(( srand32() )) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by Powerlevel10k configuration wizard on 2020-04-12 at 20:28 CEST. | |
# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 30399. | |
# Wizard options: nerdfont-complete + powerline, small icons, classic, unicode, dark, | |
# 24h time, round separators, round heads, round tails, 2 lines, disconnected, no frame, | |
# sparse, many icons, concise, instant_prompt=quiet. | |
# Type `p10k configure` to generate another config. | |
# | |
# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate | |
# your own config based on it. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Measure zsh prompt latency with various themes: | |
# | |
# 1. Run the docker command. | |
# 2. Type `ZSH_THEME=XXX exec zsh` where `XXX` is a theme name such as | |
# `agnoster` or `powerlevel10k/powerlevel10k`. | |
# 3. Type `zsh-prompt-benchmark` and press and hold ENTER until benchmark | |
# results appear. It takes about 10 seconds. | |
docker run -e TERM -it --rm archlinux/base bash -uexc ' | |
pacman -Sy --noconfirm zsh git | |
git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh |
NewerOlder