Skip to content

Instantly share code, notes, and snippets.

View romkatv's full-sized avatar

Roman Perepelitsa romkatv

View GitHub Profile
@romkatv
romkatv / install_meslo_wsl.sh
Last active July 11, 2024 13:16
Install Meslo Powerline font family on Windows
#!/bin/bash
#
# This script installs patched Meslo Powerline font family on Windows.
# The fonts are installed for the current user only. The script must be
# run from WSL.
#
# bash -c "$(curl -fsSL https://gist.githubusercontent.com/romkatv/aa7a70fe656d8b655e3c324eb10f6a8b/raw/install_meslo_wsl.sh)"
#
# If you just want the font files, they are in
# https://github.com/romkatv/dotfiles-public/tree/master/.local/share/fonts/NerdFonts.
@romkatv
romkatv / p10k-compiled-prompt-docker-ubuntu.zsh
Last active July 17, 2019 20:58
Powerlevel10k Compiled Prompt Demo
#!/usr/bin/zsh
p=$'${${_P9K_BG::=NONE}+}${${_P9K_I::=0}+}\M-b\M-\C-U\M--\M-b\M-\C-T\M-\C-@%f%b%k${${_P9K_E::=1}+}${${_P9K_C::=${(Q)${:-%D\\{%H:%M:%S\\}}}}+}${_P9K_N::=}${${_P9K_E:-${_P9K_N:=9}}+}${${${${_P9K_BG:-0}:#NONE}:-${_P9K_N:=1}}+}${${${$((_P9K_I>0&&_P9K_I>=1)):#1}:-${_P9K_N:=2}}+}${${${${:-0$_P9K_BG}:#0102}:-${_P9K_N:=3}}+}${${_P9K_N:=4}+}${${_P9K_V[1]::=%K{102\\} %F{000\\}\M-o\M-\C-@\M-\C-W%F{000\\}}+}${${_P9K_V[2]::=%K{102\\}%F{000\\}\M-o\M-\C-@\M-\C-W%F{000\\}}+}${${_P9K_V[3]::=%K{102\\}%F{000\\}\M-n\M-\C-B\M-1 %F{000\\}\M-o\M-\C-@\M-\C-W%F{000\\}}+}${${_P9K_V[4]::=%K{102\\}%F{$_P9K_BG\\}\M-n\M-\C-B\M-0 %F{000\\}\M-o\M-\C-@\M-\C-W%F{000\\}}+}${_P9K_V[$_P9K_N]}${_P9K_E:+${_P9K_C:+ }${_P9K_C} ${${_P9K_I::=1}+}${${_P9K_BG::=102}+}}${${_P9K_E::=${${(%)${:-%#}}:#%}}+}${${_P9K_C::=${(Q)${:-\'\'}}}+}${_P9K_N::=}${${_P9K_E:-${_P9K_N:=9}}+}${${${${_P9K_BG:-0}:#NONE}:-${_P9K_N:=1}}+}${${${$((_P9K_I>0&&_P9K_I>=2)):#1}:-${_P9K_N:=2}}+}${${${${:-0$_P9K_BG}:#0000}:-${_P9K_N:=3}}+}${${_P9K_N:=4}+}${${_P9K_V[1]::
@romkatv
romkatv / Pure style for Powerlevel10k.md
Last active July 30, 2024 11:08
Pure style for Powerlevel10k

Powerlevel10k can generate the same prompt as Pure.

pure

Installation

git clone https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc
@romkatv
romkatv / Powerlevel10k config with Tony Lambiris's style.md
Last active July 3, 2020 02:44
Powerlevel10k config with Tony Lambiris's style

Powerlevel10k config with Tony Lambiris's style

If you want your prompt to look like Tony Lambiris's but without the lag and bugs of Powerlevel9k, this config is for you.

Tony Lambris's Prompt

Ported from tonylambiris/dotfiles/dot.zshrc.

Installation

@romkatv
romkatv / two-line-prompt.zsh
Last active September 20, 2024 13:26
Two-line ZSH prompt
# Example of two-line ZSH prompt with four components.
#
# top-left top-right
# bottom-left bottom-right
#
# Components can be customized by editing set-prompt function.
#
# Installation:
#
# (cd && curl -fsSLO https://gist.githubusercontent.com/romkatv/2a107ef9314f0d5f76563725b42f7cab/raw/two-line-prompt.zsh)
@romkatv
romkatv / termux-install-p10k-font.sh
Created August 15, 2019 14:27
Install Powerlevel10k font on Termux
mkdir -p ~/.termux
curl -fsSL -o ~/.termux/font.ttf 'https://github.com/romkatv/dotfiles-public/raw/master/.local/share/fonts/NerdFonts/MesloLGS%20NF%20Regular.ttf'
termux-reload-settings
@romkatv
romkatv / p10k-transient-kubecontext.zsh
Last active May 9, 2020 09:22
p10k-transient-kubecontext.zsh
#### !!! THIS GIST IS OBSOLETE !!! ####
#
# There is now built-in support for transient kubecontext
# in Powerlevel10k.
#
# See: https://github.com/romkatv/powerlevel10k/#show-on-command
#
#### !!! THIS GIST IS OBSOLETE !!! ####
# Run this function from ~/.zshrc to enable transient kubernetes and/or azure
@romkatv
romkatv / p10k-bar.zsh
Created September 23, 2019 12:08
p10k-bar.zsh
# Config for Powerlevel10k ZSH theme (https://github.com/romkatv/powerlevel10k/) that emulates
# the appearance of Bar ZSH theme (https://github.com/anki-code/zsh-bar-theme).
() {
emulate -L zsh
setopt no_unset
# Unset all configuration options.
unset -m 'POWERLEVEL9K_*'
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
@romkatv
romkatv / instant-zsh.zsh
Last active October 4, 2024 21:39
Make zsh start INSTANTLY with this one weird trick
# Make zsh start INSTANTLY with this one weird trick.
#
# https://asciinema.org/a/274255
#
# HOW TO USE
#
# 1. Download this script.
#
# curl -fsSL -o ~/instant-zsh.zsh https://gist.github.com/romkatv/8b318a610dc302bdbe1487bb1847ad99/raw
#
@romkatv
romkatv / monochrome-powerlevel10k.md
Last active March 16, 2023 17:44
monochrome-powerlevel10k.zsh

Here's how it looks with White on Black color scheme:

white-on-black

Tango Dark

tango-dark

Solarized Light