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 December 25, 2025 23:23
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

NOTE: Time flies, and it's been almost five years(!) since I wrote this. Beaware the text below is now outdated (e.g., now Asahi Linux has graphics acceleration even better than this). The commands listed are up-to-date.

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.

@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 December 26, 2025 12:02
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k