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

Responsive Game Interfaces

It’s abundantly clear that making interfaces for portals, single page applications, analytics or CRUD apps is so much easier than creating applications for games. UX within games is much more complicated. Now add upon that complication a responsive design. It took the better part of 8 hours to get a design mock-up that worked on the smallest iphone device (man they’re tiny!) and that scales up to the largest phablet. I still need to work on detaching the pane and having a more ‘diablo-esque’ two-pane character panel / inventory approach for desktop users. ...

March 24, 2017 · 1 min

Textures make a difference

I’ve been playing around with textures in exploring the bleak to see how much of a difference it would make. Essentially I’m torn between two ideas: Make the floors all a plain color and glow them based on the environment color so as not to be too realistic and keep a more roguelike feel. Struggle with having textures that blend together between sectors so it has a more natural feel albeit simple in perspective to traditional 3d games. At the moment I’m leaning towards number two, but I haven’t been able to reproduce a reliable glow postprocessing effect that I actually like and that feels natural. I’ll follow down both roads further before making a discrete decision. ...

March 22, 2017 · 1 min

No FPS is a Roguelike

I’ve struggled with the concept of merging the roguelike turn-based system with a FPS. Having a turn based on when you fully leave a cell makes the monsters seem jumpy which doesn’t make for very nice gameplay. Because I believe turn-based systems are core to roguelikes and first person shooters can’t be turned based in a cohesive way, I’ve dropped the FPS perspective altogether and pulled the camera above the player. ...

March 10, 2017 · 1 min

Building A Modern Roguelike in 2017

Building games has become easier to do with the increase in quality of tooling and specialization software. The unfortunate side effect is the developer has to become more trained and specialized in a variety of facets in order to maintain competency in the field. Ergo building games is also harder. This year for the 7DRL competition I’ve been pretty lazy, which doesn’t help much to making deadlines. Setting aside playing games for making games I decided to finally venture into the competition whole heartedly. ...

March 8, 2017 · 2 min

Space Invaders Released

So I’ve recently compiled a bunch of my libraries together into a collection I call ‘ion-cloud’ available on ’npm’. In order to best test these, I’ve recreated my own adaptation of ‘Space Invaders’ available free to play here on my website by clicking the games above or here and ‘open source’ on github here.

December 2, 2016 · 1 min

Coterie Released

(Aug 3, 2016 Update: Coterie is now playable on mobile or touch devices as well. Play Coterie) Growing up I deeply enjoyed two specific cards games: Triple Triad in Final Fantasy VIII and Tetra Master in Final Fantasy IX. Having some extra time this past week I developed a simple card game variant called Coterie. What started as an excuse to get more familiar with flexbox in css ended up actually being fun to play! ...

August 3, 2016 · 2 min

Cleaner complex IF Statements

Writing clean code like Uncle Bob describes can be complicated sometimes. So you have this long if statement that’s relatively simple in design but ugly to the eyes and somewhat hard to read. if( x1>=img.left&&x1=img.top&&y1=img.left&&x2=img.top&&y2=lowerX&&x1=lowerY&&y1=lowerX&&x2=lowerY&&y2=a&&this=img.left&&x1=img.left&&x2=img.top&&y2=img.top&&y2r)){ img.scaling = Math.pow(x1-x2,2)+Math.pow(y1-y2,2); } //end if At what point does sacrificing performance become worth it for code readability?

May 12, 2016 · 1 min

Pigeon Hole Stepping

For 7DRL this year I developed a new map generation algorithm called Pigeon Hole Stepping. Fill the map with walls This map generation algorithm relies on negative building techniques. This concept will make more sense as the later steps are explained. Dig Hallways Essentially, we can assume that hallways that are parallel to each other are at least the length of a single room and up to two rooms apart in distance. Because of this assumption, we can make a random walker that will move around with this restriction in mind until map is filled completely. ...

March 8, 2016 · 2 min

NPM Module: Jugs

App generator jugs makes development fun again! You can view the source code here. Vite.js : Performant Module bundler with tree-shaking, hot module reloading & minification Babel : Transpile modern javascript, formerly called 6to5 Eslint : Lint your javascript in its modern format Stylus : Powerful CSS Preprocessor with a beautiful syntax Ion-Cloud : A micro library for animations & game development Simply install this app generator globally: npm i -g jugs mkdir appName cd appName jugs File Structure: ...

January 30, 2016 · 1 min