My Oh-my-zsh Setup

I have been using oh-my-zsh for some years now and I like it so much, that installing zsh and oh-my-zsh is one of the first things I do when I get access to a new system. So this is my new go-to place to copy commands and settings from.

Installing zsh and git, debian-based linux:

sudo apt install zsh git

Installing oh-my-zsh:

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" After having installed oh-my-zsh (and possibly manually set your default shell to zsh), it’s time to configure .zshrc. Usually, this configuration is very dependent on the use of the system, so here are a few snippets. ZSH_THEME="ys" alias push="git push"alias pull="git pull"alias status="git status"alias add="git add"alias commit="git commit" alias open=xdg-openalias pbcopy="xclip -i -selection clipboard"alias pbpaste="xclip -o -selection clipboard" bindkey '^R' history-incremental-pattern-search-backward export LC_ALL=en_US.UTF-8export LANG=en_US.UTF-8export LANGUAGE=en_US.UTF-8export VISUAL=vimexport EDITOR=vim copypwd () { /usr/bin/keyring get$1 $2 | pbcopy } showpwd () { /usr/bin/keyring get$1 $2 } setpwd () { /usr/bin/keyring set$1 $2 }  activate () { if [ -e "./$1/bin/activate" ] ; then
source "./$1/bin/activate" else if [ -e "./$1/activate" ] ; then
source "./$1/activate" else if [ -e "./$1/activate.env" ] ; then
source "./$1/activate.env" else if [ -e "$HOME/env/$1/bin/activate" ] ; then source "$HOME/env/$1/bin/activate" else if [ -e "$HOME/env/$1/activate" ] ; then source "$HOME/env/$1/activate" else if [ -e "$HOME/env/$1/activate.env" ] ; then source "$HOME/env/\$1/activate.env"
else
fi
fi
fi
fi
fi
fi
}


Programmer’s Dvorak on Mac OS X 10.10 & German umlauts

If you are a real fan of the programmer’s Dvorak keyboard layout that is part of X11 on Debian, you might want to use this keyboard layout on a mac, too. Unfortunately, OS X 10.10 (and probably older versions) comes with the standard Dvorak layout only, which can be quite annoying when combined with vim, since the placement of ‘:’ differs. Continue reading Programmer’s Dvorak on Mac OS X 10.10 & German umlauts