Skip to content

Instantly share code, notes, and snippets.

View romkatv's full-sized avatar

Roman Perepelitsa romkatv

View GitHub Profile

How to use this segment

  1. save the file somewhere
  2. source the file in zshrc before sourcing p10k
  3. replace vcs_info with gitstatus in p10k.zsh (usually located at ~/.p10k.zsh)

How does it work

See the excellently documented async.zsh from zsh-autosuggestions for low-level implementation. TLDR: Use process substitution to spawn a zsh instance that executes the main checking logic in the prompt's rendering function and immediately returns. Since the output of the process is connected to a fd of the parent process, we can then use zle's monitor feature to attach a callback function to said fd. After the gawk script finishes and starts to print to the fd

@akihikodaki
akihikodaki / README.en.md
Last active October 18, 2025 19:34
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@vtenfys
vtenfys / winrun.sh
Last active June 6, 2022 06:01
Workaround for microsoft/WSL#1614 (place in /usr/bin/winrun)
#!/bin/bash
command=$1
args=${@:2}
winrun_pid=$$
pidfile="/tmp/winrun-pid-$(date +%s)"
if [[ $args != '' ]]; then
argumentlist="-ArgumentList \"$args\""
fi
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active October 18, 2025 22:31
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k