Zsh Theme For Pragmata Pro

Having spent a lot of money on purchasing the Pragmata Pro font (mostly to acquire a well-made set of glyphs for things like lambdas etc, I decided to allow this font to supplement my zsh theme. Here’s the results. This file is updated often and available on Github here. #!/usr/bin/env zsh local LAMBDA="%(?,%{$fg_bold[green]%}λ,%{$fg_bold[red]%}λ)" if [[ "$USER" == "root" ]]; then USERCOLOR="red"; else USERCOLOR="yellow"; fi # Git sometimes goes into a detached head state. git_prompt_info doesn't # return anything in this case. So wrap it in another function and check # for an empty string. function check_git_prompt_info() { if git rev-parse --git-dir > /dev/null 2>&1; then if [[ -z $(git_prompt_info) ]]; then echo "%{$fg[blue]%}detached-head%{$reset_color%}) $(git_prompt_status) %{$fg[yellow]%}→ " else echo "$(git_prompt_info) $(git_prompt_status) %{$fg_bold[cyan]%}→ " fi else echo "%{$fg_bold[cyan]%}→ " fi } function get_right_prompt() { if git rev-parse --git-dir > /dev/null 2>&1; then echo -n "$(git_prompt_short_sha)%{$reset_color%}" else echo -n "%{$reset_color%}" fi } PROMPT=' ${LAMBDA}\ %{$fg_bold[$USERCOLOR]%}%n\ %{$fg_no_bold[magenta]%}[%3~]\ $(check_git_prompt_info)\ %{$reset_color%}' RPROMPT='$(get_right_prompt)' # Format for git_prompt_info() ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%} " ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%} " # Format for git_prompt_status() ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}⮹ " ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[blue]%}⭍" ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}⮾ " ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[magenta]%}⭷ " ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[yellow]%}⮓ " ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[cyan]%}⯑ " # Format for git_prompt_ahead() ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[white]%}⮍ " ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_bold[white]%}⮏ " # Format for git_prompt_long_sha() and git_prompt_short_sha() ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg_bold[white]%}[%{$fg_bold[blue]%}" ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$fg_bold[white]%}]"

April 2, 2017 · 1 min

.zshrc

It all started one long rainy night after setting down my Archlinux laptop and picking up my macbook pro.. inevitably annoyed quickly by the ancient bash version. Switched to z shell. Downloaded oh-my-zsh for a prettiness template to start with.. customized my own theme, and have been hooked for a solid 3 months so far. (Many years later, it’s much more refined - 2019/01/28) You can alternatively view all my dotfiles on github here. ...

August 9, 2015 · 2 min

.vimrc

I’ve decided to release my small .vimrc file to others who are interested. You can also view all my dotfiles on github here. "---------------------------------------- " Start general configurations "---------------------------------------- set encoding=utf-8 set nocompatible " don't lose new vim features due to compatibility set ts=2 sw=2 et " 2 space tabs (tabstop=2, shiftwidth=2, expandtab=true) set autoindent "Always autoindent set hlsearch " highlight search terms set incsearch " show search while typing it set smartcase " ignore case if search is lc, sensitive otherwise set showmatch " set show matching parenthesis set mouse=a " Allow mouse scrolling (peer programming) set backspace=indent,eol,start " Allow backspace to work normally set number " Turn on line numbers set relativenumber " show relative line numbers set laststatus=2 " Always show statusline set list "Show invisible characters, next line specifies characters set belloff=all "Turn off the annoying audible error bell set listchars=eol:¬,nbsp:¤,space:⋅,trail:•,tab:››,extends:…,precedes:…,conceal:‡ set rtp+=~/.vim/bundle/Vundle.vim/ " set runtime path to use vundle for plugins "---------------------------------------- " Start Vundle and loading plugins "---------------------------------------- call vundle#begin() Plugin 'VundleVim/Vundle.vim' "Best plugin management for vim Plugin 'moll/vim-node' "Allows gf/gF on relative node paths Plugin 'digitaltoad/vim-pug' "Jade/Pug templating for Node Plugin 'wavded/vim-stylus' "Stylus preprocessor for css Plugin 'airblade/vim-gitgutter' "See git + / - / ~ in gutter Plugin 'scrooloose/nerdtree' "File management Plugin 'Xuyuanp/nerdtree-git-plugin' "Shows modifications in nerdtree Plugin 'itchyny/lightline.vim' "pretty statusline Plugin 'ctrlpvim/ctrlp.vim' "Fuzzy file finder Plugin 'scrooloose/nerdcommenter' "Allows commenting of lines easier Plugin 'ap/vim-buftabline' "Allows the buffers as tabs Plugin 'easymotion/vim-easymotion' "Allows quick movement around vim Plugin 'chr4/nginx.vim' "nginx sytax support Plugin 'arcticicestudio/nord-vim' "color scheme Plugin 'pangloss/vim-javascript' "Better tabbing in javascript Plugin 'posva/vim-vue' "vue file syntax support Plugin 'junegunn/goyo.vim' "distraction-free centering of file call vundle#end() filetype plugin indent on " Plugins default to indent "--------------------------------------- " Reconfigure Plugin Options "--------------------------------------- let g:NERDCustomDelimiters = {'vue': {'left': '//'}, 'javascript': {'left': '//'}} let g:vue_pre_processors = ['pug', 'stylus'] let g:lightline = {'colorscheme': 'nord'} let g:lightline.separator = { 'left': '', 'right': '' } let NERDTreeQuitOnOpen = 1 let g:gitgutter_sign_added="++" let g:gitgutter_sign_modified="~~" let g:gitgutter_sign_removed="--" let g:gitgutter_max_signs=3000 let g:ctrlp_map = '' " ctrl+p starts plugin let g:ctrlp_cmd = 'CtrlP' let g:ctrlp_working_path_mode = 'ra' " start nearest search dir @ root .git "--------------------------------------- " Keyboard mappings "--------------------------------------- let mapleader="\" " Session management nnoremap s :ToggleWorkspace " Distraction-free editing nmap d :Goyo 80x75%:set showtabline=0 nmap v :Goyo!:set showtabline=2 " Open nerdtree and then open current file location in nerdtree nmap \ :NERDTreeToggle nmap \ :NERDTreeFind " New buffers, quitting buffers nmap T :enew nmap bl :bnext nmap bh :bprevious nmap bq :bp bd # nmap bs :ls nmap nj :rightbelow sb # nmap nk :leftabove sb # nmap nh :vert leftabove sb # nmap nl :vert rightbelow sb # " Indicate color code under cursor nmap z :echo "hi trans lo" " Selecting, making and resizing windows nnoremap j j nnoremap l l nnoremap h h nnoremap k k nnoremap mk K nnoremap mj Kr nnoremap mh H nnoremap ml Hr nnoremap sk :res +5 nnoremap sj :res -5 nnoremap sh :vertical res -5 nnoremap sl :vertical res +5 nnoremap j gj nnoremap k gk "--------------------------------------------- " Color scheme configuration "--------------------------------------------- syntax on "Make sure syntax highlighting is on colorscheme nord hi BufTabLineCurrent ctermfg=16 ctermbg=6 cterm=NONE hi BufTabLineHidden ctermfg=8 ctermbg=NONE cterm=NONE hi BufTabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE " Color Fixes Caused by Plugins hi link vueSurroundingTag htmlEndTag

May 15, 2015 · 3 min